CCSGameMovement::FinishDuck
0x0042f0d0 · 676 bytes · __thiscall
_ZN15CCSGameMovement10FinishDuckEv
Decompiled
undefined (1 param)
/* CCSGameMovement::FinishDuck() */
void __thiscall CCSGameMovement::FinishDuck(CCSGameMovement *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
float fVar9;
float fVar10;
float fVar11;
float fVar12;
code *pcVar13;
int iVar14;
int iVar15;
undefined4 uVar16;
CBaseEntity *this_00;
float fVar17;
float fVar18;
float fVar19;
iVar14 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar15 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar1 = *(float *)(iVar14 + 0x14);
fVar2 = *(float *)(iVar15 + 0x18);
fVar3 = *(float *)(iVar15 + 0x1c);
fVar4 = *(float *)(iVar15 + 0x20);
fVar5 = *(float *)(iVar14 + 0xc);
fVar6 = *(float *)(iVar14 + 0x10);
iVar14 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar15 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar7 = *(float *)(iVar14 + 0x24);
fVar8 = *(float *)(iVar15 + 0x30);
fVar9 = *(float *)(iVar15 + 0x34);
fVar10 = *(float *)(iVar15 + 0x38);
fVar11 = *(float *)(iVar14 + 0x28);
fVar12 = *(float *)(iVar14 + 0x2c);
pcVar13 = *(code **)(**(int **)(this + 4) + 0x254);
uVar16 = (**(code **)(*(int *)this + 0x24))(this,1);
(*pcVar13)(*(undefined4 *)(this + 4),uVar16);
CBaseEntity::AddFlag(*(CBaseEntity **)(this + 4),2);
this_00 = *(CBaseEntity **)(this + 4);
if (this_00[0x1a91] != (CBaseEntity)0x0) {
(**(code **)(*(int *)(this_00 + 0x1a40) + 4))(this_00 + 0x1a40,this_00 + 0x1a91);
this_00[0x1a91] = (CBaseEntity)0x0;
this_00 = *(CBaseEntity **)(this + 4);
}
if (this_00[0x1a90] == (CBaseEntity)0x0) {
iVar14 = *(int *)(this + 8);
fVar18 = *(float *)(iVar14 + 0x9c);
fVar17 = *(float *)(iVar14 + 0xa0);
fVar19 = *(float *)(iVar14 + 0xa4);
iVar14 = CBaseEntity::GetGroundEntity(this_00);
if (iVar14 == 0) {
fVar18 = ((fVar18 - fVar5) + fVar2) - (fVar8 - fVar7);
fVar17 = ((fVar17 - fVar6) + fVar3) - (fVar9 - fVar11);
fVar19 = ((fVar19 - fVar1) + fVar4) - (fVar10 - fVar12);
}
else {
iVar14 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar15 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar18 = fVar18 - (*(float *)(iVar15 + 0x24) - *(float *)(iVar14 + 0xc));
fVar17 = fVar17 - (*(float *)(iVar15 + 0x28) - *(float *)(iVar14 + 0x10));
fVar19 = fVar19 - (*(float *)(iVar15 + 0x2c) - *(float *)(iVar14 + 0x14));
}
iVar14 = *(int *)(this + 8);
*(float *)(iVar14 + 0x9c) = fVar18;
*(float *)(iVar14 + 0xa0) = fVar17;
*(float *)(iVar14 + 0xa4) = fVar19;
iVar14 = *(int *)(this + 4);
if (*(char *)(iVar14 + 0x1a90) != '\x01') {
(**(code **)(*(int *)(iVar14 + 0x1a40) + 4))(iVar14 + 0x1a40,iVar14 + 0x1a90);
*(undefined1 *)(iVar14 + 0x1a90) = 1;
}
}
CGameMovement::FixPlayerCrouchStuck((CGameMovement *)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.