{
if (!(self.flags & FL_ONGROUND))
{
- if (self.crouch)
+ if (self.crouch && self.animstate_startframe != 5) // don't perform another trace if already playing the crouch jump anim
{
traceline(self.origin + '0 0 1' * PL_CROUCH_MIN_z, self.origin + '0 0 1' * (PL_CROUCH_MIN_z - autocvar_sv_player_jumpanim_minfall), TRUE, self);
if(!trace_startsolid && trace_fraction == 1 || self.animstate_startframe == 7) // don't get stuck on idle animation in midair
self.restart_jump = FALSE;
}
}
- else
+ else if (self.animstate_startframe != 8) // don't perform another trace if already playing the jump anim
{
traceline(self.origin + '0 0 1' * PL_MIN_z, self.origin + '0 0 1' * (PL_MIN_z - autocvar_sv_player_jumpanim_minfall), TRUE, self);
if(!trace_startsolid && trace_fraction == 1 || self.animstate_startframe == 7) // don't get stuck on idle animation in midair
}
else
other.lastteleporttime = time;
+
+ if (other.crouch)
+ {
+ setanim(other, other.anim_duckjump, FALSE, TRUE, other.restart_jump);
+ other.restart_jump = FALSE;
+ }
+ else
+ {
+ setanim(other, other.anim_jump, FALSE, TRUE, other.restart_jump);
+ other.restart_jump = FALSE;
+ }
}
else
other.jumppadcount = TRUE;