NextBotManager::OnKilled
0x007583e0 · 385 bytes · __thiscall
_ZN14NextBotManager8OnKilledEP20CBaseCombatCharacterRK15CTakeDamageInfo
Decompiled
undefined (3 params)
/* NextBotManager::OnKilled(CBaseCombatCharacter*, CTakeDamageInfo const&) */
void __thiscall
NextBotManager::OnKilled
(NextBotManager *this,CBaseCombatCharacter *param_1,CTakeDamageInfo *param_2)
{
int *piVar1;
char cVar2;
int iVar3;
uint uVar4;
int *piVar5;
int iVar6;
undefined4 local_7c;
undefined4 local_78;
undefined4 local_74;
undefined4 local_70;
undefined4 local_6c;
undefined4 local_68;
undefined4 local_64;
undefined4 local_60;
undefined4 local_5c;
undefined4 local_58;
undefined4 local_54;
undefined4 local_50;
undefined4 local_4c;
undefined4 local_48;
undefined4 local_44;
undefined4 local_40;
undefined4 local_3c;
undefined4 local_38;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
CTakeDamageInfo::CTakeDamageInfo((CTakeDamageInfo *)&local_7c);
local_7c = *(undefined4 *)param_2;
local_4c = *(undefined4 *)(param_2 + 0x30);
local_78 = *(undefined4 *)(param_2 + 4);
local_74 = *(undefined4 *)(param_2 + 8);
local_48 = *(undefined4 *)(param_2 + 0x34);
local_70 = *(undefined4 *)(param_2 + 0xc);
local_6c = *(undefined4 *)(param_2 + 0x10);
local_44 = *(undefined4 *)(param_2 + 0x38);
local_68 = *(undefined4 *)(param_2 + 0x14);
local_64 = *(undefined4 *)(param_2 + 0x18);
local_60 = *(undefined4 *)(param_2 + 0x1c);
local_5c = *(undefined4 *)(param_2 + 0x20);
local_58 = *(undefined4 *)(param_2 + 0x24);
local_54 = *(undefined4 *)(param_2 + 0x28);
local_50 = *(undefined4 *)(param_2 + 0x2c);
local_40 = *(undefined4 *)(param_2 + 0x3c);
local_34 = *(undefined4 *)(param_2 + 0x48);
local_3c = *(undefined4 *)(param_2 + 0x40);
local_38 = *(undefined4 *)(param_2 + 0x44);
local_30 = *(undefined4 *)(param_2 + 0x4c);
local_24 = *(undefined4 *)(param_2 + 0x58);
local_2c = *(undefined4 *)(param_2 + 0x50);
local_28 = *(undefined4 *)(param_2 + 0x54);
local_20 = *(undefined4 *)(param_2 + 0x5c);
iVar3 = TheNextBots();
uVar4 = (uint)*(ushort *)(iVar3 + 0x10);
if (uVar4 != 0xffff) {
iVar6 = *(int *)(iVar3 + 4);
do {
while( true ) {
piVar1 = *(int **)(iVar6 + uVar4 * 8);
piVar5 = (int *)(**(code **)(*piVar1 + 0xb4))(piVar1);
cVar2 = (**(code **)(*piVar5 + 300))(piVar5);
if ((cVar2 == '\0') ||
(cVar2 = (**(code **)(*piVar1 + 0xe0))(piVar1,param_1), cVar2 != '\0')) break;
(**(code **)(*piVar1 + 0x4c))(piVar1,param_1,&local_7c);
iVar6 = *(int *)(iVar3 + 4);
uVar4 = (uint)*(ushort *)(iVar6 + 6 + uVar4 * 8);
if (uVar4 == 0xffff) {
return;
}
}
iVar6 = *(int *)(iVar3 + 4);
uVar4 = (uint)*(ushort *)(iVar6 + 6 + uVar4 * 8);
} while (uVar4 != 0xffff);
}
return;
}
SourceMod gamedata
paste intoaddons/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.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.