L L4D2node

NextBotCombatCharacter::Event_Killed

0x00751680 · 392 bytes · __thiscall

_ZN22NextBotCombatCharacter12Event_KilledERK15CTakeDamageInfo

Decompiled

undefined (2 params)

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

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

{
  uint uVar1;
  undefined4 *puVar2;
  int iVar3;
  undefined *puVar4;
  int *piVar5;
  
  uVar1 = *(uint *)(param_1 + 0x34);
  if ((((uVar1 != 0xffffffff) &&
       (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) &&
     (piVar5 = *(int **)(puVar4 + 4), piVar5 != (int *)0x0)) {
    iVar3 = (**(code **)(*piVar5 + 0x144))(piVar5);
    if (iVar3 != 0) {
      uVar1 = *(uint *)(param_1 + 0x34);
      piVar5 = (int *)0x0;
      if (((uVar1 != 0xffffffff) &&
          (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
        piVar5 = *(int **)(puVar4 + 4);
      }
      piVar5 = (int *)(**(code **)(*piVar5 + 0x144))(piVar5);
      if (piVar5 == (int *)0x0) {
        *(undefined4 *)(this + 0x1c6c) = 0xffffffff;
      }
      else {
        puVar2 = (undefined4 *)(**(code **)(*piVar5 + 0xc))(piVar5);
        *(undefined4 *)(this + 0x1c6c) = *puVar2;
      }
    }
  }
  (**(code **)(*(int *)(this + 0x1a3c) + 0x48))(this + 0x1a3c,param_1);
  if (this[0x104] != (NextBotCombatCharacter)0x1) {
    (**(code **)(*(int *)this + 0x21c))(this,this + 0x104);
    this[0x104] = (NextBotCombatCharacter)0x1;
  }
  (**(code **)(*(int *)g_pGameRules + 0x298))(g_pGameRules,this,param_1);
  CTerrorGameRules::DeathNoticeForInfected(g_pGameRules,(CBaseCombatCharacter *)this,param_1);
  uVar1 = *(uint *)(this + 0x220);
  if (((uVar1 != 0xffffffff) &&
      (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
     ((*(uint *)(puVar4 + 8) == uVar1 >> 0xc &&
      (piVar5 = *(int **)(puVar4 + 4), piVar5 != (int *)0x0)))) {
    (**(code **)(*piVar5 + 0x104))(piVar5,this);
  }
  puVar2 = (undefined4 *)TheNextBots();
  (**(code **)*puVar2)(puVar2,this,param_1);
  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)