CTerrorWeapon::GetReloadDurationModifier
0x00573f60 · 312 bytes · __thiscall
_ZN13CTerrorWeapon25GetReloadDurationModifierEv
Decompiled
undefined (1 param)
/* CTerrorWeapon::GetReloadDurationModifier() */
longdouble __thiscall CTerrorWeapon::GetReloadDurationModifier(CTerrorWeapon *this)
{
int iVar1;
char cVar2;
int *piVar3;
int iVar4;
int iVar5;
CStudioHdr *pCVar6;
CStudioHdr *pCVar7;
longdouble lVar8;
float fVar9;
float fVar10;
piVar3 = (int *)GetPlayerOwner(this);
if (piVar3 == (int *)0x0) {
lVar8 = (longdouble)CBaseCombatWeapon::GetReloadDurationModifier();
return lVar8;
}
iVar4 = CBaseCombatWeapon::GetWpnData((CBaseCombatWeapon *)this);
iVar1 = *(int *)(this + 0x494);
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
if (pCVar6 == (CStudioHdr *)0x0) {
iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar5 == 0) {
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
}
pCVar7 = (CStudioHdr *)0x0;
if (pCVar6 == (CStudioHdr *)0x0) goto LAB_00573fa4;
}
pCVar7 = (CStudioHdr *)0x0;
if (*(int *)pCVar6 != 0) {
pCVar7 = pCVar6;
}
LAB_00573fa4:
lVar8 = (longdouble)CBaseAnimating::SequenceDuration((CBaseAnimating *)this,pCVar7,iVar1);
fVar9 = 1.0;
if ((float)lVar8 != 0.0) {
cVar2 = (**(code **)(*(int *)this + 0x674))(this);
if (cVar2 == '\0') {
fVar10 = *(float *)(iVar4 + 0xc38);
}
else {
fVar10 = *(float *)(iVar4 + 0xc3c);
}
fVar9 = 1.0;
if (0.0 < fVar10) {
fVar9 = fVar10 / (float)lVar8;
}
cVar2 = (**(code **)(*piVar3 + 0x7e8))(piVar3);
if (cVar2 != '\0') {
return (longdouble)(fVar9 * *(float *)(SurvivorIncapacitatedReloadMultiplier._28_4_ + 0x2c));
}
}
return (longdouble)fVar9;
}
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.