if (self.animstate_startframe != self.anim_duckjump_x) // 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 == self.anim_idle_x) // don't get stuck on idle animation in midair
+ if(!trace_startsolid && trace_fraction == 1 || !(self.animstate_startframe == self.anim_duckwalk_x || self.animstate_startframe == self.anim_duckidle_x)) // don't get stuck on non-crouch anims
{
setanim(self, self.anim_duckjump, FALSE, TRUE, self.restart_jump);
self.restart_jump = FALSE;
}
else
setanim(self, self.anim_idle, TRUE, FALSE, FALSE);
+ print(ftos(time), " ", ftos(self.animstate_startframe), "\n");
}
if (self.weaponentity)