L L4D2node

CTerrorPlayer::IsPerformingActionOnSomeoneElse

0x004f1650 · 186 bytes · __thiscall

_ZNK13CTerrorPlayer31IsPerformingActionOnSomeoneElseE21TerrorPlayerUseAction

Decompiled

undefined (2 params)

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

bool __thiscall CTerrorPlayer::IsPerformingActionOnSomeoneElse(CTerrorPlayer *this,int param_2)

{
  uint uVar1;
  CTerrorPlayer *pCVar2;
  char cVar3;
  undefined *puVar4;
  
  if (param_2 == 0) {
    if (*(int *)(this + 0x2b44) == 0) {
      return false;
    }
  }
  else if (*(int *)(this + 0x2b44) != param_2) {
    return false;
  }
  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);
    if (((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')))))) {
      return this != pCVar2;
    }
    return true;
  }
  return false;
}

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)