CGameMovement::StepMove
0x00451ec0 · 1076 bytes · __thiscall
_ZN13CGameMovement8StepMoveER6VectorR10CGameTrace
Decompiled
undefined (3 params)
/* CGameMovement::StepMove(Vector&, CGameTrace&) */
void __thiscall CGameMovement::StepMove(CGameMovement *this,Vector *param_1,CGameTrace *param_2)
{
float fVar1;
float fVar2;
undefined4 uVar3;
undefined4 uVar4;
float fVar5;
undefined4 uVar6;
float fVar7;
undefined4 uVar8;
undefined4 uVar9;
undefined4 uVar10;
code *pcVar11;
undefined4 uVar12;
int iVar13;
longdouble lVar14;
float fVar15;
float fVar16;
float fVar17;
undefined4 local_28;
undefined4 local_24;
float local_20;
iVar13 = *(int *)(this + 8);
local_28 = *(undefined4 *)param_1;
local_24 = *(undefined4 *)(param_1 + 4);
fVar1 = *(float *)(iVar13 + 0x9c);
fVar2 = *(float *)(iVar13 + 0xa0);
fVar15 = *(float *)(iVar13 + 0xa4);
uVar12 = *(undefined4 *)(iVar13 + 0x40);
uVar3 = *(undefined4 *)(iVar13 + 0x44);
uVar4 = *(undefined4 *)(iVar13 + 0x48);
local_20 = *(float *)(param_1 + 8);
(**(code **)(*(int *)this + 0x9c))(this,&local_28,param_2);
iVar13 = *(int *)(this + 8);
fVar5 = *(float *)(iVar13 + 0x9c);
*(float *)(iVar13 + 0x9c) = fVar1;
uVar6 = *(undefined4 *)(iVar13 + 0x40);
fVar7 = *(float *)(iVar13 + 0xa0);
*(float *)(iVar13 + 0xa0) = fVar2;
uVar8 = *(undefined4 *)(iVar13 + 0x44);
uVar9 = *(undefined4 *)(iVar13 + 0xa4);
*(float *)(iVar13 + 0xa4) = fVar15;
uVar10 = *(undefined4 *)(iVar13 + 0x48);
iVar13 = *(int *)(this + 8);
*(undefined4 *)(iVar13 + 0x40) = uVar12;
*(undefined4 *)(iVar13 + 0x44) = uVar3;
*(undefined4 *)(iVar13 + 0x48) = uVar4;
iVar13 = *(int *)(this + 8);
local_28 = *(undefined4 *)(iVar13 + 0x9c);
local_24 = *(undefined4 *)(iVar13 + 0xa0);
local_20 = *(float *)(iVar13 + 0xa4);
if (*(char *)(*(int *)(this + 4) + 0x1ad0) != '\0') {
local_20 = local_20 + 0.03125 + *(float *)(*(int *)(this + 4) + 0x1acc);
}
pcVar11 = *(code **)(*(int *)this + 0x3c);
uVar12 = (**(code **)(*(int *)this + 0x40))(this,0,0);
(*pcVar11)(this,*(int *)(this + 8) + 0x9c,&local_28,uVar12,8,param_2);
if ((param_2[0x37] == (CGameTrace)0x0) && (param_2[0x36] == (CGameTrace)0x0)) {
iVar13 = *(int *)(this + 8);
*(undefined4 *)(iVar13 + 0x9c) = *(undefined4 *)(param_2 + 0xc);
*(undefined4 *)(iVar13 + 0xa0) = *(undefined4 *)(param_2 + 0x10);
*(undefined4 *)(iVar13 + 0xa4) = *(undefined4 *)(param_2 + 0x14);
}
(**(code **)(*(int *)this + 0x9c))(this,0,0);
iVar13 = *(int *)(this + 8);
local_28 = *(undefined4 *)(iVar13 + 0x9c);
local_24 = *(undefined4 *)(iVar13 + 0xa0);
local_20 = *(float *)(iVar13 + 0xa4);
if (*(char *)(*(int *)(this + 4) + 0x1ad0) != '\0') {
local_20 = (local_20 + -0.0625) - *(float *)(*(int *)(this + 4) + 0x1acc);
}
pcVar11 = *(code **)(*(int *)this + 0x3c);
uVar12 = (**(code **)(*(int *)this + 0x40))(this,0,0);
(*pcVar11)(this,*(int *)(this + 8) + 0x9c,&local_28,uVar12,8,param_2);
fVar16 = *(float *)(param_2 + 0x20);
lVar14 = (longdouble)(**(code **)(*(int *)this + 0x38))(this);
if ((float)lVar14 <= fVar16) {
if ((param_2[0x37] == (CGameTrace)0x0) && (param_2[0x36] == (CGameTrace)0x0)) {
iVar13 = *(int *)(this + 8);
*(undefined4 *)(iVar13 + 0x9c) = *(undefined4 *)(param_2 + 0xc);
*(undefined4 *)(iVar13 + 0xa0) = *(undefined4 *)(param_2 + 0x10);
*(undefined4 *)(iVar13 + 0xa4) = *(undefined4 *)(param_2 + 0x14);
}
iVar13 = *(int *)(this + 8);
fVar16 = *(float *)(iVar13 + 0x9c) - fVar1;
fVar17 = *(float *)(iVar13 + 0xa0) - fVar2;
if (fVar16 * fVar16 + fVar17 * fVar17 <
(fVar5 - fVar1) * (fVar5 - fVar1) + (fVar7 - fVar2) * (fVar7 - fVar2)) {
*(float *)(iVar13 + 0x9c) = fVar5;
*(float *)(iVar13 + 0xa0) = fVar7;
*(undefined4 *)(iVar13 + 0xa4) = uVar9;
iVar13 = *(int *)(this + 8);
*(undefined4 *)(iVar13 + 0x40) = uVar6;
*(undefined4 *)(iVar13 + 0x44) = uVar8;
*(undefined4 *)(iVar13 + 0x48) = uVar10;
goto LAB_004521bf;
}
}
else {
iVar13 = *(int *)(this + 8);
*(float *)(iVar13 + 0x9c) = fVar5;
*(float *)(iVar13 + 0xa0) = fVar7;
*(undefined4 *)(iVar13 + 0xa4) = uVar9;
iVar13 = *(int *)(this + 8);
*(undefined4 *)(iVar13 + 0x40) = uVar6;
*(undefined4 *)(iVar13 + 0x44) = uVar8;
}
*(undefined4 *)(iVar13 + 0x48) = uVar10;
LAB_004521bf:
iVar13 = *(int *)(this + 8);
fVar15 = *(float *)(iVar13 + 0xa4) - fVar15;
if (0.0 < fVar15) {
*(float *)(iVar13 + 100) = fVar15 + *(float *)(iVar13 + 100);
}
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.