L L4D2node

CDirectorTacticalServices::GetClosestSurvivor

0x008c1930 · 115 bytes · __thiscall

_ZNK25CDirectorTacticalServices18GetClosestSurvivorERK6Vectorbb

Decompiled

undefined (4 params)

/* CDirectorTacticalServices::GetClosestSurvivor(Vector const&, bool, bool) const */

int * __thiscall
CDirectorTacticalServices::GetClosestSurvivor
          (CDirectorTacticalServices *this,Vector *param_1,bool param_2,bool param_3)

{
  int *piVar1;
  char cVar2;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  int *local_1c;
  undefined4 local_18;
  undefined4 local_14;
  undefined1 local_10;
  undefined1 local_f;
  
  local_1c = (int *)0x0;
  local_18 = 0x4cbebc20;
  local_14 = 0;
  local_28 = *(undefined4 *)param_1;
  local_24 = *(undefined4 *)(param_1 + 4);
  local_20 = *(undefined4 *)(param_1 + 8);
  local_10 = param_2;
  local_f = param_3;
  ForEachTerrorPlayer<ClosestSurvivorScan>((ClosestSurvivorScan *)&local_28);
  piVar1 = local_1c;
  if ((local_1c != (int *)0x0) &&
     (cVar2 = (**(code **)(*local_1c + 0x16c))(local_1c), cVar2 != '\0')) {
    return piVar1;
  }
  return (int *)0x0;
}

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)