CGameMovement::FinishDuck
0x0045bb70 · 627 bytes · __thiscall
_ZN13CGameMovement10FinishDuckEv
Decompiled
undefined (1 param)
/* CGameMovement::FinishDuck() */
void __thiscall CGameMovement::FinishDuck(CGameMovement *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
code *pcVar11;
undefined4 uVar12;
int iVar13;
int iVar14;
int iVar15;
int *piVar16;
float local_18 [3];
CBaseEntity::AddFlag(*(CBaseEntity **)(this + 4),2);
piVar16 = *(int **)(this + 4);
if ((char)piVar16[0x6a4] != '\x01') {
(**(code **)(piVar16[0x690] + 4))(piVar16 + 0x690,piVar16 + 0x6a4);
*(undefined1 *)(piVar16 + 0x6a4) = 1;
piVar16 = *(int **)(this + 4);
}
if (*(char *)((int)piVar16 + 0x1a91) != '\0') {
(**(code **)(piVar16[0x690] + 4))(piVar16 + 0x690,(int)piVar16 + 0x1a91);
*(undefined1 *)((int)piVar16 + 0x1a91) = 0;
piVar16 = *(int **)(this + 4);
}
pcVar11 = *(code **)(*piVar16 + 0x254);
uVar12 = (**(code **)(*(int *)this + 0x24))(this,1);
(*pcVar11)(*(undefined4 *)(this + 4),uVar12);
iVar13 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(this + 4));
if (iVar13 == 0) {
iVar13 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar14 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar1 = *(float *)(iVar13 + 0xc);
fVar2 = *(float *)(iVar14 + 0x18);
fVar3 = *(float *)(iVar14 + 0x1c);
fVar4 = *(float *)(iVar14 + 0x20);
fVar5 = *(float *)(iVar13 + 0x10);
fVar6 = *(float *)(iVar13 + 0x14);
iVar14 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar15 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar13 = *(int *)(this + 8);
fVar7 = *(float *)(iVar15 + 0x38);
fVar8 = *(float *)(iVar14 + 0x2c);
fVar9 = *(float *)(iVar15 + 0x30);
fVar10 = *(float *)(iVar14 + 0x24);
*(float *)(iVar13 + 0xa0) =
((fVar3 + *(float *)(iVar13 + 0xa0)) - fVar5) -
(*(float *)(iVar15 + 0x34) - *(float *)(iVar14 + 0x28));
*(float *)(iVar13 + 0xa4) = ((fVar4 + *(float *)(iVar13 + 0xa4)) - fVar6) - (fVar7 - fVar8);
*(float *)(iVar13 + 0x9c) = ((fVar2 + *(float *)(iVar13 + 0x9c)) - fVar1) - (fVar9 - fVar10);
}
else {
iVar13 = 0;
do {
iVar14 = *(int *)(this + 8);
local_18[0] = *(float *)(iVar14 + 0x9c);
local_18[1] = *(float *)(iVar14 + 0xa0);
local_18[2] = *(float *)(iVar14 + 0xa4);
iVar14 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar1 = *(float *)(iVar14 + 0x24 + iVar13);
iVar15 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar14 = *(int *)(this + 8);
*(float *)((int)local_18 + iVar13) =
*(float *)((int)local_18 + iVar13) - (fVar1 - *(float *)(iVar15 + 0xc + iVar13));
iVar13 = iVar13 + 4;
*(float *)(iVar14 + 0x9c) = local_18[0];
*(float *)(iVar14 + 0xa0) = local_18[1];
*(float *)(iVar14 + 0xa4) = local_18[2];
} while (iVar13 != 0xc);
}
FixPlayerCrouchStuck(this,true);
(**(code **)(*(int *)this + 0xcc))(this,0);
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.