L L4D2node

CDirectorTacticalServices::GetClosestSurvivor

0x008c19b0 · 130 bytes · __thiscall

_ZNK25CDirectorTacticalServices18GetClosestSurvivorEPK20CBaseCombatCharacterbb

Decompiled

undefined (4 params)

/* CDirectorTacticalServices::GetClosestSurvivor(CBaseCombatCharacter const*, bool, bool) const */

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

{
  int *piVar1;
  char cVar2;
  undefined4 *puVar3;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int *local_2c;
  undefined4 local_28;
  CBaseCombatCharacter *local_24;
  undefined1 local_20;
  undefined1 local_1f;
  
  puVar3 = (undefined4 *)(**(code **)(*(int *)param_1 + 0x288))(param_1);
  local_38 = *puVar3;
  local_34 = puVar3[1];
  local_30 = puVar3[2];
  local_20 = param_2;
  local_1f = param_3;
  local_24 = param_1;
  local_2c = (int *)0x0;
  local_28 = 0x4cbebc20;
  ForEachTerrorPlayer<ClosestSurvivorScan>((ClosestSurvivorScan *)&local_38);
  piVar1 = local_2c;
  if ((local_2c != (int *)0x0) &&
     (cVar2 = (**(code **)(*local_2c + 0x16c))(local_2c), 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)