Closed doomy64 closed 3 years ago
This issue seems to be caused by UpdateEnergyDrinkMeter. Returning MRES_Supercede
in a pre-hook fixes this, although would prevent soda popper hype from draining. Might be best to also hook CTFPlayerShared::RemoveCond
as well.
If you want to experiment yourself, here's the signatures for UpdateEnergyDrinkMeter
"linux" "@_ZN15CTFPlayerShared22UpdateEnergyDrinkMeterEv"
"windows" "\x55\x8B\xEC\x83\xEC\x0C\x57\x8B\xF9\x6A\x01"
I think we can avoid hooking possibly-expensive CTFPlayerShared::RemoveCond
by changing m_nPlayerCond
netprop while inside CTFPlayerShared::UpdateEnergyDrinkMeter
. Still won't be easy to fix but i'll take a look at it.
This fix is simpler than I thought, don't need CTFPlayerShared::UpdateEnergyDrinkMeter
and cond hackery.
The mini-crit boost from the steak lasts a little under half as long as it should, despite the melee only effect lasting for the full duration. This even happens as heavy.