L L4D2node

CL4DGameStats::AddStuckPlayerData

0x008e04c0 · 136 bytes · __thiscall

_ZN13CL4DGameStats18AddStuckPlayerDataEP13CTerrorPlayer

Decompiled

undefined (2 params)

/* CL4DGameStats::AddStuckPlayerData(CTerrorPlayer*) */

void __thiscall CL4DGameStats::AddStuckPlayerData(CL4DGameStats *this,CTerrorPlayer *param_1)

{
  int iVar1;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  if (param_1 != (CTerrorPlayer *)0x0) {
    iVar1 = CBaseEntity::GetTeamNumber((CBaseEntity *)param_1);
    if (iVar1 == 3) {
      local_20 = (**(code **)(*(int *)param_1 + 0x544))(param_1);
      if (((byte)param_1[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_1);
      }
      local_2c = *(undefined4 *)(param_1 + 0x2e0);
      local_28 = *(undefined4 *)(param_1 + 0x2e4);
      local_24 = *(undefined4 *)(param_1 + 0x2e8);
      CUtlVector<L4D2_StuckPosition_Data,CUtlMemory<L4D2_StuckPosition_Data,int>>::InsertBefore
                ((CUtlVector<L4D2_StuckPosition_Data,CUtlMemory<L4D2_StuckPosition_Data,int>> *)
                 (this + 0x4b0),*(int *)(this + 0x4bc),(L4D2_StuckPosition_Data *)&local_2c);
      return;
    }
  }
  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)