L L4D2node

CSurvivorRescue::RescueThink

0x0096b010 · 334 bytes · __thiscall

_ZN15CSurvivorRescue11RescueThinkEv

Decompiled

undefined (1 param)

/* CSurvivorRescue::RescueThink() */

void __thiscall CSurvivorRescue::RescueThink(CSurvivorRescue *this)

{
  uint uVar1;
  undefined *puVar2;
  undefined1 local_54 [12];
  undefined4 local_48;
  undefined4 local_44;
  float local_40;
  int local_3c;
  float local_38;
  undefined4 local_34;
  undefined1 local_30;
  undefined1 local_2f;
  int local_2c [2];
  undefined4 local_24;
  undefined4 local_18;
  undefined4 local_14;
  
  ValidateSurvivor(this);
  uVar1 = *(uint *)(this + 0x1920);
  if ((((uVar1 != 0xffffffff) &&
       (puVar2 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar2 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar2 + 8) == uVar1 >> 0xc)) && (*(int *)(puVar2 + 4) != 0)) {
    CBaseEntity::ThinkSet((_func_void *)local_54,(float)this,(char *)RescueThink);
    if (((byte)this[0x14d] & 8) != 0) {
      CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
    }
    local_30 = 1;
    local_44 = *(undefined4 *)(this + 0x2e4);
    local_3c = 0;
    local_40 = *(float *)(this + 0x2e8) + 35.5;
    local_38 = 1e+08;
    local_48 = *(undefined4 *)(this + 0x2e0);
    local_34 = 0;
    local_2f = 0;
    ForEachTerrorPlayer<ClosestVisibleSurvivorScan>((ClosestVisibleSurvivorScan *)&local_48);
    if ((local_3c != 0) &&
       (local_38 < *(float *)(RescueRange._28_4_ + 0x2c) * *(float *)(RescueRange._28_4_ + 0x2c))) {
      local_2c[0] = local_3c;
      local_24 = 0;
      local_18 = 0xffffffff;
      local_14 = 0;
      InputRescue(this,(inputdata_t *)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)