L L4D2node

CBasePlayer::UpdateOnRemove

0x007bcc40 · 249 bytes · __thiscall

_ZN11CBasePlayer14UpdateOnRemoveEv

Decompiled

undefined (1 param)

/* CBasePlayer::UpdateOnRemove() */

void __thiscall CBasePlayer::UpdateOnRemove(CBasePlayer *this)

{
  uint uVar1;
  char cVar2;
  int iVar3;
  int *piVar4;
  undefined *puVar5;
  void *local_18 [2];
  undefined2 local_10;
  ushort local_e;
  
  cVar2 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules);
  if ((cVar2 == '\0') && (g_pScriptVM != (int *)0x0)) {
    local_18[0] = (void *)0x0;
    local_10 = 0;
    local_e = 0;
                    /* try { // try from 007bcc97 to 007bcc99 has its CatchHandler @ 007bcd42 */
    (**(code **)(*g_pScriptVM + 0x78))(g_pScriptVM,0,"player",local_18);
    if ((local_e & 1) != 0) {
      free(local_18[0]);
    }
  }
  (**(code **)(*(int *)this + 0x298))(this);
  iVar3 = CBaseEntity::GetTeam((CBaseEntity *)this);
  if (iVar3 != 0) {
    piVar4 = (int *)CBaseEntity::GetTeam((CBaseEntity *)this);
    (**(code **)(*piVar4 + 0x350))(piVar4,this);
  }
  uVar1 = *(uint *)(this + 0x234c);
  if ((((uVar1 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
     (*(CBasePlayer **)(puVar5 + 4) != (CBasePlayer *)0x0)) {
    RemoveSplitScreenPlayer(*(CBasePlayer **)(puVar5 + 4),this);
    CBaseCombatCharacter::UpdateOnRemove((CBaseCombatCharacter *)this);
    return;
  }
  CBaseCombatCharacter::UpdateOnRemove((CBaseCombatCharacter *)this);
  return;
}

SourceMod gamedata

paste into addons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)

Just a Signatures{} block, ready to drop into a gamedata file. Wire it up in your plugin however you like - SDKCall, DHooks, raw memory ops, or anything else.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)