ILocomotion::Update
0x00757770 · 632 bytes · __thiscall
_ZN11ILocomotion6UpdateEv
Decompiled
undefined (1 param)
/* ILocomotion::Update() */
void __thiscall ILocomotion::Update(ILocomotion *this)
{
float fVar1;
float fVar2;
char cVar3;
float *pfVar4;
INextBot *this_00;
Vector *pVVar5;
float fVar6;
float fVar7;
float local_18;
float local_14;
float local_10;
StuckMonitor(this);
pfVar4 = (float *)(**(code **)(*(int *)this + 0x144))(this);
fVar6 = SQRT(pfVar4[2] * pfVar4[2] + *pfVar4 * *pfVar4 + pfVar4[1] * pfVar4[1]);
*(float *)(this + 0x2c) = fVar6;
fVar7 = SQRT(pfVar4[1] * pfVar4[1] + *pfVar4 * *pfVar4);
*(float *)(this + 0x30) = fVar7;
if (10.0 < fVar6) {
fVar6 = 1.0 / fVar6;
fVar1 = pfVar4[2];
fVar2 = *pfVar4;
*(float *)(this + 0x18) = pfVar4[1] * fVar6;
*(float *)(this + 0x1c) = fVar1 * fVar6;
*(float *)(this + 0x14) = fVar6 * fVar2;
}
if (10.0 < fVar7) {
*(float *)(this + 0x20) = *pfVar4 / fVar7;
fVar6 = pfVar4[1];
*(undefined4 *)(this + 0x28) = 0;
*(float *)(this + 0x24) = fVar6 / fVar7;
}
this_00 = (INextBot *)(**(code **)(*(int *)this + 0xb0))(this);
cVar3 = INextBot::IsDebugging(this_00,0x10);
if (cVar3 != '\0') {
fVar6 = *(float *)(this + 0x20);
fVar7 = *(float *)(this + 0x24);
fVar1 = *(float *)(this + 0x28);
pfVar4 = (float *)(**(code **)(*(int *)this + 300))(this);
local_18 = fVar6 * 25.0 + *pfVar4;
local_14 = fVar7 * 25.0 + pfVar4[1];
local_10 = fVar1 * 25.0 + pfVar4[2];
pVVar5 = (Vector *)(**(code **)(*(int *)this + 300))(this);
NDebugOverlay::HorzArrow(pVVar5,(Vector *)&local_18,3.0,100,0xff,0,0xff,true,0.1);
fVar6 = *(float *)(this + 0x14);
fVar7 = *(float *)(this + 0x18);
fVar1 = *(float *)(this + 0x1c);
pfVar4 = (float *)(**(code **)(*(int *)this + 300))(this);
local_18 = fVar6 * 25.0 + *pfVar4;
local_14 = fVar7 * 25.0 + pfVar4[1];
local_10 = fVar1 * 25.0 + pfVar4[2];
pVVar5 = (Vector *)(**(code **)(*(int *)this + 300))(this);
NDebugOverlay::HorzArrow(pVVar5,(Vector *)&local_18,5.0,0xff,0xff,0,0xff,true,0.1);
}
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.