Action<Spitter>::OnUnStuck
0x00ad0b50 · 1073 bytes · __thiscall
_ZN6ActionI7SpitterE9OnUnStuckEv
Decompiled
undefined (1 param)
/* Action<Spitter>::OnUnStuck() */
void __thiscall Action<Spitter>::OnUnStuck(Action<Spitter> *this)
{
Action<Spitter> *pAVar1;
float fVar2;
int iVar3;
code *pcVar4;
int *piVar5;
double *pdVar6;
char cVar7;
uint uVar8;
uint uVar9;
int *piVar10;
undefined1 *puVar11;
Action<Spitter> *pAVar12;
double *pdVar13;
uint *puVar14;
int in_GS_OFFSET;
uint auStack_84 [15];
int *local_48;
int *local_44;
int *local_40;
int local_34;
int *local_30;
undefined1 *local_2c;
int local_28;
undefined1 local_24;
undefined1 local_23;
undefined1 local_22;
undefined1 local_21;
int local_20;
puVar14 = auStack_84 + 2;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
pAVar12 = this;
pdVar6 = (double *)(auStack_84 + 2);
if (this[0x30] != (Action<Spitter>)0x0) {
do {
pdVar13 = pdVar6;
iVar3 = *(int *)(this + 0x1c);
uVar8 = 0;
if (iVar3 != 0) {
*(uint *)((int)pdVar13 + 4) = 0x80;
*(int *)pdVar13 = iVar3 + 0x4028;
*(undefined4 *)((int)pdVar13 + -4) = 0xad0bde;
cVar7 = INextBot::IsDebugging(*(INextBot **)pdVar13,*(uint *)((int)pdVar13 + 4));
if ((cVar7 == '\0') && (*(int *)(NextBotDebugHistory._28_4_ + 0x30) == 0)) {
uVar8 = *(uint *)(this + 0x1c);
}
else {
iVar3 = *(int *)pAVar12;
*(Action<Spitter> **)pdVar13 = pAVar12;
pcVar4 = *(code **)(iVar3 + 0xac);
*(undefined4 *)((int)pdVar13 + -4) = 0xad0bed;
uVar8 = (*pcVar4)();
local_40 = (int *)(*(int *)(this + 8) + 0x11);
iVar3 = **(int **)(this + 0x1c);
*(int **)pdVar13 = *(int **)(this + 0x1c);
pcVar4 = *(code **)(iVar3 + 0x9a4);
*(undefined4 *)((int)pdVar13 + -4) = 0xad0c06;
uVar9 = (*pcVar4)();
fVar2 = *(float *)(gpGlobals + 0xc);
*(uint *)(pdVar13 + 3) = uVar9;
*(uint *)(pdVar13 + 4) = uVar8;
*(char **)((int)pdVar13 + 0x24) = "OnUnStuck";
*(int **)((int)pdVar13 + 0x1c) = local_40;
pdVar13[2] = (double)fVar2;
*(char **)((int)pdVar13 + 0xc) = "%3.2f: %s:%s: %s received EVENT %s\n";
*(undefined1 **)(pdVar13 + 1) = &local_24;
*(uint *)((int)pdVar13 + 4) = 0x80;
local_24 = 100;
local_23 = 100;
local_22 = 100;
local_21 = 0xff;
*(int *)pdVar13 = *(int *)(this + 0x1c) + 0x4028;
*(undefined4 *)((int)pdVar13 + -4) = 0xad0c68;
INextBot::DebugConColorMsg();
uVar8 = *(uint *)(this + 0x1c);
}
}
iVar3 = *(int *)pAVar12;
*(uint *)(pdVar13 + 1) = uVar8;
*(Action<Spitter> **)((int)pdVar13 + 4) = pAVar12;
*(int **)pdVar13 = &local_34;
pcVar4 = *(code **)(iVar3 + 0xe0);
*(undefined4 *)((int)pdVar13 + -4) = 0xad0ba6;
(*pcVar4)();
if (local_34 != 0) {
iVar3 = *(int *)(this + 0x1c);
piVar10 = local_30;
if ((iVar3 != 0) && ((int *)(local_34 - 1U) < (int *)0x3)) {
*(undefined4 *)pdVar13 = 1;
*(int *)((int)pdVar13 + -4) = iVar3 + 0x4028;
local_44 = local_30;
*(undefined4 *)(pdVar13 + -1) = 0xad0d5b;
local_40 = (int *)(local_34 - 1U);
cVar7 = INextBot::IsDebugging(*(INextBot **)((int)pdVar13 + -4),*(uint *)pdVar13);
if ((cVar7 != '\0') ||
(piVar10 = local_44, *(int *)(NextBotDebugHistory._28_4_ + 0x30) != 0)) {
local_48 = local_44;
local_44 = local_40;
local_40 = (int *)(*(int *)(this + 8) + 0x11);
iVar3 = **(int **)(this + 0x1c);
*(int **)((int)pdVar13 + -4) = *(int **)(this + 0x1c);
pcVar4 = *(code **)(iVar3 + 0x9a4);
*(undefined4 *)(pdVar13 + -1) = 0xad0d92;
uVar8 = (*pcVar4)();
fVar2 = *(float *)(gpGlobals + 0xc);
*(uint *)((int)pdVar13 + 0x14) = uVar8;
*(int **)(pdVar13 + 3) = local_40;
*(char **)(pdVar13 + 1) = "%3.2f: %s:%s: ";
*(double *)((int)pdVar13 + 0xc) = (double)fVar2;
*(undefined1 **)((int)pdVar13 + 4) = &local_24;
*(undefined4 *)pdVar13 = 1;
local_24 = 0xff;
local_23 = 0xff;
local_22 = 0;
local_21 = 0xff;
*(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
*(undefined4 *)(pdVar13 + -1) = 0xad0de8;
INextBot::DebugConColorMsg();
iVar3 = *(int *)pAVar12;
*(Action<Spitter> **)((int)pdVar13 + -4) = pAVar12;
pcVar4 = *(code **)(iVar3 + 0xac);
*(undefined4 *)(pdVar13 + -1) = 0xad0df3;
uVar8 = (*pcVar4)();
*(char **)(pdVar13 + 1) = "%s ";
*(uint *)((int)pdVar13 + 0xc) = uVar8;
*(undefined1 **)((int)pdVar13 + 4) = &local_24;
*(undefined4 *)pdVar13 = 1;
local_24 = 0xff;
local_23 = 0xff;
local_22 = 0xff;
local_21 = 0xff;
*(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
*(undefined4 *)(pdVar13 + -1) = 0xad0e2e;
INextBot::DebugConColorMsg();
*(char **)((int)pdVar13 + 0xc) = "OnUnStuck";
*(char **)(pdVar13 + 1) = "reponded to EVENT %s with ";
*(undefined1 **)((int)pdVar13 + 4) = &local_24;
*(undefined4 *)pdVar13 = 1;
local_24 = 0xff;
local_23 = 0xff;
local_22 = 0;
local_21 = 0xff;
*(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
*(undefined4 *)(pdVar13 + -1) = 0xad0e6d;
INextBot::DebugConColorMsg();
puVar11 = &DAT_00d539c2;
local_40 = local_48;
if (local_48 != (int *)0x0) {
iVar3 = *local_48;
*(int **)((int)pdVar13 + -4) = local_48;
pcVar4 = *(code **)(iVar3 + 0xa4);
*(undefined4 *)(pdVar13 + -1) = 0xad0e8d;
puVar11 = (undefined1 *)(*pcVar4)();
}
uVar8 = *(uint *)(CSWTCH_3074 + (int)local_44 * 4);
*(undefined1 **)(pdVar13 + 2) = puVar11;
*(char **)(pdVar13 + 1) = "%s %s ";
*(undefined1 **)((int)pdVar13 + 4) = &local_24;
*(undefined4 *)pdVar13 = 1;
*(uint *)((int)pdVar13 + 0xc) = uVar8;
local_24 = 0xff;
local_23 = 0;
local_22 = 0;
local_21 = 0xff;
*(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
*(undefined4 *)(pdVar13 + -1) = 0xad0edc;
INextBot::DebugConColorMsg();
*(undefined **)(pdVar13 + 1) = &DAT_00c5799e;
*(undefined4 *)pdVar13 = 1;
local_24 = 0;
local_23 = 0xff;
puVar11 = &DAT_00d539c2;
if (local_2c != (undefined1 *)0x0) {
puVar11 = local_2c;
}
local_22 = 0;
local_21 = 0xff;
*(undefined1 **)((int)pdVar13 + 0xc) = puVar11;
*(undefined1 **)((int)pdVar13 + 4) = &local_24;
*(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
*(undefined4 *)(pdVar13 + -1) = 0xad0f24;
INextBot::DebugConColorMsg();
piVar10 = local_40;
}
}
if (*(int *)(pAVar12 + 0x2c) < local_28) {
local_30 = piVar10;
if (local_28 != 0) goto LAB_00ad0cff;
}
else {
if ((local_28 != *(int *)(pAVar12 + 0x2c)) || (*(int *)(pAVar12 + 0x20) != 4)) {
if ((local_28 == 3) && (*(int *)(developer._28_4_ + 0x30) != 0)) {
iVar3 = *(int *)pAVar12;
*(Action<Spitter> **)((int)pdVar13 + -4) = pAVar12;
pcVar4 = *(code **)(iVar3 + 0xa4);
*(undefined4 *)(pdVar13 + -1) = 0xad0f59;
local_40 = piVar10;
uVar8 = (*pcVar4)();
*(char **)((int)pdVar13 + 0xc) = "OnUnStuck";
*(uint *)(pdVar13 + 1) = uVar8;
fVar2 = *(float *)(gpGlobals + 0xc);
*(char **)((int)pdVar13 + -4) = "%3.2f: WARNING: %s::%s() RESULT_CRITICAL collision\n"
;
*pdVar13 = (double)fVar2;
*(undefined4 *)(pdVar13 + -1) = 0xad0f84;
DevMsg(*(char **)((int)pdVar13 + -4));
piVar10 = local_40;
}
if (piVar10 != (int *)0x0) {
iVar3 = *piVar10;
*(int **)((int)pdVar13 + -4) = piVar10;
pcVar4 = *(code **)(iVar3 + 4);
*(undefined4 *)(pdVar13 + -1) = 0xad0c8b;
(*pcVar4)();
}
break;
}
LAB_00ad0cff:
piVar5 = *(int **)(pAVar12 + 0x24);
local_30 = piVar10;
if (piVar5 != (int *)0x0) {
iVar3 = *piVar5;
*(int **)((int)pdVar13 + -4) = piVar5;
pcVar4 = *(code **)(iVar3 + 4);
*(undefined4 *)(pdVar13 + -1) = 0xad0d11;
local_40 = piVar10;
(*pcVar4)();
local_30 = local_40;
}
}
*(int *)(pAVar12 + 0x20) = local_34;
*(int **)(pAVar12 + 0x24) = local_30;
*(undefined1 **)(pAVar12 + 0x28) = local_2c;
*(int *)(pAVar12 + 0x2c) = local_28;
iVar3 = *(int *)this;
*(Action<Spitter> **)((int)pdVar13 + -4) = this;
pcVar4 = *(code **)(iVar3 + 8);
*(undefined4 *)(pdVar13 + -1) = 0xad0d34;
piVar10 = (int *)(*pcVar4)();
goto joined_r0x00ad0d38;
}
pAVar1 = pAVar12 + 0x14;
pAVar12 = *(Action<Spitter> **)pAVar1;
pdVar6 = (double *)((int)pdVar13 + -4);
} while (*(Action<Spitter> **)pAVar1 != (Action<Spitter> *)0x0);
iVar3 = *(int *)this;
*(Action<Spitter> **)((int)pdVar13 + -4) = this;
pcVar4 = *(code **)(iVar3 + 8);
*(undefined4 *)(pdVar13 + -1) = 0xad0c93;
piVar10 = (int *)(*pcVar4)();
joined_r0x00ad0d38:
while (puVar14 = (uint *)((int)pdVar13 + -4), piVar10 != (int *)0x0) {
iVar3 = *piVar10;
*(int **)((int)pdVar13 + -4) = piVar10;
pcVar4 = *(code **)(iVar3 + 0x2c);
*(undefined4 *)(pdVar13 + -1) = 0xad0cc8;
(*pcVar4)();
iVar3 = *(int *)this;
*(int **)pdVar13 = piVar10;
*(Action<Spitter> **)((int)pdVar13 + -4) = this;
pcVar4 = *(code **)(iVar3 + 0xc);
*(undefined4 *)(pdVar13 + -1) = 0xad0cd4;
piVar10 = (int *)(*pcVar4)();
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
puVar14[-1] = (uint)&UNK_00ad0f91;
__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.