nb_dump_debug_history
0x0075aeb0 · 276 bytes · __cdecl
_ZL21nb_dump_debug_historyRK8CCommand
Decompiled
undefined (1 param)
/* nb_dump_debug_history(CCommand const&) */
void nb_dump_debug_history(CCommand *param_1)
{
CBasePlayer *pCVar1;
NextBotManager *this;
INextBot *this_00;
int iVar2;
int local_20 [5];
if (*(int *)(NextBotDebugHistory._28_4_ + 0x30) == 0) {
BlackBox_Record("bot","nb_debug_history 0");
}
else {
pCVar1 = (CBasePlayer *)UTIL_GetCommandClient();
if (pCVar1 == (CBasePlayer *)0x0) {
pCVar1 = (CBasePlayer *)UTIL_GetListenServerHost();
}
this = (NextBotManager *)TheNextBots();
this_00 = (INextBot *)NextBotManager::GetBotUnderCrosshair(this,pCVar1);
if (this_00 != (INextBot *)0x0) {
local_20[0] = 0;
local_20[1] = 0;
local_20[2] = 0;
local_20[3] = 0;
local_20[4] = 0;
/* try { // try from 0075af3d to 0075af70 has its CatchHandler @ 0075afc5 */
INextBot::GetDebugHistory(this_00,0xff7f,(CUtlVector *)local_20);
iVar2 = 0;
if (0 < local_20[3]) {
do {
BlackBox_Record("bot","%s",*(int *)(local_20[0] + iVar2 * 4) + 4);
iVar2 = iVar2 + 1;
} while (iVar2 < local_20[3]);
}
local_20[3] = 0;
CUtlMemory<INextBot::NextBotDebugLineType_const*,int>::Purge
((CUtlMemory<INextBot::NextBotDebugLineType_const*,int> *)local_20);
local_20[4] = local_20[0];
CUtlMemory<INextBot::NextBotDebugLineType_const*,int>::Purge
((CUtlMemory<INextBot::NextBotDebugLineType_const*,int> *)local_20);
return;
}
BlackBox_Record("bot","no bot under crosshairs");
}
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.