Action<Tank>::InvokeUpdate
0x00af1520 · 426 bytes · __cdecl
_ZN6ActionI4TankE12InvokeUpdateEPS0_P8BehaviorIS0_Ef
Decompiled
undefined (3 params)
/* Action<Tank>::InvokeUpdate(Tank*, Behavior<Tank>*, float) */
Tank * Action<Tank>::InvokeUpdate(Tank *param_1,Behavior *param_2,float param_3)
{
uint uVar1;
undefined4 uVar2;
int iVar3;
undefined4 uVar4;
int iVar5;
undefined4 in_stack_00000010;
int local_34;
undefined4 local_30;
undefined4 local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
iVar5 = *(int *)(param_2 + 0x14);
if (iVar5 != 0) {
uVar1 = *(uint *)(iVar5 + 0x20);
iVar3 = iVar5;
while( true ) {
if ((uVar1 & 0xfffffffd) == 1) {
*(undefined4 *)param_1 = 3;
*(undefined4 *)(param_1 + 4) = 0;
*(char **)(param_1 + 8) = "Out of scope";
return param_1;
}
iVar3 = *(int *)(iVar3 + 0x14);
if (iVar3 == 0) break;
uVar1 = *(uint *)(iVar3 + 0x20);
}
}
if (param_2[0x30] == (Behavior)0x0) {
*(undefined4 *)param_1 = 1;
*(Behavior **)(param_1 + 4) = param_2;
*(char **)(param_1 + 8) = "Starting Action";
}
else {
iVar3 = *(int *)(param_2 + 0x20);
if (iVar3 - 1U < 3) {
uVar2 = *(undefined4 *)(param_2 + 0x28);
*(undefined4 *)(param_2 + 0x20) = 0;
uVar4 = *(undefined4 *)(param_2 + 0x24);
*(undefined4 *)(param_2 + 0x28) = 0;
*(undefined4 *)(param_2 + 0x24) = 0;
*(undefined4 *)(param_2 + 0x2c) = 0;
LAB_00af15bd:
*(int *)param_1 = iVar3;
*(undefined4 *)(param_1 + 4) = uVar4;
*(undefined4 *)(param_1 + 8) = uVar2;
return param_1;
}
for (; iVar5 != 0; iVar5 = *(int *)(iVar5 + 0x14)) {
if (*(int *)(iVar5 + 0x20) == 2) {
uVar2 = *(undefined4 *)(iVar5 + 0x28);
*(undefined4 *)(iVar5 + 0x20) = 0;
iVar3 = 2;
uVar4 = *(undefined4 *)(iVar5 + 0x24);
*(undefined4 *)(iVar5 + 0x28) = 0;
*(undefined4 *)(iVar5 + 0x24) = 0;
*(undefined4 *)(iVar5 + 0x2c) = 0;
goto LAB_00af15bd;
}
}
(**(code **)(*(int *)param_2 + 0xb4))(&local_34,param_2,param_3);
if ((2 < local_34 - 1U) && (*(Behavior **)(param_2 + 0x10) != (Behavior *)0x0)) {
InvokeUpdate((Tank *)&local_28,*(Behavior **)(param_2 + 0x10),param_3);
uVar2 = ApplyResult(*(undefined4 *)(param_2 + 0x10),param_3,in_stack_00000010,local_28,
local_24,local_20);
*(undefined4 *)(param_2 + 0x10) = uVar2;
}
*(int *)param_1 = local_34;
*(undefined4 *)(param_1 + 4) = local_30;
*(undefined4 *)(param_1 + 8) = local_2c;
}
return param_1;
}
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.