CGameMovement::ReduceTimers
0x00454e20 · 496 bytes · __thiscall
_ZN13CGameMovement12ReduceTimersEv
Decompiled
undefined (1 param)
/* CGameMovement::ReduceTimers() */
void __thiscall CGameMovement::ReduceTimers(CGameMovement *this)
{
float *pfVar1;
int iVar2;
int iVar3;
int iVar4;
float fVar5;
iVar3 = *(int *)(this + 4);
fVar5 = *(float *)(gpGlobals + 0x10) * 1000.0;
iVar2 = *(int *)(iVar3 + 0x1a94);
iVar4 = (int)fVar5;
if ((0 < iVar2) && (iVar2 != iVar2 - iVar4)) {
(**(code **)(*(int *)(iVar3 + 0x1a40) + 4))(iVar3 + 0x1a40,iVar3 + 0x1a94);
*(int *)(iVar3 + 0x1a94) = iVar2 - iVar4;
iVar3 = *(int *)(this + 4);
if (*(int *)(iVar3 + 0x1a94) < 0) {
(**(code **)(*(int *)(iVar3 + 0x1a40) + 4))(iVar3 + 0x1a40,iVar3 + 0x1a94);
*(undefined4 *)(iVar3 + 0x1a94) = 0;
iVar3 = *(int *)(this + 4);
}
}
iVar2 = *(int *)(iVar3 + 0x1a98);
if ((0 < iVar2) && (iVar2 != iVar2 - iVar4)) {
(**(code **)(*(int *)(iVar3 + 0x1a40) + 4))(iVar3 + 0x1a40,iVar3 + 0x1a98);
*(int *)(iVar3 + 0x1a98) = iVar2 - iVar4;
iVar3 = *(int *)(this + 4);
if (*(int *)(iVar3 + 0x1a98) < 0) {
(**(code **)(*(int *)(iVar3 + 0x1a40) + 4))(iVar3 + 0x1a40,iVar3 + 0x1a98);
*(undefined4 *)(iVar3 + 0x1a98) = 0;
iVar3 = *(int *)(this + 4);
}
}
iVar2 = *(int *)(iVar3 + 0x1a9c);
if ((0 < iVar2) && (iVar2 != iVar2 - iVar4)) {
(**(code **)(*(int *)(iVar3 + 0x1a40) + 4))(iVar3 + 0x1a40,iVar3 + 0x1a9c);
*(int *)(iVar3 + 0x1a9c) = iVar2 - iVar4;
iVar3 = *(int *)(this + 4);
if (*(int *)(iVar3 + 0x1a9c) < 0) {
(**(code **)(*(int *)(iVar3 + 0x1a40) + 4))(iVar3 + 0x1a40,iVar3 + 0x1a9c);
*(undefined4 *)(iVar3 + 0x1a9c) = 0;
iVar3 = *(int *)(this + 4);
}
}
if (0.0 < *(float *)(iVar3 + 0x2024)) {
*(float *)(iVar3 + 0x2024) = *(float *)(iVar3 + 0x2024) - fVar5;
pfVar1 = (float *)(*(int *)(this + 4) + 0x2024);
if (*pfVar1 <= 0.0 && *pfVar1 != 0.0) {
*(undefined4 *)(*(int *)(this + 4) + 0x2024) = 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.