From: FruitieX Date: Sun, 3 Oct 2010 16:46:27 +0000 (+0300) Subject: use only XY velocity on nex X-Git-Tag: xonotic-v0.1.0preview~299^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=11029aba0029b85a8c87d3a0f72e7deecd53f4d1;p=xonotic%2Fxonotic-data.pk3dir.git use only XY velocity on nex --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index cd6bba5ef..6f7e3636b 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -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); diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index d1ba02273..8acf9f4c6 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -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;