L L4D2node

CSurvivorRescue::ValidateSurvivor

0x00969c10 · 286 bytes · __thiscall

_ZN15CSurvivorRescue16ValidateSurvivorEv

Decompiled

undefined (1 param)

/* CSurvivorRescue::ValidateSurvivor() */

void __thiscall CSurvivorRescue::ValidateSurvivor(CSurvivorRescue *this)

{
  uint uVar1;
  CBaseEdict *this_00;
  char cVar2;
  int iVar3;
  undefined *puVar4;
  int *piVar5;
  
  uVar1 = *(uint *)(this + 0x1920);
  if ((((uVar1 == 0xffffffff) ||
       (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
     (*(CBaseEntity **)(puVar4 + 4) == (CBaseEntity *)0x0)) {
    return;
  }
  iVar3 = CBaseEntity::GetTeamNumber(*(CBaseEntity **)(puVar4 + 4));
  if (iVar3 == 2) {
    uVar1 = *(uint *)(this + 0x1920);
    piVar5 = (int *)0x0;
    if (((uVar1 != 0xffffffff) &&
        (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
       (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
      piVar5 = *(int **)(puVar4 + 4);
    }
    cVar2 = (**(code **)(*piVar5 + 300))(piVar5);
    if (cVar2 == '\0') {
      return;
    }
  }
  uVar1 = *(uint *)(this + 0x1920);
  if (((uVar1 != 0xffffffff) &&
      (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar4 + 8) == uVar1 >> 0xc && (*(int *)(puVar4 + 4) != 0)))) {
    if (this[0x6c] == (CSurvivorRescue)0x0) {
      this_00 = *(CBaseEdict **)(this + 0x30);
      if (this_00 != (CBaseEdict *)0x0) {
        *(uint *)this_00 = *(uint *)this_00 | 0x101;
        iVar3 = CBaseEdict::GetChangeAccessor(this_00);
        *(undefined2 *)(iVar3 + 2) = 0;
      }
    }
    else {
      this[0x70] = (CSurvivorRescue)((byte)this[0x70] | 1);
    }
    *(undefined4 *)(this + 0x1920) = 0xffffffff;
    CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
    return;
  }
  CBaseEntity::DispatchUpdateTransmitState((CBaseEntity *)this);
  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)