From: Samual <samual@xonotic.org>
Date: Sun, 30 Jan 2011 20:08:38 +0000 (-0500)
Subject: Fix Nexgun so that it has a cvar for the animation limit separate from autocharge... 
X-Git-Tag: xonotic-v0.5.0~311^2~45
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=74b7003f66c42a090d0052e9d4d354de6fa2fc77;p=xonotic%2Fxonotic-data.pk3dir.git

Fix Nexgun so that it has a cvar for the animation limit separate from autocharge limit - Also make it so that my balance no longer has a limit, and remove falloff. Also: Nerf velocity charge greatly.
---

diff --git a/balance25.cfg b/balance25.cfg
index 361c45d616..da8c00bfbf 100644
--- a/balance25.cfg
+++ b/balance25.cfg
@@ -488,6 +488,7 @@ set g_balance_nex_charge 0
 set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
+set g_balance_nex_charge_animlimit 0.5
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
diff --git a/balanceLeeStricklin.cfg b/balanceLeeStricklin.cfg
index 03f58bf366..24bca821a8 100644
--- a/balanceLeeStricklin.cfg
+++ b/balanceLeeStricklin.cfg
@@ -488,6 +488,7 @@ set g_balance_nex_charge 1
 set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
+set g_balance_nex_charge_animlimit 0.5
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
diff --git a/balanceSamual.cfg b/balanceSamual.cfg
index 75fa37b376..e4712baa0f 100644
--- a/balanceSamual.cfg
+++ b/balanceSamual.cfg
@@ -462,10 +462,10 @@ set g_balance_nex_primary_force 400
 set g_balance_nex_primary_refire 1.5
 set g_balance_nex_primary_animtime 0.3
 set g_balance_nex_primary_ammo 5
-set g_balance_nex_primary_damagefalloff_mindist 1000
-set g_balance_nex_primary_damagefalloff_maxdist 3000
-set g_balance_nex_primary_damagefalloff_halflife 1500
-set g_balance_nex_primary_damagefalloff_forcehalflife 1500
+set g_balance_nex_primary_damagefalloff_mindist 0 // 1000    For tZork ;3
+set g_balance_nex_primary_damagefalloff_maxdist 0 // 3000
+set g_balance_nex_primary_damagefalloff_halflife 0 // 1500
+set g_balance_nex_primary_damagefalloff_forcehalflife 0 // 1500
 
 set g_balance_nex_secondary 0
 set g_balance_nex_secondary_charge 0
@@ -488,11 +488,12 @@ set g_balance_nex_charge 1
 set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.2
-set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_animlimit 0.5
+set g_balance_nex_charge_limit 1
 set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
 set g_balance_nex_charge_shot_multiplier 0.25
-set g_balance_nex_charge_velocity_rate 0.3
+set g_balance_nex_charge_velocity_rate 0.1
 set g_balance_nex_charge_minspeed 400
 set g_balance_nex_charge_maxspeed 800
 // }}}
diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg
index 53f98d57b2..5fbe291fe9 100644
--- a/balanceXonotic.cfg
+++ b/balanceXonotic.cfg
@@ -488,6 +488,7 @@ set g_balance_nex_charge 1
 set g_balance_nex_charge_mindmg 20
 set g_balance_nex_charge_start 0.5
 set g_balance_nex_charge_rate 0.5
+set g_balance_nex_charge_animlimit 0.5
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0.1
 set g_balance_nex_charge_rot_pause 0.5 // Dont rot down until this long after release of charge button
diff --git a/balancetZork.cfg b/balancetZork.cfg
index 87612d2348..7d9c1ed37b 100644
--- a/balancetZork.cfg
+++ b/balancetZork.cfg
@@ -488,6 +488,7 @@ set g_balance_nex_charge 1
 set g_balance_nex_charge_mindmg 10
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.35
+set g_balance_nex_charge_animlimit 0.5
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0.1
 set g_balance_nex_charge_rot_pause 1 // Dont rot down untill this long after release of charge button
diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh
index cb22f99496..de7b4ecf85 100644
--- a/qcsrc/server/autocvars.qh
+++ b/qcsrc/server/autocvars.qh
@@ -434,6 +434,7 @@ float autocvar_g_balance_minstanex_ammo;
 float autocvar_g_balance_minstanex_animtime;
 float autocvar_g_balance_minstanex_refire;
 float autocvar_g_balance_nex_charge;
+float autocvar_g_balance_nex_charge_animlimit;
 float autocvar_g_balance_nex_charge_limit;
 float autocvar_g_balance_nex_charge_maxspeed;
 float autocvar_g_balance_nex_charge_mindmg;
diff --git a/qcsrc/server/w_nex.qc b/qcsrc/server/w_nex.qc
index 4bc8130290..e05698851f 100644
--- a/qcsrc/server/w_nex.qc
+++ b/qcsrc/server/w_nex.qc
@@ -56,9 +56,9 @@ void W_Nex_Attack (float issecondary)
 	myforce *= charge;
 
 	W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg);
-	if(charge > autocvar_g_balance_nex_charge_limit && autocvar_g_balance_nex_charge_limit) // if the Nex is overcharged, we play an extra sound
+	if(charge > autocvar_g_balance_nex_charge_animlimit && autocvar_g_balance_nex_charge_animlimit) // if the Nex is overcharged, we play an extra sound
 	{
-		sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_limit) / (1 - 0.5 * autocvar_g_balance_nex_charge_limit), ATTN_NORM);
+		sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_animlimit) / (1 - 0.5 * autocvar_g_balance_nex_charge_animlimit), ATTN_NORM);
 	}
 
 	yoda = 0;
@@ -172,15 +172,15 @@ float w_nex(float req)
 
 		if(autocvar_g_balance_nex_charge)
 		{
-			self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-			self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-			self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+			self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
+			self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
+			self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_animlimit);
 
-			if(self.nex_charge > autocvar_g_balance_nex_charge_limit)
+			if(self.nex_charge > autocvar_g_balance_nex_charge_animlimit)
 			{
-				self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
-				self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
-				self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+				self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
+				self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
+				self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_animlimit) / (1 - autocvar_g_balance_nex_charge_animlimit);
 			}
 		}
 	}