CAI_BehaviorBase::SaveChannels
0x005a6ad0 · 538 bytes · __thiscall
_ZN16CAI_BehaviorBase12SaveChannelsER5ISave
Decompiled
undefined (2 params)
/* CAI_BehaviorBase::SaveChannels(ISave&) */
void __thiscall CAI_BehaviorBase::SaveChannels(CAI_BehaviorBase *this,ISave *param_1)
{
int iVar1;
int iVar2;
int in_GS_OFFSET;
int local_1b4;
int local_1b0;
undefined4 local_1ac;
undefined4 local_1a8;
char local_1a4 [128];
ulong local_124;
char local_120 [128];
char local_a0 [128];
int local_20;
local_1a4[0] = '\0';
local_1a8 = 0;
local_120[0] = '\0';
local_124 = 0;
local_a0[0] = '\0';
local_20 = *(int *)(in_GS_OFFSET + 0x14);
if (*(int *)(this + 0x18) != 0) {
(**(code **)(*(int *)param_1 + 0x20))(param_1);
local_1ac = 1;
(**(code **)(*(int *)param_1 + 0x2c))(param_1,&local_1ac,1);
if (0 < *(int *)(this + 0x18)) {
local_1b0 = 0;
local_1b4 = 0;
do {
iVar2 = local_1b0 + *(int *)(this + 0xc);
if (*(int *)(iVar2 + 4) == 0) {
local_1a4[0] = '\0';
local_124 = 0;
}
else {
V_strncpy(local_1a4,*(char **)(*(int *)(iVar2 + 4) + 0x2c),0x80);
CRC32_Init(&local_124);
CRC32_ProcessBuffer(&local_124,*(void **)(*(int *)(iVar2 + 4) + 4),
*(int *)(*(int *)(iVar2 + 4) + 8) << 3);
CRC32_Final(&local_124);
}
iVar1 = *(int *)(iVar2 + 8);
if ((1 < iVar1 + 1U) && (iVar1 != 1000000000)) {
iVar1 = (**(code **)(*(int *)this + 0x1d0))(this,iVar1);
if (iVar1 != 0) {
V_strncpy(local_120,*(char **)(iVar1 + 0x2c),0x80);
}
}
iVar2 = *(int *)(iVar2 + 0xc);
if ((1 < iVar2 + 1U) && (iVar2 != 1000000000)) {
iVar2 = (**(code **)(*(int *)this + 0x1d0))(this,iVar2);
if (iVar2 != 0) {
V_strncpy(local_a0,*(char **)(iVar2 + 0x2c),0x80);
}
}
(**(code **)(*(int *)param_1 + 0x14))
(param_1,&local_1a8,AIBehaviorChannelSaveHeader_t::m_DataMap);
local_1b4 = local_1b4 + 1;
local_1b0 = local_1b0 + 0x28;
} while (local_1b4 < *(int *)(this + 0x18));
}
(**(code **)(*(int *)param_1 + 0x24))(param_1);
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* 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.