L L4D2node

SurvivorBot::Event_Killed

0x009447e0 · 239 bytes · __thiscall

_ZN11SurvivorBot12Event_KilledERK15CTakeDamageInfo

Decompiled

undefined (2 params)

/* SurvivorBot::Event_Killed(CTakeDamageInfo const&) */

void __thiscall SurvivorBot::Event_Killed(SurvivorBot *this,CTakeDamageInfo *param_1)

{
  CTerrorPlayer CVar1;
  undefined4 uVar2;
  char cVar3;
  CTerrorPlayer *this_00;
  
  (**(code **)(*(int *)(this + 0x4028) + 0x48))(this + 0x4028,param_1);
  CTerrorPlayer::Event_Killed((CTerrorPlayer *)this,param_1);
  if (0 < *(int *)(this + 0x4308)) {
    this_00 = (CTerrorPlayer *)UTIL_PlayerByUserId(*(int *)(this + 0x4308));
    if (this_00 != (CTerrorPlayer *)0x0) {
      cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00);
      if (cVar3 != '\0') {
        uVar2 = *(undefined4 *)(this + 0x2ba0);
        (**(code **)(*(int *)this + 0x8cc))(this,1,8,0);
        CTerrorPlayer::NoteIdleStateWhenTakingOverDeadBot(this_00);
        CVar1 = this_00[0x3fcd];
        (**(code **)(*(int *)this_00 + 0x8cc))(this_00,2,uVar2,0);
        if (CVar1 == (CTerrorPlayer)0x0) {
          ResetHumanSpectator(this);
          return;
        }
        CTerrorPlayer::ForceIdleStateWhenTakingOverDeadBot(this_00);
        ResetHumanSpectator(this);
        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)