L L4D2node

CTerrorPlayer::IsPerformingActionOnSelf

0x004f1580 · 183 bytes · __thiscall

_ZNK13CTerrorPlayer24IsPerformingActionOnSelfE21TerrorPlayerUseAction

Decompiled

undefined (2 params)

/* CTerrorPlayer::IsPerformingActionOnSelf(TerrorPlayerUseAction) const */

undefined4 __thiscall CTerrorPlayer::IsPerformingActionOnSelf(CTerrorPlayer *this,int param_2)

{
  uint uVar1;
  CTerrorPlayer *pCVar2;
  char cVar3;
  undefined *puVar4;
  
  if (param_2 == 0) {
    if (*(int *)(this + 0x2b44) == 0) {
      return 0;
    }
  }
  else if (*(int *)(this + 0x2b44) != param_2) {
    return 0;
  }
  uVar1 = *(uint *)(this + 0x2b40);
  if ((((((uVar1 != 0xffffffff) &&
         (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
        (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
       ((this == *(CTerrorPlayer **)(puVar4 + 4) &&
        (uVar1 = *(uint *)(this + 0x2b3c), uVar1 != 0xffffffff)))) &&
      ((puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc &&
       ((*(uint *)(puVar4 + 8) == uVar1 >> 0xc &&
        (pCVar2 = *(CTerrorPlayer **)(puVar4 + 4), pCVar2 != (CTerrorPlayer *)0x0)))))) &&
     (cVar3 = (**(code **)(*(int *)pCVar2 + 0x16c))(pCVar2), cVar3 != '\0')) {
    if (this != pCVar2) {
      return 0;
    }
    return 1;
  }
  return 0;
}

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)