CGameMovement::ProcessMovement
0x004526b0 · 487 bytes · __thiscall
_ZN13CGameMovement15ProcessMovementEP11CBasePlayerP9CMoveData
Decompiled
undefined (3 params)
/* CGameMovement::ProcessMovement(CBasePlayer*, CMoveData*) */
void __thiscall
CGameMovement::ProcessMovement(CGameMovement *this,CBasePlayer *param_1,CMoveData *param_2)
{
float fVar1;
char cVar2;
CGameMovement *pCVar3;
int iVar4;
CGameMovement *pCVar5;
iVar4 = gpGlobals;
*(undefined4 *)(this + 2000) = 0;
pCVar5 = this + 0x3c;
fVar1 = *(float *)(iVar4 + 0x10);
*(float *)(iVar4 + 0x10) = *(float *)(param_1 + 0x20cc) * fVar1;
*(undefined4 *)(this + 0x7d4) = 0;
*(undefined4 *)(this + 0x7d8) = 0;
*(undefined4 *)(this + 0x7dc) = 0x3f800000;
do {
pCVar3 = pCVar5;
do {
*(undefined4 *)pCVar3 = 0xffffd8f1;
pCVar3 = pCVar3 + 0xc;
} while (pCVar3 != pCVar5 + 0x180);
pCVar5 = pCVar5 + 4;
} while (pCVar5 != this + 0x48);
*(CBasePlayer **)(this + 4) = param_1;
this[0x63c] = (CGameMovement)0x0;
*(CMoveData **)(this + 8) = param_2;
*(undefined4 *)(param_2 + 0x38) = *(undefined4 *)(sv_maxspeed._28_4_ + 0x2c);
iVar4 = *(int *)(this + 8);
this[0x63d] = (CGameMovement)0x1;
this[0x63e] = (CGameMovement)0x0;
(**(code **)(*(int *)this + 0x18))
(this,"start %f %f %f",(double)*(float *)(iVar4 + 0x9c),(double)*(float *)(iVar4 + 0xa0)
,(double)*(float *)(iVar4 + 0xa4));
(**(code **)(*(int *)this + 0x44))(this);
*(undefined4 *)(*(int *)(this + 8) + 0x28) = *(undefined4 *)(*(int *)(this + 8) + 0x24);
iVar4 = *(int *)(this + 8);
(**(code **)(*(int *)this + 0x18))
(this,"end %f %f %f",(double)*(float *)(iVar4 + 0x9c),(double)*(float *)(iVar4 + 0xa0),
(double)*(float *)(iVar4 + 0xa4));
*(float *)(gpGlobals + 0x10) = fVar1;
this[0x63d] = (CGameMovement)0x0;
cVar2 = (**(code **)(**(int **)(this + 4) + 0x778))(*(int **)(this + 4));
if (cVar2 == '\0') {
if (ProcessMovement(CBasePlayer*,CMoveData*)::_counter == '\0') {
iVar4 = __cxa_guard_acquire(&ProcessMovement(CBasePlayer*,CMoveData*)::_counter);
if (iVar4 != 0) {
/* try { // try from 00452863 to 00452867 has its CatchHandler @ 00452897 */
ProcessMovement(CBasePlayer*,CMoveData*)::_counter =
(int *)CVProfile::FindOrCreateCounter(&g_VProfCurrentProfile,"PlayerMovementTraces",0);
__cxa_guard_release(&ProcessMovement(CBasePlayer*,CMoveData*)::_counter);
__cxa_atexit(CVProfCounter::~CVProfCounter,
&ProcessMovement(CBasePlayer*,CMoveData*)::_counter,&__dso_handle);
}
}
*ProcessMovement(CBasePlayer*,CMoveData*)::_counter =
*ProcessMovement(CBasePlayer*,CMoveData*)::_counter + *(int *)(this + 2000);
}
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.