]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
use only XY velocity on nex
authorFruitieX <rasse@rasse-laptop.(none)>
Sun, 3 Oct 2010 16:46:27 +0000 (19:46 +0300)
committerFruitieX <rasse@rasse-laptop.(none)>
Sun, 3 Oct 2010 16:46:27 +0000 (19:46 +0300)
qcsrc/client/View.qc
qcsrc/server/w_nex.qc

index cd6bba5ef5c950b2bcbe58688c4ca09f738a215f..6f7e3636bab6a48d59022ad3e6f90a2e6e774b05 100644 (file)
@@ -710,7 +710,7 @@ void CSQC_UpdateView(float w, float h)
                        float maxvel, minvel, curvel;
                        minvel = 400;
                        maxvel = 1000;
-                       curvel = vlen(pmove_vel);
+                       curvel = vlen('1 0 0' * pmove_vel_x + '0 1 0' * pmove_vel_y);
 
                        f = bound(0, (curvel - minvel) / (maxvel - minvel), 1);
                        x = cos(f * 2 * M_PI);
index d1ba02273af35243bd51bfbfd0b9ac1bc73ff299..8acf9f4c6b12c90727bf1d357f3e06eb8f873e93 100644 (file)
@@ -43,7 +43,7 @@ void W_Nex_Attack (float issecondary)
        float flying;
        flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
 
-       f = ExponentialFalloff(cvar("g_balance_nex_velocitydependent_minspeed"), cvar("g_balance_nex_velocitydependent_maxspeed"), cvar("g_balance_nex_velocitydependent_halflife"), vlen(self.velocity));
+       f = ExponentialFalloff(cvar("g_balance_nex_velocitydependent_minspeed"), cvar("g_balance_nex_velocitydependent_maxspeed"), cvar("g_balance_nex_velocitydependent_halflife"), vlen('1 0 0' * self.velocity_x + '0 1 0' * self.velocity_y));
 
        // TODO: make it more obvious (through effects, indicator on weapon) that damage increases when speed increases
        mydmg *= f;