CGameMovement::FinishUnDuck
0x00454620 · 757 bytes · __thiscall
_ZN13CGameMovement12FinishUnDuckEv
Decompiled
undefined (1 param)
/* CGameMovement::FinishUnDuck() */
void __thiscall CGameMovement::FinishUnDuck(CGameMovement *this)
{
float fVar1;
float fVar2;
float fVar3;
float fVar4;
float fVar5;
float fVar6;
float fVar7;
float fVar8;
code *pcVar9;
int iVar10;
int iVar11;
undefined4 uVar12;
CBaseEntity *this_00;
int *piVar13;
float local_30;
float local_28 [6];
iVar10 = *(int *)(this + 8);
local_30 = *(float *)(iVar10 + 0x9c);
fVar1 = *(float *)(iVar10 + 0xa4);
fVar8 = *(float *)(iVar10 + 0xa0);
local_28[0] = local_30;
local_28[1] = fVar8;
local_28[2] = fVar1;
iVar10 = CBaseEntity::GetGroundEntity(*(CBaseEntity **)(this + 4));
if (iVar10 == 0) {
iVar10 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar11 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar2 = *(float *)(iVar11 + 0x18);
fVar3 = *(float *)(iVar11 + 0x1c);
fVar4 = *(float *)(iVar11 + 0x20);
fVar5 = *(float *)(iVar10 + 0xc);
fVar6 = *(float *)(iVar10 + 0x10);
fVar7 = *(float *)(iVar10 + 0x14);
iVar10 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
iVar11 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
local_28[1] = fVar8 - ((fVar3 - fVar6) - (*(float *)(iVar11 + 0x34) - *(float *)(iVar10 + 0x28))
);
local_28[0] = local_30 -
((fVar2 - fVar5) - (*(float *)(iVar11 + 0x30) - *(float *)(iVar10 + 0x24)));
local_28[2] = fVar1 - ((fVar4 - fVar7) - (*(float *)(iVar11 + 0x38) - *(float *)(iVar10 + 0x2c))
);
}
else {
iVar10 = 0;
while( true ) {
iVar11 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
fVar1 = *(float *)(iVar11 + 0x24 + iVar10);
iVar11 = (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
*(float *)((int)local_28 + iVar10) = (fVar1 - *(float *)(iVar11 + 0xc + iVar10)) + local_30;
if (iVar10 + 4 == 0xc) break;
local_30 = *(float *)((int)local_28 + iVar10 + 4);
iVar10 = iVar10 + 4;
}
}
fVar2 = local_28[2];
fVar8 = local_28[1];
fVar1 = local_28[0];
this_00 = *(CBaseEntity **)(this + 4);
if (this_00[0x1a90] != (CBaseEntity)0x0) {
(**(code **)(*(int *)(this_00 + 0x1a40) + 4))(this_00 + 0x1a40,this_00 + 0x1a90);
this_00[0x1a90] = (CBaseEntity)0x0;
this_00 = *(CBaseEntity **)(this + 4);
}
CBaseEntity::RemoveFlag(this_00,2);
piVar13 = *(int **)(this + 4);
if (*(char *)((int)piVar13 + 0x1a91) != '\0') {
(**(code **)(piVar13[0x690] + 4))(piVar13 + 0x690,(int)piVar13 + 0x1a91);
*(undefined1 *)((int)piVar13 + 0x1a91) = 0;
piVar13 = *(int **)(this + 4);
}
if (*(char *)((int)piVar13 + 0x1a92) != '\0') {
(**(code **)(piVar13[0x690] + 4))(piVar13 + 0x690,(int)piVar13 + 0x1a92);
*(undefined1 *)((int)piVar13 + 0x1a92) = 0;
piVar13 = *(int **)(this + 4);
}
pcVar9 = *(code **)(*piVar13 + 0x254);
uVar12 = (**(code **)(*(int *)this + 0x24))(this,0);
(*pcVar9)(*(undefined4 *)(this + 4),uVar12);
iVar10 = *(int *)(this + 4);
if (*(int *)(iVar10 + 0x1a94) != 0) {
(**(code **)(*(int *)(iVar10 + 0x1a40) + 4))(iVar10 + 0x1a40,iVar10 + 0x1a94);
*(undefined4 *)(iVar10 + 0x1a94) = 0;
}
iVar10 = *(int *)(this + 8);
*(float *)(iVar10 + 0xa4) = fVar2;
*(float *)(iVar10 + 0x9c) = fVar1;
*(float *)(iVar10 + 0xa0) = fVar8;
(**(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.