ILocomotion::StuckMonitor
0x00757140 · 1528 bytes · __thiscall
_ZN11ILocomotion12StuckMonitorEv
Decompiled
undefined (1 param)
/* ILocomotion::StuckMonitor() */
void __thiscall ILocomotion::StuckMonitor(ILocomotion *this)
{
Vector *pVVar1;
float fVar2;
float fVar3;
float fVar4;
char cVar5;
int *piVar6;
INextBot *pIVar7;
undefined4 *puVar8;
undefined4 uVar9;
Vector *pVVar10;
longdouble lVar11;
longdouble lVar12;
undefined4 local_34;
undefined4 local_30;
float local_2c;
undefined4 local_28;
undefined4 local_24;
undefined4 local_20;
lVar11 = (longdouble)IntervalTimer::Now();
if (0.25 < (float)lVar11 - *(float *)(this + 0x5c)) {
puVar8 = (undefined4 *)(**(code **)(*(int *)this + 300))(this);
*(undefined4 *)(this + 0x4c) = *puVar8;
*(undefined4 *)(this + 0x50) = puVar8[1];
*(undefined4 *)(this + 0x54) = puVar8[2];
LAB_0075736b:
lVar11 = (longdouble)IntervalTimer::Now();
if ((float)lVar11 != *(float *)(this + 0x3c)) {
(**(code **)(*(int *)(this + 0x38) + 4))(this + 0x38,this + 0x3c);
*(float *)(this + 0x3c) = (float)lVar11;
}
return;
}
cVar5 = (**(code **)(*(int *)this + 0x168))();
if (cVar5 == '\0') {
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
pVVar1 = (Vector *)(this + 0x4c);
cVar5 = (**(code **)(*piVar6 + 0x120))(piVar6,pVVar1);
if (cVar5 != '\0') {
puVar8 = (undefined4 *)(**(code **)(*(int *)this + 300))(this);
*(undefined4 *)(this + 0x4c) = *puVar8;
*(undefined4 *)(this + 0x50) = puVar8[1];
*(undefined4 *)(this + 0x54) = puVar8[2];
pIVar7 = (INextBot *)(**(code **)(*(int *)this + 0xb0))(this);
cVar5 = INextBot::IsDebugging(pIVar7,0x10);
if (cVar5 != '\0') {
NDebugOverlay::Cross3D(pVVar1,3.0,0xff,0,0xff,true,3.0);
}
goto LAB_0075736b;
}
pIVar7 = (INextBot *)(**(code **)(*(int *)this + 0xb0))();
cVar5 = INextBot::IsDebugging(pIVar7,0x10);
if (cVar5 != '\0') {
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
piVar6 = (int *)(**(code **)(*piVar6 + 0xb4))(piVar6);
pVVar10 = (Vector *)(**(code **)(*piVar6 + 0x288))(piVar6);
NDebugOverlay::Line(pVVar10,pVVar1,0xff,0,0xff,true,0.1);
}
lVar11 = (longdouble)(**(code **)(*(int *)this + 0xec))(this);
lVar12 = (longdouble)IntervalTimer::Now();
if ((float)lVar12 - *(float *)(this + 0x3c) <= 100.0 / (((float)lVar11 + 1.0) * 0.1)) {
return;
}
this[0x34] = (ILocomotion)0x1;
pIVar7 = (INextBot *)(**(code **)(*(int *)this + 0xb0))(this);
cVar5 = INextBot::IsDebugging(pIVar7,0x100);
if (cVar5 != '\0') {
fVar2 = *(float *)(this + 0x54);
fVar3 = *(float *)(this + 0x50);
fVar4 = *(float *)(this + 0x4c);
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
uVar9 = (**(code **)(*piVar6 + 0x13c))(piVar6);
DevMsg("%3.2f: %s STUCK at position( %3.2f, %3.2f, %3.2f )\n",
(double)*(float *)(gpGlobals + 0xc),uVar9,(double)fVar4,(double)fVar3,(double)fVar2);
local_34 = *(undefined4 *)(this + 0x4c);
local_30 = *(undefined4 *)(this + 0x50);
local_28 = 0xc2b40000;
local_24 = 0;
local_2c = *(float *)(this + 0x54) + 15.0;
local_20 = 0;
NDebugOverlay::Circle((Vector *)&local_34,(QAngle *)&local_28,3.0,0xff,0xff,0,0xff,true,1.0);
local_28 = 0xc2b40000;
local_34 = *(undefined4 *)(this + 0x4c);
local_24 = 0;
local_20 = 0;
local_30 = *(undefined4 *)(this + 0x50);
local_2c = *(float *)(this + 0x54) + 5.0;
NDebugOverlay::Circle((Vector *)&local_34,(QAngle *)&local_28,5.0,0xff,0,0,0xff,true,1e+07);
}
lVar11 = (longdouble)IntervalTimer::Now();
if ((float)lVar11 != *(float *)(this + 0x3c)) {
(**(code **)(*(int *)(this + 0x38) + 4))(this + 0x38,this + 0x3c);
*(float *)(this + 0x3c) = (float)lVar11;
}
}
else {
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))();
cVar5 = (**(code **)(*piVar6 + 0x120))(piVar6,this + 0x4c);
if (cVar5 != '\0') {
(**(code **)(*(int *)this + 0x170))(this,"UN-STUCK");
return;
}
lVar11 = (longdouble)CountdownTimer::Now();
if ((float)lVar11 < *(float *)(this + 0x48)) {
return;
}
lVar11 = (longdouble)CountdownTimer::Now();
if ((float)lVar11 + 1.0 != *(float *)(this + 0x48)) {
(**(code **)(*(int *)(this + 0x40) + 4))(this + 0x40,this + 0x48);
*(float *)(this + 0x48) = (float)lVar11 + 1.0;
}
if (*(float *)(this + 0x44) != 1.0) {
(**(code **)(*(int *)(this + 0x40) + 4))(this + 0x40,this + 0x44);
*(undefined4 *)(this + 0x44) = 0x3f800000;
}
pIVar7 = (INextBot *)(**(code **)(*(int *)this + 0xb0))(this);
cVar5 = INextBot::IsDebugging(pIVar7,0x10);
if (cVar5 != '\0') {
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
uVar9 = (**(code **)(*piVar6 + 0x13c))(piVar6);
DevMsg("%3.2f: %s STILL STUCK\n",(double)*(float *)(gpGlobals + 0xc),uVar9);
local_34 = *(undefined4 *)(this + 0x4c);
local_28 = 0xc2b40000;
local_30 = *(undefined4 *)(this + 0x50);
local_2c = *(float *)(this + 0x54) + 5.0;
local_24 = 0;
local_20 = 0;
NDebugOverlay::Circle((Vector *)&local_34,(QAngle *)&local_28,5.0,0xff,0,0,0xff,true,1.0);
}
}
piVar6 = (int *)(**(code **)(*(int *)this + 0xb0))(this);
(**(code **)(*piVar6 + 0x28))(piVar6);
return;
}
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.