CBaseCombatWeapon::GetViewModelSequenceDuration
0x00408350 · 202 bytes · __thiscall
_ZN17CBaseCombatWeapon28GetViewModelSequenceDurationEv
Decompiled
undefined (1 param)
/* CBaseCombatWeapon::GetViewModelSequenceDuration() */
longdouble __thiscall CBaseCombatWeapon::GetViewModelSequenceDuration(CBaseCombatWeapon *this)
{
int iVar1;
char cVar2;
CBasePlayer *this_00;
CBaseAnimating *this_01;
int iVar3;
CStudioHdr *pCVar4;
CStudioHdr *pCVar5;
longdouble lVar6;
this_00 = (CBasePlayer *)GetOwner(this);
if (((this_00 == (CBasePlayer *)0x0) ||
(cVar2 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar2 == '\0')) ||
(this_01 = (CBaseAnimating *)CBasePlayer::GetViewModel(this_00,*(int *)(this + 0x13f8)),
this_01 == (CBaseAnimating *)0x0)) {
return (longdouble)0.0;
}
(**(code **)(*(int *)this + 0x3fc))(this);
pCVar4 = *(CStudioHdr **)(this_01 + 0x13e0);
iVar1 = *(int *)(this_01 + 0x494);
if (pCVar4 == (CStudioHdr *)0x0) {
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this_01);
if (iVar3 == 0) {
pCVar4 = *(CStudioHdr **)(this_01 + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr(this_01);
pCVar4 = *(CStudioHdr **)(this_01 + 0x13e0);
}
pCVar5 = (CStudioHdr *)0x0;
if (pCVar4 == (CStudioHdr *)0x0) goto LAB_004083b7;
}
pCVar5 = (CStudioHdr *)0x0;
if (*(int *)pCVar4 != 0) {
pCVar5 = pCVar4;
}
LAB_004083b7:
lVar6 = (longdouble)CBaseAnimating::SequenceDuration(this_01,pCVar5,iVar1);
return (longdouble)(float)lVar6;
}
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.