add a slow rot to 50% nex charge (even when not holding the gun), improve the current...
authorFruitieX <fruitiex@gmail.com>
Sat, 6 Nov 2010 14:03:31 +0000 (16:03 +0200)
committerFruitieX <fruitiex@gmail.com>
Sat, 6 Nov 2010 14:03:31 +0000 (16:03 +0200)
12 files changed:
balance25.cfg
balanceLeeStricklin.cfg
balanceNexSVN.cfg
balanceSamual.cfg
balanceTest.cfg
balanceXonotic.cfg
balancetZork.cfg
defaultXonotic.cfg
gfx/crosshair_ring_inner.tga
qcsrc/client/View.qc
qcsrc/server/cl_client.qc
qcsrc/server/w_nex.qc

index 22fdaf0..711bdfd 100644 (file)
@@ -446,6 +446,7 @@ 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_limit 0.5
+set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
index b1c2673..3dd00eb 100644 (file)
@@ -457,6 +457,7 @@ 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_limit 0.5
+set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
index bb704d3..8e8a892 100644 (file)
@@ -445,6 +445,7 @@ 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_limit 0.5
+set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
index 4b4a91c..62f48fd 100644 (file)
@@ -446,6 +446,7 @@ 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_limit 0.5
+set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
index c6ecf95..45d1bc7 100644 (file)
@@ -446,6 +446,7 @@ 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_limit 0.5
+set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_shot_multiplier 0
 set g_balance_nex_charge_velocity_rate 0
 set g_balance_nex_charge_minspeed 400
index 02bfe47..f5f7c5b 100644 (file)
@@ -446,6 +446,7 @@ set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0.2
 set g_balance_nex_charge_rate 0.05
 set g_balance_nex_charge_limit 0.5
+set g_balance_nex_charge_rot_rate 0.01
 set g_balance_nex_charge_shot_multiplier 0.675
 set g_balance_nex_charge_velocity_rate 0.15
 set g_balance_nex_charge_minspeed 400
index 7ab11ed..3733f24 100644 (file)
@@ -447,6 +447,7 @@ 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_limit 0.5
+set g_balance_nex_charge_rot_rate 0
 set g_balance_nex_charge_shot_multiplier 0
 set g_balance_nex_charge_velocity_rate 0
 set g_balance_nex_charge_minspeed 400
index 636d472..d2cf3b7 100644 (file)
@@ -217,13 +217,15 @@ seta crosshair_fireball_alpha 1   "crosshair alpha value to display when wielding
 seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
 seta crosshair_ring_size 2     "bullet counter ring size for Rifle, velocity ring for Nex"
 seta crosshair_campingrifle_bulletcounter_alpha 0.15
+
 seta crosshair_nexvelocity_alpha 0.15
-seta crosshair_nexvelocity_scale 30
-seta crosshair_nexvelocity_currentcharge_rate 0.05
+seta crosshair_nexvelocity_currentcharge_scale 30
 seta crosshair_nexvelocity_currentcharge_alpha 0.15
 seta crosshair_nexvelocity_currentcharge_color_red 0.8
 seta crosshair_nexvelocity_currentcharge_color_green 0
 seta crosshair_nexvelocity_currentcharge_color_blue 0
+seta crosshair_nexvelocity_currentcharge_movingavg_rate 0.05
+
 seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
 seta cl_reticle_item_nex 1 "draw aiming recticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
 seta cl_reticle_item_normal 1 "draw recticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha"
index 3d1a570..3bf51b5 100644 (file)
Binary files a/gfx/crosshair_ring_inner.tga and b/gfx/crosshair_ring_inner.tga differ
index 510384c..211bb9e 100644 (file)
@@ -350,7 +350,7 @@ vector freeze_pmove_org, freeze_input_angles;
 entity nightvision_noise, nightvision_noise2;
 
 float pickup_crosshair_time, pickup_crosshair_size;
-float nex_charge_change, nex_charge_current_avg;
+float nex_charge_movingavg, nex_charge_current_avg;
 
 void CSQC_UpdateView(float w, float h)
 {
@@ -873,11 +873,10 @@ void CSQC_UpdateView(float w, float h)
                                vector rgb;
                                // indicate how much we're charging right now with an inner circle
                                a = cvar("crosshair_nexvelocity_currentcharge_alpha");
-                               nex_charge_change = (1 - cvar("crosshair_nexvelocity_currentcharge_rate")) * nex_charge_change + cvar("crosshair_nexvelocity_currentcharge_rate") * nex_charge;
-                               nex_charge_current_avg = cvar("crosshair_nexvelocity_currentcharge_rate") * nex_charge_current_avg + (1 - cvar("crosshair_nexvelocity_currentcharge_rate")) * nex_charge_change;
+                               nex_charge_movingavg = (1 - cvar("crosshair_nexvelocity_currentcharge_movingavg_rate")) * nex_charge_movingavg + cvar("crosshair_nexvelocity_currentcharge_movingavg_rate") * nex_charge;
 
                                rgb = eX * cvar("crosshair_nexvelocity_currentcharge_color_red") + eY * cvar("crosshair_nexvelocity_currentcharge_color_green") + eZ * cvar("crosshair_nexvelocity_currentcharge_color_blue");
-                               DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_scale") * (nex_charge - nex_charge_current_avg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+                               DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, cvar("crosshair_nexvelocity_currentcharge_scale") * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
 
                                // draw the charge
                                a = cvar("crosshair_nexvelocity_alpha");
index 66a838a..35eff19 100644 (file)
@@ -2808,6 +2808,11 @@ void PlayerPreThink (void)
                }
 
                player_regen();
+
+               // rot nex charge to the charge limit
+               if(cvar("g_balance_nex_charge_rot_rate") && self.nex_charge > cvar("g_balance_nex_charge_limit"))
+                       self.nex_charge = bound(cvar("g_balance_nex_charge_limit"), self.nex_charge - cvar("g_balance_nex_charge_rot_rate") * frametime / W_TICSPERFRAME, 1);
+
                if(frametime)
                        player_anim();
 
index 29b8be7..c168753 100644 (file)
@@ -46,12 +46,12 @@ void W_Nex_Attack (float issecondary)
        if(cvar("g_balance_nex_charge"))
        {
                charge = cvar("g_balance_nex_charge_mindmg") / mydmg + (1 - cvar("g_balance_nex_charge_mindmg") / mydmg) * self.nex_charge;
-               self.nex_charge *= cvar("g_balance_nex_charge_shot_multiplier"); // do this AFTER setting mydmg/myforce
+               self.nex_charge = self.nex_charge * cvar("g_balance_nex_charge_shot_multiplier"); // do this AFTER setting mydmg/myforce
        }
        else
                charge = 1;
-       mydmg *= charge;
-       myforce *= charge;
+       mydmg = mydmg * charge;
+       myforce = myforce * charge;
 
        W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", mydmg);
 
@@ -86,6 +86,7 @@ float w_nex(float req)
        {
                if(cvar("g_balance_nex_charge") && self.nex_charge < cvar("g_balance_nex_charge_limit"))
                        self.nex_charge = min(1, self.nex_charge + cvar("g_balance_nex_charge_rate") * frametime / W_TICSPERFRAME);
+
                if (self.BUTTON_ATCK)
                {
                        if (weapon_prepareattack(0, cvar("g_balance_nex_primary_refire")))