CAI_BehaviorBase::IsCurSchedule
0x005a65c0 · 142 bytes · __thiscall
_ZN16CAI_BehaviorBase13IsCurScheduleEiib
Decompiled
undefined (4 params)
/* CAI_BehaviorBase::IsCurSchedule(int, int, bool) */
uint __thiscall
CAI_BehaviorBase::IsCurSchedule(CAI_BehaviorBase *this,int param_1,int param_2,bool param_3)
{
int iVar1;
uint uVar2;
int iVar3;
undefined3 in_stack_00000011;
uVar2 = 0;
if ((-1 < param_1) && (param_1 < *(int *)(this + 0x18))) {
iVar1 = *(int *)(this + 0xc) + param_1 * 0x28;
if (*(int *)(iVar1 + 4) == 0) {
uVar2 = 1;
if (param_2 != 0) {
uVar2 = (uint)(param_2 == 1000000000);
}
}
else {
if (param_2 < 1000000000) {
iVar3 = (**(code **)(*(int *)this + 0x180))(this);
param_2 = CAI_LocalIdSpace::LocalToGlobal((CAI_LocalIdSpace *)(iVar3 + 4),param_2);
}
if (param_3) {
return CONCAT31(in_stack_00000011,param_2 == *(int *)(iVar1 + 8));
}
uVar2 = CONCAT31((int3)((uint)*(int **)(iVar1 + 4) >> 8),param_2 == **(int **)(iVar1 + 4));
}
}
return uVar2;
}
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.