]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
replace numbers by self.anim_*_x
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index 568c0921d727f2014eca0f191d58098b7c4e5e7a..382645810b47fec2719cfc1b8f74e56dbb973fd7 100644 (file)
@@ -266,19 +266,19 @@ void player_anim (void)
 
                        if(self.animstate_startframe != self.anim_fly_x) // no tracing if we're in the fly anim
                        {
-                               if (self.crouch && self.animstate_startframe != 5) // don't perform another trace if already playing the crouch jump anim
+                               if (self.crouch && 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 == 7) // don't get stuck on idle animation in midair
+                                       if(!trace_startsolid && trace_fraction == 1 || self.animstate_startframe == self.anim_idle_x) // don't get stuck on idle animation in midair
                                        {
                                                setanim(self, self.anim_duckjump, FALSE, TRUE, self.restart_jump);
                                                self.restart_jump = FALSE;
                                        }
                                }
-                               else if (self.animstate_startframe != 8) // don't perform another trace if already playing the jump anim
+                               else if (self.animstate_startframe != self.anim_jump_x) // 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
+                                       if(!trace_startsolid && trace_fraction == 1 || self.animstate_startframe == self.anim_idle_x) // don't get stuck on idle animation in midair
                                        {
                                                setanim(self, self.anim_jump, FALSE, TRUE, self.restart_jump);
                                                self.restart_jump = FALSE;
@@ -316,7 +316,6 @@ void player_anim (void)
                }
                else
                        setanim(self, self.anim_idle, TRUE, FALSE, FALSE);
-               print("self.animstate_startframe = ", ftos(self.animstate_startframe), "\n");
        }
 
        if (self.weaponentity)