]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
replace numbers by self.anim_*_x
authorFruitieX <fruitiex@gmail.com>
Fri, 27 May 2011 14:34:18 +0000 (17:34 +0300)
committerFruitieX <fruitiex@gmail.com>
Fri, 27 May 2011 14:34:18 +0000 (17:34 +0300)
qcsrc/server/cl_physics.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weaponsystem.qc

index 63b12ffb57e1a2a5bd79c803329b3319add83203..ebfbc924bac23107f9ad2dfe2a1d52ddf7ecddc1 100644 (file)
@@ -163,7 +163,7 @@ void PlayerJump (void)
 
        if (self.crouch)
                setanim(self, self.anim_duckjump, FALSE, TRUE, TRUE);
-       else if (self.animstate_startframe != 23) // jump animation shouldn't override melee until we have animation blending
+       else if (self.animstate_startframe != self.anim_melee_x) // jump animation shouldn't override melee until we have animation blending
                setanim(self, self.anim_jump, FALSE, TRUE, TRUE);
 
        if(g_jump_grunt)
index d423065917f906428a1758b9a848275e82c013bf..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;
index f3040117a38552e439004e914f7eac42d31c929e..78c81c813d3f397e01ab9186fe2b0969ec664513 100644 (file)
@@ -1268,7 +1268,7 @@ void weapon_thinkf(float fr, float t, void() func)
                        anim_z = anim_y / (t + sys_frametime);
                        setanim(self, anim, FALSE, TRUE, TRUE);
                }
-               else if (self.animstate_startframe == 7) // only allow shoot anim to override idle animation until we have animation blending
+               else if (self.animstate_startframe == self.anim_idle_x) // only allow shoot anim to override idle animation until we have animation blending
                {
                        anim = self.anim_shoot;
                        anim_z = anim_y / (t + sys_frametime);