From: Samual Date: Wed, 21 Sep 2011 16:13:09 +0000 (-0400) Subject: Rework how the hagar load secondary spread works slightly (add per-shot spread like... X-Git-Tag: xonotic-v0.6.0~40^2~118^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b979ba62e9f7a0f2942c8e6f9211e4ebccdd2668;p=xonotic%2Fxonotic-data.pk3dir.git Rework how the hagar load secondary spread works slightly (add per-shot spread like other normal weapons, plus adjust the normal spread of the attack) --- diff --git a/balance25.cfg b/balance25.cfg index 843bd634f..acb9ad825 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -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 diff --git a/balanceFruit.cfg b/balanceFruit.cfg index 5a078e44c..35bedb5a5 100644 --- a/balanceFruit.cfg +++ b/balanceFruit.cfg @@ -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 diff --git a/balanceLeeStricklin.cfg b/balanceLeeStricklin.cfg index 02e804e79..59f7c25f0 100644 --- a/balanceLeeStricklin.cfg +++ b/balanceLeeStricklin.cfg @@ -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 diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index c909d669d..79c8e9c2d 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -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 diff --git a/balancetZork.cfg b/balancetZork.cfg index 57c499687..01c3192ea 100644 --- a/balancetZork.cfg +++ b/balancetZork.cfg @@ -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 diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index 7b7a3fcef..779aca49d 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -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; diff --git a/qcsrc/server/w_hagar.qc b/qcsrc/server/w_hagar.qc index 26d2df69e..717ec544b 100644 --- a/qcsrc/server/w_hagar.qc +++ b/qcsrc/server/w_hagar.qc @@ -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;