L L4D2node

CL4DGameStats::GetAliveSurvivorCount

0x008e0550 · 126 bytes · __cdecl

_ZN13CL4DGameStats21GetAliveSurvivorCountEv

Decompiled

undefined (0 params)

/* CL4DGameStats::GetAliveSurvivorCount() */

undefined4 CL4DGameStats::GetAliveSurvivorCount(void)

{
  undefined4 uVar1;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  undefined4 local_1c;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  
  local_20 = 0;
  local_1c = 0;
  local_18 = 0;
  local_14 = 0;
  local_10 = 0;
  local_30 = 2;
  local_2c = 2;
  local_28 = 3;
  local_24 = 9;
                    /* try { // try from 008e059d to 008e05a1 has its CatchHandler @ 008e05ce */
  ForEachTerrorPlayer<PlayerCollector>((PlayerCollector *)&local_30);
  uVar1 = local_14;
  local_14 = 0;
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_20);
  local_10 = local_20;
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)&local_20);
  return uVar1;
}

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)