L L4D2node

CTerrorPlayerAnimState::HandleActivity_Spit

0x005112e0 · 110 bytes · __thiscall

_ZN22CTerrorPlayerAnimState19HandleActivity_SpitEv

Decompiled

undefined (1 param)

/* CTerrorPlayerAnimState::HandleActivity_Spit() */

undefined4 __thiscall CTerrorPlayerAnimState::HandleActivity_Spit(CTerrorPlayerAnimState *this)

{
  int iVar1;
  undefined4 uVar2;
  
  if (this[0x160] == (CTerrorPlayerAnimState)0x0) {
    uVar2 = 0xffffffff;
  }
  else {
    iVar1 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
    if (iVar1 == 0x21f) {
      if (*(float *)(*(int *)(this + 0x118) + 0x490) <= 0.99) {
        uVar2 = CMultiPlayerAnimState::GetMainActivity((CMultiPlayerAnimState *)this);
        return uVar2;
      }
      this[0x160] = (CTerrorPlayerAnimState)0x0;
      uVar2 = 0xffffffff;
    }
    else {
      (**(code **)(*(int *)this + 0x38))(this);
      uVar2 = 0x21f;
    }
  }
  return uVar2;
}

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)