L L4D2node

CSurvivorRescue::IsLiveSurvivorInside

0x0096b6a0 · 320 bytes · __thiscall

_ZN15CSurvivorRescue20IsLiveSurvivorInsideEv

Decompiled

undefined (1 param)

/* CSurvivorRescue::IsLiveSurvivorInside() */

undefined4 __thiscall CSurvivorRescue::IsLiveSurvivorInside(CSurvivorRescue *this)

{
  CBaseEntity *this_00;
  int iVar1;
  undefined4 uVar2;
  int iVar3;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  int local_30 [8];
  
  local_30[0] = 0;
  local_30[1] = 0;
  local_30[2] = 0;
  local_30[3] = 0;
  local_30[4] = 0;
  local_40 = 2;
  local_3c = 2;
  local_38 = 3;
  local_34 = 9;
                    /* try { // try from 0096b6f1 to 0096b7b7 has its CatchHandler @ 0096b7f3 */
  ForEachSurvivor<PlayerCollector>((PlayerCollector *)&local_40);
  if (0 < local_30[3]) {
    iVar3 = 0;
    do {
      this_00 = *(CBaseEntity **)(local_30[0] + iVar3 * 4);
      iVar1 = (**(code **)(*(int *)this_00 + 0x52c))(this_00);
      if ((iVar1 != 0) && ((*(byte *)(iVar1 + 0x12e) & 1) != 0)) {
        if (((byte)this[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
        }
        if (((byte)this_00[0x14d] & 8) != 0) {
          CBaseEntity::CalcAbsolutePosition(this_00);
        }
        if ((*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) *
            (*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) +
            (*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) *
            (*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) +
            (*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) *
            (*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) < 122500.0) {
          uVar2 = 1;
          goto LAB_0096b7c2;
        }
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 < local_30[3]);
  }
  uVar2 = 0;
LAB_0096b7c2:
  local_30[3] = 0;
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
  local_30[4] = local_30[0];
  CUtlMemory<CTerrorPlayer*,int>::Purge((CUtlMemory<CTerrorPlayer*,int> *)local_30);
  return uVar2;
}

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)