Action<Charger>::InvokeOnSuspend
0x00a8e0b0 · 483 bytes · __thiscall
_ZN6ActionI7ChargerE15InvokeOnSuspendEPS0_P8BehaviorIS0_EPS1_
Decompiled
undefined (4 params)
/* Action<Charger>::InvokeOnSuspend(Charger*, Behavior<Charger>*, Action<Charger>*) */
Action<Charger> * __thiscall
Action<Charger>::InvokeOnSuspend
(Action<Charger> *this,Charger *param_1,Behavior *param_2,Action *param_3)
{
INextBot *this_00;
char cVar1;
undefined4 uVar2;
Action<Charger> *pAVar3;
int in_GS_OFFSET;
Charger *pCVar4;
Charger *pCVar5;
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);
}
pCVar4 = (Charger *)local_30;
this[0x31] = (Action<Charger>)0x1;
pAVar3 = this;
pCVar5 = param_1;
(**(code **)(*(int *)this + 0xbc))();
if (local_30[0] == 3) {
if (this[0x30] != (Action<Charger>)0x0) {
InvokeOnEnd((Action<Charger> *)0x0,pCVar4,(Behavior *)pAVar3,(Action *)pCVar5);
}
pAVar3 = *(Action<Charger> **)(this + 0x14);
(**(code **)(*(int *)this + 4))(this);
}
else {
pAVar3 = this;
if (*(Action<Charger> **)(this + 0x10) != (Action<Charger> *)0x0) {
uVar2 = InvokeOnSuspend(*(Action<Charger> **)(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.