Action<Hunter>::InvokeOnSuspend
0x00aa1b40 · 483 bytes · __thiscall
_ZN6ActionI6HunterE15InvokeOnSuspendEPS0_P8BehaviorIS0_EPS1_
Decompiled
undefined (4 params)
/* Action<Hunter>::InvokeOnSuspend(Hunter*, Behavior<Hunter>*, Action<Hunter>*) */
Action<Hunter> * __thiscall
Action<Hunter>::InvokeOnSuspend
(Action<Hunter> *this,Hunter *param_1,Behavior *param_2,Action *param_3)
{
INextBot *this_00;
char cVar1;
undefined4 uVar2;
Action<Hunter> *pAVar3;
int in_GS_OFFSET;
Hunter *pHVar4;
Hunter *pHVar5;
int local_30 [3];
undefined1 local_24;
undefined1 local_23;
undefined1 local_22;
undefined1 local_21;
int local_20;
this_00 = (INextBot *)(param_1 + 0x4028);
local_20 = *(int *)(in_GS_OFFSET + 0x14);
cVar1 = INextBot::IsDebugging(this_00,1);
if ((cVar1 != '\0') || (*(int *)(NextBotDebugHistory._28_4_ + 0x30) != 0)) {
uVar2 = (**(code **)(*(int *)param_1 + 0x9a4))(param_1);
local_24 = 0xff;
local_23 = 0xff;
local_22 = 0x96;
local_21 = 0xff;
INextBot::DebugConColorMsg
(this_00,1,&local_24,"%3.2f: %s:%s: ",(double)*(float *)(gpGlobals + 0xc),uVar2,
param_2 + 0x11);
local_24 = 0xff;
local_23 = 0;
local_22 = 0xff;
local_21 = 0xff;
INextBot::DebugConColorMsg(this_00,1,&local_24," SUSPENDING ");
uVar2 = (**(code **)(*(int *)this + 0xa4))(this);
local_24 = 0xff;
local_23 = 0xff;
local_22 = 0xff;
local_21 = 0xff;
INextBot::DebugConColorMsg(this_00,1,&local_24,uVar2);
local_24 = 0xff;
local_23 = 0xff;
local_22 = 0xff;
local_21 = 0xff;
INextBot::DebugConColorMsg(this_00,1,&local_24,&DAT_00cff71e);
}
pHVar4 = (Hunter *)local_30;
this[0x31] = (Action<Hunter>)0x1;
pAVar3 = this;
pHVar5 = param_1;
(**(code **)(*(int *)this + 0xbc))();
if (local_30[0] == 3) {
if (this[0x30] != (Action<Hunter>)0x0) {
InvokeOnEnd((Action<Hunter> *)0x0,pHVar4,(Behavior *)pAVar3,(Action *)pHVar5);
}
pAVar3 = *(Action<Hunter> **)(this + 0x14);
(**(code **)(*(int *)this + 4))(this);
}
else {
pAVar3 = this;
if (*(Action<Hunter> **)(this + 0x10) != (Action<Hunter> *)0x0) {
uVar2 = InvokeOnSuspend(*(Action<Hunter> **)(this + 0x10),param_1,param_2,param_3);
*(undefined4 *)(this + 0x10) = uVar2;
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return pAVar3;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.