L L4D2node

SurvivorIntention::OnInjured

0x0094c500 · 235 bytes · __thiscall

_ZN17SurvivorIntention9OnInjuredERK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* SurvivorIntention::OnInjured(CTakeDamageInfo const&) */

void __thiscall SurvivorIntention::OnInjured(SurvivorIntention *this,CTakeDamageInfo *param_1)

{
  uint uVar1;
  CBaseEntity *this_00;
  int iVar2;
  int *piVar3;
  RecognizedActor *this_01;
  undefined *puVar4;
  RecognizedActor local_48 [56];
  
  uVar1 = *(uint *)(param_1 + 0x34);
  if ((((uVar1 != 0xffffffff) &&
       (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
     ((piVar3 = *(int **)(puVar4 + 4), piVar3 != (int *)0x0 &&
      (this_00 = (CBaseEntity *)(**(code **)(*piVar3 + 0x144))(piVar3),
      this_00 != (CBaseEntity *)0x0)))) {
    iVar2 = CBaseEntity::GetTeamNumber(this_00);
    if (iVar2 == 3) {
      this_01 = (RecognizedActor *)FindRecognized(this,(CBaseCombatCharacter *)this_00);
      if (this_01 == (RecognizedActor *)0x0) {
        RecognizedActor::RecognizedActor(local_48,(CBaseCombatCharacter *)this_00);
        RecognizedActor::UpdateVisible(local_48);
        CUtlVector<RecognizedActor,CUtlMemory<RecognizedActor,int>>::InsertBefore
                  ((CUtlVector<RecognizedActor,CUtlMemory<RecognizedActor,int>> *)(this + 100),
                   *(int *)(this + 0x70),local_48);
      }
      else {
        RecognizedActor::UpdateVisible(this_01);
      }
    }
    piVar3 = (int *)(**(code **)(*(int *)this + 8))(this);
    if (piVar3 != (int *)0x0) {
      do {
        (**(code **)(*piVar3 + 0x44))(piVar3,param_1);
        piVar3 = (int *)(**(code **)(*(int *)this + 0xc))(this,piVar3);
      } while (piVar3 != (int *)0x0);
      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)