From 2becc7fd2baeff230b9b8f439136377d75280373 Mon Sep 17 00:00:00 2001 From: FruitieX Date: Sat, 2 Oct 2010 22:32:35 +0300 Subject: [PATCH] fix a typo in the balance config --- balance25.cfg | 2 +- balanceLeeStricklin.cfg | 2 +- balanceNexSVN.cfg | 2 +- balanceSamual.cfg | 2 +- balanceXonotic.cfg | 6 +++--- qcsrc/server/w_nex.qc | 8 +++----- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/balance25.cfg b/balance25.cfg index 899b7fc9b..b79f68d69 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -408,7 +408,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 0 set g_balance_nex_velocitydependent 0 set g_balance_nex_velocitydependent_minspeed 400 -set g_balance_nex_velocitydependent_minspeed 1000 +set g_balance_nex_velocitydependent_maxspeed 1000 // }}} // {{{ minstanex set g_balance_minstanex_refire 1 diff --git a/balanceLeeStricklin.cfg b/balanceLeeStricklin.cfg index 23977eadf..10078ea49 100644 --- a/balanceLeeStricklin.cfg +++ b/balanceLeeStricklin.cfg @@ -419,7 +419,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 9999999 set g_balance_nex_velocitydependent 0 set g_balance_nex_velocitydependent_minspeed 400 -set g_balance_nex_velocitydependent_minspeed 1000 +set g_balance_nex_velocitydependent_maxspeed 1000 // }}} // {{{ minstanex set g_balance_minstanex_refire 1 diff --git a/balanceNexSVN.cfg b/balanceNexSVN.cfg index e32819dc7..2cf5e8688 100644 --- a/balanceNexSVN.cfg +++ b/balanceNexSVN.cfg @@ -408,7 +408,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 1500 set g_balance_nex_velocitydependent 0 set g_balance_nex_velocitydependent_minspeed 400 -set g_balance_nex_velocitydependent_minspeed 1000 +set g_balance_nex_velocitydependent_maxspeed 1000 // }}} // {{{ minstanex set g_balance_minstanex_refire 1 diff --git a/balanceSamual.cfg b/balanceSamual.cfg index e1a6f7442..dd20eee40 100644 --- a/balanceSamual.cfg +++ b/balanceSamual.cfg @@ -408,7 +408,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 1500 set g_balance_nex_velocitydependent 0 set g_balance_nex_velocitydependent_minspeed 400 -set g_balance_nex_velocitydependent_minspeed 1000 +set g_balance_nex_velocitydependent_maxspeed 1000 // }}} // {{{ minstanex set g_balance_minstanex_refire 1 diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index e34a2472b..0f8abc017 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -386,7 +386,7 @@ set g_balance_crylink_secondary_line_fadetime 2 // }}} // {{{ nex set g_balance_nex_primary_damage 125 -set g_balance_nex_primary_force 400 +set g_balance_nex_primary_force 500 set g_balance_nex_primary_refire 1 set g_balance_nex_primary_animtime 0.75 set g_balance_nex_primary_ammo 5 @@ -397,7 +397,7 @@ set g_balance_nex_primary_damagefalloff_forcehalflife 2000 set g_balance_nex_secondary 1 set g_balance_nex_secondary_damage 125 -set g_balance_nex_secondary_force -500 +set g_balance_nex_secondary_force -700 set g_balance_nex_secondary_refire 1 set g_balance_nex_secondary_animtime 0.75 set g_balance_nex_secondary_ammo 5 @@ -408,7 +408,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 2000 set g_balance_nex_velocitydependent 1 set g_balance_nex_velocitydependent_minspeed 400 -set g_balance_nex_velocitydependent_minspeed 1000 +set g_balance_nex_velocitydependent_maxspeed 1000 // }}} // {{{ minstanex set g_balance_minstanex_refire 1.25 diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc index b5eacda72..e6b16d193 100644 --- a/qcsrc/server/w_nex.qc +++ b/qcsrc/server/w_nex.qc @@ -46,13 +46,11 @@ void W_Nex_Attack (float issecondary) if(cvar("g_balance_nex_velocitydependent")) // player velocity dependent damage and force { myvel = vlen(self.velocity); - - if(myvel < cvar("g_balance_nex_velocitydependent_minspeed")) - myvel = bound(cvar("g_balance_nex_velocitydependent_minspeed"), myvel, cvar("g_balance_nex_velocitydependent_maxspeed")); + myvel = bound(cvar("g_balance_nex_velocitydependent_minspeed"), myvel, cvar("g_balance_nex_velocitydependent_maxspeed")); // TODO: make it more obvious (through effects, indicator on weapon) that damage increases when speed increases - mydmg *= cvar("g_balance_nex_velocitydependent_maxspeed") / myvel; - myforce *= cvar("g_balance_nex_velocitydependent_maxspeed") / myvel; + mydmg *= myvel / cvar("g_balance_nex_velocitydependent_maxspeed"); + myforce *= myvel / cvar("g_balance_nex_velocitydependent_maxspeed"); } W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", mydmg); -- 2.39.2