L L4D2node

SurvivorEngageTheEnemy::OnOtherKilled

0x0091c3a0 · 149 bytes · __thiscall

_ZN22SurvivorEngageTheEnemy13OnOtherKilledEP11SurvivorBotP20CBaseCombatCharacterRK15CTakeDamageInfo

Decompiled

undefined (4 params)

/* SurvivorEngageTheEnemy::OnOtherKilled(SurvivorBot*, CBaseCombatCharacter*, CTakeDamageInfo
   const&) */

SurvivorEngageTheEnemy * __thiscall
SurvivorEngageTheEnemy::OnOtherKilled
          (SurvivorEngageTheEnemy *this,SurvivorBot *param_1,CBaseCombatCharacter *param_2,
          CTakeDamageInfo *param_3)

{
  char cVar1;
  int iVar2;
  
  if (param_3 == (CTakeDamageInfo *)0x0) goto LAB_0091c3f0;
  cVar1 = (**(code **)(*(int *)param_2 + 0x9b0))(param_2,param_3);
  if (cVar1 == '\0') goto LAB_0091c3f0;
  iVar2 = CTerrorPlayer::ClassifyZombie((CBaseEntity *)param_3);
  if (iVar2 < 1) {
LAB_0091c440:
    iVar2 = *(int *)(param_1 + 0x40);
  }
  else {
    if (6 < iVar2) {
      if (iVar2 < 9) {
        *(int *)(param_1 + 0x40) = *(int *)(param_1 + 0x40) + 10;
        goto LAB_0091c3f0;
      }
      goto LAB_0091c440;
    }
    iVar2 = *(int *)(param_1 + 0x40) + 2;
  }
  *(int *)(param_1 + 0x40) = iVar2 + 1;
LAB_0091c3f0:
  *(undefined4 *)this = 4;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  *(undefined4 *)(this + 0xc) = 1;
  return this;
}

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)