Action<Infected>::OnModelChanged
0x00a1e190 · 1093 bytes · __thiscall
_ZN6ActionI8InfectedE14OnModelChangedEv
Decompiled
undefined (1 param)
/* Action<Infected>::OnModelChanged() */
void __thiscall Action<Infected>::OnModelChanged(Action<Infected> *this)
{
Action<Infected> *pAVar1;
float fVar2;
int iVar3;
code *pcVar4;
int *piVar5;
double *pdVar6;
char cVar7;
uint uVar8;
uint uVar9;
int *piVar10;
undefined1 *puVar11;
Action<Infected> *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<Infected>)0x0) {
do {
pdVar13 = pdVar6;
iVar3 = *(int *)(this + 0x1c);
uVar8 = 0;
if (iVar3 != 0) {
*(uint *)((int)pdVar13 + 4) = 0x80;
*(int *)pdVar13 = iVar3 + 0x1a3c;
*(undefined4 *)((int)pdVar13 + -4) = 0xa1e21e;
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<Infected> **)pdVar13 = pAVar12;
pcVar4 = *(code **)(iVar3 + 0xac);
*(undefined4 *)((int)pdVar13 + -4) = 0xa1e22d;
uVar8 = (*pcVar4)();
local_40 = (int *)(*(int *)(this + 8) + 0x11);
iVar3 = *(int *)(*(int *)(this + 0x1c) + 0x1a3c);
*(int *)pdVar13 = *(int *)(this + 0x1c) + 0x1a3c;
pcVar4 = *(code **)(iVar3 + 0x13c);
*(undefined4 *)((int)pdVar13 + -4) = 0xa1e250;
uVar9 = (*pcVar4)();
fVar2 = *(float *)(gpGlobals + 0xc);
*(uint *)(pdVar13 + 3) = uVar9;
*(uint *)(pdVar13 + 4) = uVar8;
*(char **)((int)pdVar13 + 0x24) = "OnModelChanged";
*(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) + 0x1a3c;
*(undefined4 *)((int)pdVar13 + -4) = 0xa1e2b2;
INextBot::DebugConColorMsg();
uVar8 = *(uint *)(this + 0x1c);
}
}
iVar3 = *(int *)pAVar12;
*(uint *)(pdVar13 + 1) = uVar8;
*(Action<Infected> **)((int)pdVar13 + 4) = pAVar12;
*(int **)pdVar13 = &local_34;
pcVar4 = *(code **)(iVar3 + 0x11c);
*(undefined4 *)((int)pdVar13 + -4) = 0xa1e1e6;
(*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 + 0x1a3c;
local_44 = local_30;
*(undefined4 *)(pdVar13 + -1) = 0xa1e3ab;
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 *)(*(int *)(this + 0x1c) + 0x1a3c);
*(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x1a3c;
pcVar4 = *(code **)(iVar3 + 0x13c);
*(undefined4 *)(pdVar13 + -1) = 0xa1e3ec;
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) + 0x1a3c;
*(undefined4 *)(pdVar13 + -1) = 0xa1e442;
INextBot::DebugConColorMsg();
iVar3 = *(int *)pAVar12;
*(Action<Infected> **)((int)pdVar13 + -4) = pAVar12;
pcVar4 = *(code **)(iVar3 + 0xac);
*(undefined4 *)(pdVar13 + -1) = 0xa1e44d;
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) + 0x1a3c;
*(undefined4 *)(pdVar13 + -1) = 0xa1e488;
INextBot::DebugConColorMsg();
*(char **)((int)pdVar13 + 0xc) = "OnModelChanged";
*(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) + 0x1a3c;
*(undefined4 *)(pdVar13 + -1) = 0xa1e4c7;
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) = 0xa1e4e7;
puVar11 = (undefined1 *)(*pcVar4)();
}
uVar8 = *(uint *)(CSWTCH_2654 + (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) + 0x1a3c;
*(undefined4 *)(pdVar13 + -1) = 0xa1e536;
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) + 0x1a3c;
*(undefined4 *)(pdVar13 + -1) = 0xa1e57e;
INextBot::DebugConColorMsg();
piVar10 = local_40;
}
}
if (*(int *)(pAVar12 + 0x2c) < local_28) {
local_30 = piVar10;
if (local_28 != 0) goto LAB_00a1e34f;
}
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<Infected> **)((int)pdVar13 + -4) = pAVar12;
pcVar4 = *(code **)(iVar3 + 0xa4);
*(undefined4 *)(pdVar13 + -1) = 0xa1e5b3;
local_40 = piVar10;
uVar8 = (*pcVar4)();
*(char **)((int)pdVar13 + 0xc) = "OnModelChanged";
*(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) = 0xa1e5de;
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) = 0xa1e2db;
(*pcVar4)();
}
break;
}
LAB_00a1e34f:
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) = 0xa1e361;
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<Infected> **)((int)pdVar13 + -4) = this;
pcVar4 = *(code **)(iVar3 + 8);
*(undefined4 *)(pdVar13 + -1) = 0xa1e384;
piVar10 = (int *)(*pcVar4)();
goto joined_r0x00a1e388;
}
pAVar1 = pAVar12 + 0x14;
pAVar12 = *(Action<Infected> **)pAVar1;
pdVar6 = (double *)((int)pdVar13 + -4);
} while (*(Action<Infected> **)pAVar1 != (Action<Infected> *)0x0);
iVar3 = *(int *)this;
*(Action<Infected> **)((int)pdVar13 + -4) = this;
pcVar4 = *(code **)(iVar3 + 8);
*(undefined4 *)(pdVar13 + -1) = 0xa1e2e3;
piVar10 = (int *)(*pcVar4)();
joined_r0x00a1e388:
while (puVar14 = (uint *)((int)pdVar13 + -4), piVar10 != (int *)0x0) {
iVar3 = *piVar10;
*(int **)((int)pdVar13 + -4) = piVar10;
pcVar4 = *(code **)(iVar3 + 0x68);
*(undefined4 *)(pdVar13 + -1) = 0xa1e318;
(*pcVar4)();
iVar3 = *(int *)this;
*(int **)pdVar13 = piVar10;
*(Action<Infected> **)((int)pdVar13 + -4) = this;
pcVar4 = *(code **)(iVar3 + 0xc);
*(undefined4 *)(pdVar13 + -1) = 0xa1e324;
piVar10 = (int *)(*pcVar4)();
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return;
}
/* WARNING: Subroutine does not return */
puVar14[-1] = (uint)&UNK_00a1e5eb;
__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.