]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add toggle option for old and new laser behavior
authorSamual Lenks <samual@xonotic.org>
Sat, 21 Jul 2012 04:52:08 +0000 (00:52 -0400)
committerSamual Lenks <samual@xonotic.org>
Sat, 21 Jul 2012 04:52:08 +0000 (00:52 -0400)
balance25.cfg
balanceFruitieX.cfg
balanceXPM.cfg
balanceXonotic.cfg
qcsrc/server/autocvars.qh
qcsrc/server/w_laser.qc

index aafb163b441941ea73ad9a0ba736837fcc0bc25f..c76f760eb1f3c1c92c42ef9d63e191a973bada1a 100644 (file)
@@ -228,6 +228,7 @@ set g_balance_grapplehook_damagedbycontents 0
 
 // {{{ weapon properties
 // {{{ laser
+set g_balance_laser_oldprimary 1
 set g_balance_laser_primary_damage 35
 set g_balance_laser_primary_edgedamage 10
 set g_balance_laser_primary_force 400
@@ -243,7 +244,7 @@ set g_balance_laser_primary_gauntlet 0
 set g_balance_laser_primary_force_zscale 1
 set g_balance_laser_primary_force_velocitybias 0
 set g_balance_laser_primary_force_other_scale 1
-set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
+set g_balance_laser_secondary 0 // 0 = switch away to last used weapon, 1 = projectile secondary, 2 = gauntlet secondary
 set g_balance_laser_secondary_damage 35
 set g_balance_laser_secondary_edgedamage 10
 set g_balance_laser_secondary_force 400
index 1bb8989120df04a0f5f3b7864c66c23ab0df2f57..2e826476d3344632834389afd2ff097b7b2c1547 100644 (file)
@@ -228,6 +228,7 @@ set g_balance_grapplehook_damagedbycontents 0
 
 // {{{ weapon properties
 // {{{ laser
+set g_balance_laser_oldprimary 1
 set g_balance_laser_primary_damage 20 // dps 33, hope that's not too high
 set g_balance_laser_primary_edgedamage 20
 set g_balance_laser_primary_force 150 // this looks insanely low, but actually isn't with zscale and velocitybias
@@ -243,7 +244,7 @@ set g_balance_laser_primary_gauntlet 0
 set g_balance_laser_primary_force_zscale 2 // 300 upforce
 set g_balance_laser_primary_force_velocitybias 0.3
 set g_balance_laser_primary_force_other_scale 2.5 // force 375 when pushing others around
-set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
+set g_balance_laser_secondary 0 // 0 = switch away to last used weapon, 1 = projectile secondary, 2 = gauntlet secondary
 set g_balance_laser_secondary_damage 200 // dps
 set g_balance_laser_secondary_edgedamage 0
 set g_balance_laser_secondary_force 1300
index 759551d8d2357a4a2e53f7f1125d229659802fe7..609d8fb5b680bc2160091e232cba1057ec612e7b 100644 (file)
@@ -228,6 +228,7 @@ set g_balance_grapplehook_damagedbycontents 1
 
 // {{{ weapon properties
 // {{{ laser
+set g_balance_laser_oldprimary 1
 set g_balance_laser_primary_damage 25
 set g_balance_laser_primary_edgedamage 12.5
 set g_balance_laser_primary_force 300
@@ -243,7 +244,7 @@ set g_balance_laser_primary_gauntlet 0
 set g_balance_laser_primary_force_zscale 1.25
 set g_balance_laser_primary_force_velocitybias 0
 set g_balance_laser_primary_force_other_scale 1
-set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
+set g_balance_laser_secondary 0 // 0 = switch away to last used weapon, 1 = projectile secondary, 2 = gauntlet secondary
 set g_balance_laser_secondary_damage 25
 set g_balance_laser_secondary_edgedamage 12.5
 set g_balance_laser_secondary_force 400
index 007619985905c47954e971c03c4df2c0ef5b17e2..c0bb7ac1697e9ceb6118e5ff4e736a5cee492155 100644 (file)
@@ -228,6 +228,7 @@ set g_balance_grapplehook_damagedbycontents 1
 
 // {{{ weapon properties
 // {{{ laser
+set g_balance_laser_oldprimary 0
 set g_balance_laser_primary_damage 25
 set g_balance_laser_primary_edgedamage 12.5
 set g_balance_laser_primary_force 300
@@ -243,7 +244,7 @@ set g_balance_laser_primary_gauntlet 0
 set g_balance_laser_primary_force_zscale 1.25
 set g_balance_laser_primary_force_velocitybias 0
 set g_balance_laser_primary_force_other_scale 1
-set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
+set g_balance_laser_secondary 0 // 0 = switch away to last used weapon, 1 = projectile secondary, 2 = gauntlet secondary
 set g_balance_laser_secondary_damage 25
 set g_balance_laser_secondary_edgedamage 12.5
 set g_balance_laser_secondary_force 400
index f9e1a2f7055ab6038b40e26753b9593cff1ef76e..e5964b933679f6db4378b6ad38734ebc2c7d77ee 100644 (file)
@@ -427,6 +427,7 @@ float autocvar_g_balance_keyhunt_score_push;
 float autocvar_g_balance_keyhunt_throwvelocity;
 float autocvar_g_balance_kill_delay;
 float autocvar_g_balance_kill_antispam;
+float autocvar_g_balance_laser_oldprimary;
 float autocvar_g_balance_laser_primary_animtime;
 float autocvar_g_balance_laser_primary_damage;
 float autocvar_g_balance_laser_primary_delay;
@@ -452,6 +453,7 @@ float autocvar_g_balance_laser_secondary_force_velocitybias;
 float autocvar_g_balance_laser_secondary_force_zscale;
 float autocvar_g_balance_laser_secondary_lifetime;
 float autocvar_g_balance_laser_secondary_radius;
+float autocvar_g_balance_laser_secondary_refire;
 float autocvar_g_balance_laser_secondary_speed;
 float autocvar_g_balance_laser_reload_ammo;
 float autocvar_g_balance_laser_reload_time;
index cb80b3a8e50856caaf51102b70a30dd3f14fe203..5406bfcfc0f683dd33c623a9c1beb17e2ebe2c2b 100644 (file)
@@ -364,26 +364,51 @@ float w_laser(float req)
                        {
                                W_DecreaseAmmo(ammo_none, 1, TRUE);
 
-                               W_Laser_Shockwave();
+
+                               if not(autocvar_g_balance_laser_oldprimary)
+                                       W_Laser_Shockwave();
+                               else
+                                       W_Laser_Attack(FALSE);
+
                                weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_laser_primary_animtime, w_ready);
                        }
                }
                else if (self.BUTTON_ATCK2)
                {
-                       if(autocvar_g_balance_laser_secondary)
+                       switch(autocvar_g_balance_laser_secondary)
                        {
-                               W_DecreaseAmmo(ammo_none, 1, TRUE);
+                               case 0: // switch to last used weapon
+                               {
+                                       if(self.switchweapon == WEP_LASER) // don't do this if already switching
+                                               W_LastWeapon();
 
-                               if (weapon_prepareattack(0, 0))
+                                       break;
+                               }
+
+                               case 1: // normal projectile secondary
                                {
-                                       W_Laser_Attack2();
-                                       weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_laser_secondary_animtime, w_ready);
+                                       if(weapon_prepareattack(0, autocvar_g_balance_laser_secondary_refire))
+                                       {
+                                               W_DecreaseAmmo(ammo_none, 1, TRUE);
+                                               W_Laser_Attack(TRUE);
+                                               weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_laser_secondary_animtime, w_ready);
+                                       }
+
+                                       break;
+                               }
+
+                               case 2: // gauntlet secondary
+                               {
+                                       W_DecreaseAmmo(ammo_none, 1, TRUE);
+
+                                       if (weapon_prepareattack(0, 0))
+                                       {
+                                               W_Laser_Attack2();
+                                               weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_laser_secondary_animtime, w_ready);
+                                       }
+
+                                       break;
                                }
-                       }
-                       else
-                       {
-                               if(self.switchweapon == WEP_LASER) // don't do this if already switching
-                                       W_LastWeapon();
                        }
                }
        }