CPropMinigun::UpdateBarrelMovement
0x0054bcf0 · 315 bytes · __thiscall
_ZN12CPropMinigun20UpdateBarrelMovementEf
Decompiled
undefined (2 params)
/* CPropMinigun::UpdateBarrelMovement(float) */
void __thiscall CPropMinigun::UpdateBarrelMovement(CPropMinigun *this,float param_1)
{
float fVar1;
longdouble lVar2;
float fVar3;
float fVar4;
float fVar5;
if (this[0x15dc] == (CPropMinigun)0x0) {
fVar4 = 0.0;
fVar3 = *(float *)(this + 0x1610);
fVar1 = *(float *)(MinigunSpinDownSpeed._28_4_ + 0x2c);
*(undefined4 *)(this + 0x1614) = 0;
fVar5 = fVar3;
if (fVar3 == 0.0) goto LAB_0054bd38;
}
else {
fVar3 = *(float *)(this + 0x1610);
fVar1 = *(float *)(MinigunSpinUpSpeed._28_4_ + 0x2c);
fVar4 = *(float *)(MinigunFiringSpeed._28_4_ + 0x2c);
*(float *)(this + 0x1614) = fVar4;
fVar5 = fVar3;
if (fVar3 == fVar4) goto LAB_0054bd38;
}
lVar2 = (longdouble)Approach(fVar4,fVar5,fVar1 * param_1);
fVar3 = (float)lVar2;
*(float *)(this + 0x1610) = fVar3;
if (fVar5 != fVar3) {
if ((fVar3 != *(float *)(this + 0x1614)) || (fVar3 <= 0.0)) {
if ((fVar5 == *(float *)(MinigunFiringSpeed._28_4_ + 0x2c)) &&
(*(float *)(this + 0x1614) == 0.0)) {
OnFireStop(this);
fVar3 = *(float *)(this + 0x1610);
}
}
else {
OnFireStart(this);
fVar3 = *(float *)(this + 0x1610);
}
}
LAB_0054bd38:
*(float *)(this + 0x1618) = fVar3 * param_1 + *(float *)(this + 0x1618);
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.