#include <client/autocvars.qh>
#include <client/miscfunctions.qh>
+#include <client/resources.qh>
#include <common/animdecide.qh>
#include <common/ent_cs.qh>
#include <common/mapinfo.qh>
float jumpheight_min = max(autocvar_hud_panel_strafehud_jumpheight_min * length_conversion_factor, 0);
float jumpheight_current = strafeplayer.origin.z;
float jumpspeed_current = strafeplayer.velocity.z;
- if(jumpspeed_prev <= jumpspeed_current || jumpheight_prev > jumpheight_current || IS_ONGROUND(strafeplayer) || swimming)
+ if(jumpspeed_prev <= jumpspeed_current || jumpheight_prev > jumpheight_current || IS_ONGROUND(strafeplayer) || swimming || IS_DEAD(strafeplayer))
{
+ if(IS_DEAD(strafeplayer))
+ {
+ jumpheight_prev = jumpheight_current;
+ jumpspeed_prev = jumpspeed_current;
+ }
jumprestart = true;
}
else
{
jumprestart = false;
jumpheight = 0;
- // this reduces accuracy a little bit but prevents all kind of bugs from carryover values at connect or when dying
- jumpheight_prev = jumpheight_current;
- jumpspeed_prev = jumpspeed_current;
}
else
{