]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rework how the hagar load secondary spread works slightly (add per-shot spread like...
authorSamual <samual@xonotic.org>
Wed, 21 Sep 2011 16:13:09 +0000 (12:13 -0400)
committerSamual <samual@xonotic.org>
Wed, 21 Sep 2011 16:13:09 +0000 (12:13 -0400)
balance25.cfg
balanceFruit.cfg
balanceLeeStricklin.cfg
balanceXonotic.cfg
balancetZork.cfg
qcsrc/server/autocvars.qh
qcsrc/server/w_hagar.qc

index 843bd634fdfedb6b7da041a49327245c3dd9f0d8..acb9ad8256d9d33314c49fd38f6e768ef840f14a 100644 (file)
@@ -542,6 +542,7 @@ set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
 set g_balance_hagar_secondary_load 0
 set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_spread 0.075
 set g_balance_hagar_secondary_load_max 4
 set g_balance_hagar_secondary_load_hold 0
 set g_balance_hagar_secondary_load_releasedeath 1
index 5a078e44cfe7dd5a7e10664f51ed33b5e288cf35..35bedb5a56da411ffd50a007583ccc78e2a2532b 100644 (file)
@@ -542,6 +542,7 @@ set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
 set g_balance_hagar_secondary_load 0
 set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_spread 0.075
 set g_balance_hagar_secondary_load_max 4
 set g_balance_hagar_secondary_load_hold 0
 set g_balance_hagar_secondary_load_releasedeath 1
index 02e804e798ed7aca25363201c6c120632cfc917a..59f7c25f07a8a9dfaee5f26b5f738ee943baba51 100644 (file)
@@ -542,6 +542,7 @@ set g_balance_hagar_primary_ammo 2
 set g_balance_hagar_secondary 1
 set g_balance_hagar_secondary_load 0
 set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_spread 0.075
 set g_balance_hagar_secondary_load_max 4
 set g_balance_hagar_secondary_load_hold 0
 set g_balance_hagar_secondary_load_releasedeath 1
index c909d669da61d2cf369c7c2d17a27d55736efe54..79c8e9c2da5182b3a9fa41fe3aa5751f10e6a75b 100644 (file)
@@ -542,6 +542,7 @@ set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
 set g_balance_hagar_secondary_load 1
 set g_balance_hagar_secondary_load_speed 0.5
+set g_balance_hagar_secondary_load_spread 0.075
 set g_balance_hagar_secondary_load_max 4
 set g_balance_hagar_secondary_load_hold 1
 set g_balance_hagar_secondary_load_releasedeath 0
index 57c4996871f3fc2fa46719ec04ac9e46cdf1aa75..01c3192ea07bc714b6f9403d44ae737d20bc3967 100644 (file)
@@ -541,6 +541,7 @@ set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
 set g_balance_hagar_secondary_load 0
 set g_balance_hagar_secondary_load_speed 0.6
+set g_balance_hagar_secondary_load_spread 0.075
 set g_balance_hagar_secondary_load_max 4
 set g_balance_hagar_secondary_load_hold 0
 set g_balance_hagar_secondary_load_releasedeath 1
index 7b7a3fcef0e66ff00f44a5e2828ead66486fcb69..779aca49d66571a12ab22ce878230025ffde29ae 100644 (file)
@@ -325,6 +325,7 @@ float autocvar_g_balance_hagar_primary_speed;
 float autocvar_g_balance_hagar_secondary;
 float autocvar_g_balance_hagar_secondary_load;
 float autocvar_g_balance_hagar_secondary_load_speed;
+float autocvar_g_balance_hagar_secondary_load_spread;
 float autocvar_g_balance_hagar_secondary_load_max;
 float autocvar_g_balance_hagar_secondary_load_hold;
 float autocvar_g_balance_hagar_secondary_load_releasedeath;
@@ -337,6 +338,8 @@ float autocvar_g_balance_hagar_secondary_lifetime_min;
 float autocvar_g_balance_hagar_secondary_lifetime_rand;
 float autocvar_g_balance_hagar_secondary_radius;
 float autocvar_g_balance_hagar_secondary_refire;
+float autocvar_g_balance_hagar_secondary_speed;
+float autocvar_g_balance_hagar_secondary_spread;
 float autocvar_g_balance_hagar_reload_ammo;
 float autocvar_g_balance_hagar_reload_time;
 float autocvar_g_balance_health_limit;
index 26d2df69e89507ac3bc7bb8f10690ee96703884f..717ec544b1d63ebfeb76e7f1f6ff7ecc8dbb60fa 100644 (file)
@@ -118,7 +118,7 @@ void W_Hagar_Attack2_Load_Release (void)
        // time to release the rockets we've loaded
 
        local entity missile;
-       local float counter, shots;
+       local float counter, shots, spread_pershot;
        local vector s;
        vector forward, right, up;
 
@@ -153,7 +153,10 @@ void W_Hagar_Attack2_Load_Release (void)
                setorigin (missile, w_shotorg);
                setsize(missile, '0 0 0', '0 0 0');
                missile.movetype = MOVETYPE_FLY;
-
+               
+               // handle the calculation for the shot pattern and its spread
+               spread_pershot = (autocvar_g_balance_hagar_secondary_spread * ((counter + 1) / shots));
+               
                s = '0 0 0';
                if (counter == 0)
                        s = '0 0 0';
@@ -163,8 +166,9 @@ void W_Hagar_Attack2_Load_Release (void)
                        s_y = v_forward_x;
                        s_z = v_forward_y;
                }
-               s = s * cvar("g_balance_hagar_secondary_spread") * g_weaponspreadfactor;
-               W_SetupProjectileVelocityEx(missile, w_shotdir + right * s_y + up * s_z, v_up, cvar("g_balance_hagar_secondary_speed"), 0, 0, 0, FALSE);
+               s = s * autocvar_g_balance_hagar_secondary_load_spread * g_weaponspreadfactor;
+               
+               W_SetupProjectileVelocityEx(missile, w_shotdir + right * s_y + up * s_z, v_up, autocvar_g_balance_hagar_secondary_speed, 0, 0, spread_pershot, FALSE);
 
                missile.angles = vectoangles (missile.velocity);
                missile.flags = FL_PROJECTILE;