L L4D2node

CBasePlayer::ClearUseEntity

0x007b35b0 · 225 bytes · __thiscall

_ZN11CBasePlayer14ClearUseEntityEv

Decompiled

undefined (1 param)

/* CBasePlayer::ClearUseEntity() */

undefined4 __thiscall CBasePlayer::ClearUseEntity(CBasePlayer *this)

{
  uint uVar1;
  int *piVar2;
  CBaseEdict *this_00;
  undefined4 uVar3;
  int iVar4;
  undefined *puVar5;
  
  uVar3 = 0;
  uVar1 = *(uint *)(this + 0x1d14);
  if ((((uVar1 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) &&
     (piVar2 = *(int **)(puVar5 + 4), piVar2 != (int *)0x0)) {
    (**(code **)(*piVar2 + 0x1ac))(piVar2,this,this,0,0);
    uVar1 = *(uint *)(this + 0x1d14);
    uVar3 = 1;
    if (((uVar1 != 0xffffffff) &&
        (puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
       ((*(uint *)(puVar5 + 8) == uVar1 >> 0xc && (*(int *)(puVar5 + 4) != 0)))) {
      if (this[0x6c] == (CBasePlayer)0x0) {
        this_00 = *(CBaseEdict **)(this + 0x30);
        if (this_00 != (CBaseEdict *)0x0) {
          *(uint *)this_00 = *(uint *)this_00 | 0x101;
          iVar4 = CBaseEdict::GetChangeAccessor(this_00);
          *(undefined2 *)(iVar4 + 2) = 0;
        }
      }
      else {
        this[0x70] = (CBasePlayer)((byte)this[0x70] | 1);
      }
      *(undefined4 *)(this + 0x1d14) = 0xffffffff;
      return 1;
    }
  }
  return uVar3;
}

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)