CGameMovement::FixPlayerCrouchStuck
0x0045ba40 · 292 bytes · __thiscall
_ZN13CGameMovement20FixPlayerCrouchStuckEb
Decompiled
undefined (2 params)
/* WARNING: Type propagation algorithm not settling */
/* CGameMovement::FixPlayerCrouchStuck(bool) */
void __thiscall CGameMovement::FixPlayerCrouchStuck(CGameMovement *this,bool param_1)
{
int iVar1;
code *pcVar2;
int iVar3;
int iVar4;
int *piVar5;
float fVar6;
int aiStack_b4 [2];
int *local_ac;
CGameMovement *local_a8;
int local_a4 [2];
undefined1 *local_9c;
float local_8c;
undefined4 local_88;
undefined4 local_84;
float local_80;
int local_74;
undefined1 local_70 [96];
local_a4[1] = 8;
local_a8 = this;
local_a4[0] = *(int *)(this + 8) + 0x9c;
local_ac = &local_74;
aiStack_b4[1] = 0x45ba80;
local_9c = local_70;
(**(code **)(*(int *)this + 0xf8))();
piVar5 = aiStack_b4 + 1;
if (local_74 != -1) {
iVar3 = *(int *)(this + 8);
local_80 = (float)param_1;
iVar4 = 0x24;
fVar6 = *(float *)(iVar3 + 0xa4);
local_84 = *(undefined4 *)(iVar3 + 0x9c);
local_88 = *(undefined4 *)(iVar3 + 0xa0);
local_8c = fVar6;
while( true ) {
*(float *)(iVar3 + 0xa4) = fVar6 + local_80;
iVar3 = *(int *)this;
piVar5[4] = (int)local_70;
piVar5[3] = 8;
iVar1 = *(int *)(this + 8);
piVar5[1] = (int)this;
piVar5[2] = iVar1 + 0x9c;
*piVar5 = (int)&local_74;
pcVar2 = *(code **)(iVar3 + 0xf8);
piVar5[-1] = 0x45bb20;
(*pcVar2)();
piVar5 = piVar5 + -1;
if (local_74 == -1) break;
iVar4 = iVar4 + -1;
if (iVar4 == 0) {
iVar3 = *(int *)(this + 8);
*(undefined4 *)(iVar3 + 0x9c) = local_84;
*(undefined4 *)(iVar3 + 0xa0) = local_88;
*(float *)(iVar3 + 0xa4) = local_8c;
return;
}
iVar3 = *(int *)(this + 8);
fVar6 = *(float *)(iVar3 + 0xa4);
}
}
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.