NextBotManager::OnSound
0x00758570 · 380 bytes · __thiscall
_ZN14NextBotManager7OnSoundEP11CBaseEntityRK6VectorP9KeyValues
Decompiled
undefined (4 params)
/* NextBotManager::OnSound(CBaseEntity*, Vector const&, KeyValues*) */
void __thiscall
NextBotManager::OnSound
(NextBotManager *this,CBaseEntity *param_1,Vector *param_2,KeyValues *param_3)
{
int *piVar1;
code *pcVar2;
char cVar3;
int iVar4;
uint uVar5;
int *piVar6;
undefined4 uVar7;
int iVar8;
undefined4 local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
iVar4 = TheNextBots();
uVar5 = (uint)*(ushort *)(iVar4 + 0x10);
if (uVar5 != 0xffff) {
iVar8 = *(int *)(iVar4 + 4);
do {
while( true ) {
piVar1 = *(int **)(iVar8 + uVar5 * 8);
piVar6 = (int *)(**(code **)(*piVar1 + 0xb4))(piVar1);
cVar3 = (**(code **)(*piVar6 + 300))(piVar6);
if (cVar3 != '\0') break;
LAB_00758598:
iVar8 = *(int *)(iVar4 + 4);
uVar5 = (uint)*(ushort *)(iVar8 + 6 + uVar5 * 8);
if (uVar5 == 0xffff) goto LAB_00758630;
}
pcVar2 = *(code **)(*piVar1 + 0xe0);
uVar7 = (**(code **)(*(int *)param_1 + 0x144))(param_1);
cVar3 = (*pcVar2)(piVar1,uVar7);
if (cVar3 != '\0') goto LAB_00758598;
(**(code **)(*piVar1 + 0x5c))(piVar1,param_1,param_2,param_3);
iVar8 = *(int *)(iVar4 + 4);
uVar5 = (uint)*(ushort *)(iVar8 + 6 + uVar5 * 8);
} while (uVar5 != 0xffff);
}
LAB_00758630:
if ((param_1 != (CBaseEntity *)0x0) && (((byte)this[0x34] & 0x40) != 0)) {
iVar4 = CBaseEntity::GetTeamNumber(param_1);
iVar8 = 0xff;
if (iVar4 == 2) {
iVar4 = 0;
}
else {
if (iVar4 == 3) {
iVar8 = 0;
}
iVar4 = 0xff;
}
local_34 = 0;
local_30 = 0xbf800000;
local_2c = 0;
local_28 = 0x3f800000;
local_24 = 0;
local_20 = 0;
NDebugOverlay::Circle
(param_2,(Vector *)&local_28,(Vector *)&local_34,5.0,iVar4,iVar8,0,0xff,true,3.0);
}
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.