CGameMovement::UpdateDuckJumpEyeOffset
0x0045c3c0 · 200 bytes · __thiscall
_ZN13CGameMovement23UpdateDuckJumpEyeOffsetEv
Decompiled
undefined (1 param)
/* CGameMovement::UpdateDuckJumpEyeOffset() */
void __thiscall CGameMovement::UpdateDuckJumpEyeOffset(CGameMovement *this)
{
int iVar1;
int iVar2;
float fVar3;
iVar1 = *(int *)(this + 4);
if (*(int *)(iVar1 + 0x1a98) == 0) {
return;
}
iVar2 = 1000 - *(int *)(iVar1 + 0x1a98);
if (iVar2 < 0) {
fVar3 = 1.0;
}
else {
if (200 < iVar2) {
(**(code **)(*(int *)(iVar1 + 0x1a40) + 4))(iVar1 + 0x1a40,iVar1 + 0x1a98);
*(undefined4 *)(iVar1 + 0x1a98) = 0;
SetDuckedEyeOffset(this,0.0);
return;
}
fVar3 = (float)iVar2 * 0.005;
if (fVar3 <= 0.0) {
fVar3 = 0.0;
}
if (1.0 <= fVar3) {
fVar3 = 1.0;
}
fVar3 = 1.0 - fVar3;
fVar3 = fVar3 * fVar3 * 3.0 - (fVar3 + fVar3) * fVar3 * fVar3;
}
SetDuckedEyeOffset(this,fVar3);
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.