NextBotManager::ShouldUpdate
0x00758d10 · 340 bytes · __thiscall
_ZN14NextBotManager12ShouldUpdateEP8INextBot
Decompiled
undefined (2 params)
/* NextBotManager::ShouldUpdate(INextBot*) */
undefined4 __thiscall NextBotManager::ShouldUpdate(NextBotManager *this,INextBot *param_1)
{
float fVar1;
int iVar2;
float fVar3;
iVar2 = *(int *)(this + 0x20);
if (iVar2 < 1) {
return 1;
}
fVar1 = *(float *)(nb_update_framelimit._28_4_ + 0x2c);
if (param_1[0xc] == (INextBot)0x0) {
fVar3 = 0.0;
}
else {
param_1[0xc] = (INextBot)0x0;
fVar3 = (float)(*(double *)(this + 0x2c) * 1000.0);
if (0.0 < fVar1) {
if (fVar3 < fVar1) {
return 1;
}
if (*(int *)(nb_update_debug._28_4_ + 0x30) != 0) {
Msg("Frame %8d/tick %8d: frame out of budget (%.2fms > %.2fms)\n",
*(undefined4 *)(gpGlobals + 4),*(undefined4 *)(gpGlobals + 0x18),(double)fVar3,
(double)fVar1);
iVar2 = *(int *)(this + 0x20);
goto LAB_00758d3c;
}
}
iVar2 = *(int *)(this + 0x20);
}
LAB_00758d3c:
iVar2 = (*(int *)(gpGlobals + 0x18) - *(int *)(param_1 + 0x10)) - iVar2;
if ((*(int *)(nb_update_maxslide._28_4_ + 0x30) <= iVar2) &&
((fVar1 == 0.0 ||
(fVar3 < *(float *)(nb_update_framelimit._28_4_ + 0x2c) +
*(float *)(nb_update_framelimit._28_4_ + 0x2c))))) {
g_nBlockedSlides = g_nBlockedSlides + 1;
return 1;
}
if (*(int *)(nb_update_debug._28_4_ + 0x30) == 0) {
return 0;
}
if (0 < iVar2) {
g_nSlid = g_nSlid + 1;
return 0;
}
return 0;
}
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.