L L4D2node

SurvivorReviveFriend::OnStartUse

0x00935550 · 223 bytes · __thiscall

_ZN20SurvivorReviveFriend10OnStartUseEP11SurvivorBot

Decompiled

undefined (2 params)

/* SurvivorReviveFriend::OnStartUse(SurvivorBot*) */

void __thiscall SurvivorReviveFriend::OnStartUse(SurvivorReviveFriend *this,SurvivorBot *param_1)

{
  SurvivorBot *pSVar1;
  uint uVar2;
  CBaseEntity *this_00;
  char cVar3;
  int iVar4;
  undefined *puVar5;
  longdouble lVar6;
  
  SurvivorUseObject::OnStartUse((SurvivorUseObject *)this,param_1);
  uVar2 = *(uint *)(this + 0x34);
  if ((((uVar2 != 0xffffffff) &&
       (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar5 + 8) == uVar2 >> 0xc)) &&
     (this_00 = *(CBaseEntity **)(puVar5 + 4), this_00 != (CBaseEntity *)0x0)) {
    iVar4 = CBaseEntity::GetTeamNumber(this_00);
    cVar3 = IsASurvivorTeam(iVar4);
    if ((cVar3 != '\0') && (*(uint *)(this_00 + 0x2ba0) < 8)) {
      pSVar1 = param_1 + *(uint *)(this_00 + 0x2ba0) * 0xc + 0x1ab10;
      lVar6 = (longdouble)CountdownTimer::Now();
      if ((float)lVar6 + 10.0 != *(float *)(pSVar1 + 8)) {
        (**(code **)(*(int *)pSVar1 + 4))(pSVar1,pSVar1 + 8);
        *(float *)(pSVar1 + 8) = (float)lVar6 + 10.0;
      }
      if (*(float *)(pSVar1 + 4) != 10.0) {
        (**(code **)(*(int *)pSVar1 + 4))(pSVar1,pSVar1 + 4);
        *(int *)(pSVar1 + 4) = 0x41200000;
      }
    }
  }
  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)