CAI_BehaviorBase::SetSchedule
0x005a6480 · 170 bytes · __thiscall
_ZN16CAI_BehaviorBase11SetScheduleEii
Decompiled
undefined (3 params)
/* CAI_BehaviorBase::SetSchedule(int, int) */
undefined4 __thiscall CAI_BehaviorBase::SetSchedule(CAI_BehaviorBase *this,int param_1,int param_2)
{
int iVar1;
undefined4 uVar2;
CAI_Schedule *pCVar3;
int iVar4;
if ((-1 < param_1) && (param_1 < *(int *)(this + 0x18))) {
uVar2 = (**(code **)(*(int *)this + 0x1a8))(this,param_1,param_2);
pCVar3 = (CAI_Schedule *)(**(code **)(*(int *)this + 0x1d0))(this,uVar2);
if (pCVar3 != (CAI_Schedule *)0x0) {
iVar1 = *(int *)(this + 0xc) + param_1 * 0x28;
if (param_2 < 1000000000) {
iVar4 = (**(code **)(*(int *)this + 0x180))(this);
uVar2 = CAI_LocalIdSpace::LocalToGlobal((CAI_LocalIdSpace *)(iVar4 + 4),param_2);
*(undefined4 *)(iVar1 + 8) = uVar2;
}
else {
*(int *)(iVar1 + 8) = param_2;
}
SetSchedule(this,param_1,pCVar3);
return 1;
}
}
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.