The Degreaser seems to have a limiter beyond
attributes #199 and #547 affecting holster- and deploy-times. If I switch to the Degreaser, and then away from it too quickly, the attribute seems to be ignored: there appears to be a minimum required amount of time with the weapon out before speed boost is put into effect.
I've been experimenting with
some code from 2011 to manually set
m_flTimeWeaponIdle and
m_flNextAttack, with no luck. Am I looking in the wrong place to do what I want?
PHP Code:
float current_time = GetGameTime();
float idle_time = GetEntPropFloat(weapon, Prop_Send, "m_flTimeWeaponIdle");
float next_atk = GetEntPropFloat(client, Prop_Send, "m_flNextAttack");
SetEntPropFloat(
weapon,
Prop_Send,
"m_flTimeWeaponIdle",
current_time + (idle_time - current_time) * 0.2 // I've set both attributes to 0.2 on Degreaser
);
SetEntPropFloat(
client,
Prop_Send,
"m_flNextAttack",
current_time + (next_atk - current_time) * 0.2
);
I have the above code inside of a function hooked to
SDKHook_WeaponSwitch. Am I setting the properties incorrectly? Is it even possible to speed up weapon switching through brute force like this? The speed of the animation itself (which gets truncated by this method, I'm told) doesn't matter to me at this phase: I just want to get the core functionality in-place.
Any guidance on how to proceed with what I'm trying to do is greatly appreciated. I'm still very inexperienced with entity properties. Thank you for your time.