crylink: add a cvar for initial pre-linkjoin delay
authorRudolf Polzer <divverent@alientrap.org>
Tue, 4 Jan 2011 10:27:44 +0000 (11:27 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Tue, 4 Jan 2011 10:27:44 +0000 (11:27 +0100)
balance25.cfg
balanceLeeStricklin.cfg
balanceSamual.cfg
balanceXonotic.cfg
balancetZork.cfg
fixbalance.sh [new file with mode: 0755]
qcsrc/server/autocvars.qh
qcsrc/server/w_crylink.qc

index 0a0043f..f50eb7e 100644 (file)
@@ -267,6 +267,7 @@ set g_balance_uzi_mode 0                            // Activates varible spread for sustained & burst m
 set g_balance_uzi_spread_min 0.02
 set g_balance_uzi_spread_max 0.6
 set g_balance_uzi_spread_add 0.012
+
 set g_balance_uzi_burst 0                              // # of bullets in a burst (if set to 2 or more)
 set g_balance_uzi_burst_refire 0.05            // refire between burst bullets
 set g_balance_uzi_burst_refire2 0.75   // refire after burst
@@ -274,17 +275,20 @@ set g_balance_uzi_burst_spread 0.04
 set g_balance_uzi_burst_damage 18              
 set g_balance_uzi_burst_force 50
 set g_balance_uzi_burst_ammo 3
+
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 30
 set g_balance_uzi_first_force 50
 set g_balance_uzi_first_spread 0.015
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 1
+
 set g_balance_uzi_sustained_damage 15
 set g_balance_uzi_sustained_force 27
 set g_balance_uzi_sustained_spread 0.05
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
+
 set g_balance_uzi_speed 18000
 set g_balance_uzi_bulletconstant 115 // 13.1qu
 // }}}
@@ -328,7 +332,7 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
 set g_balance_minelayer_damage 35
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
@@ -406,6 +410,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
@@ -433,6 +438,7 @@ set g_balance_crylink_secondary_refire 0.5
 set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
index 5874f70..dd1a202 100644 (file)
@@ -267,6 +267,7 @@ set g_balance_uzi_mode 0                            // Activates varible spread for sustained & burst m
 set g_balance_uzi_spread_min 0.02
 set g_balance_uzi_spread_max 0.6
 set g_balance_uzi_spread_add 0.012
+
 set g_balance_uzi_burst 0                              // # of bullets in a burst (if set to 2 or more)
 set g_balance_uzi_burst_refire 0.05            // refire between burst bullets
 set g_balance_uzi_burst_refire2 0.75   // refire after burst
@@ -274,21 +275,24 @@ set g_balance_uzi_burst_spread 0.04
 set g_balance_uzi_burst_damage 18              
 set g_balance_uzi_burst_force 50
 set g_balance_uzi_burst_ammo 3
+
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 26
 set g_balance_uzi_first_force -30
 set g_balance_uzi_first_spread 0.01
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 1
+
 set g_balance_uzi_sustained_damage 17
 set g_balance_uzi_sustained_force 27
 set g_balance_uzi_sustained_spread 0.05
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
+
 set g_balance_uzi_speed 18000
 set g_balance_uzi_bulletconstant 300 // 13.1qu
 // }}}
-// {{{ mortar 
+// {{{ mortar
 set g_balance_grenadelauncher_primary_type 0
 set g_balance_grenadelauncher_primary_damage 65
 set g_balance_grenadelauncher_primary_edgedamage 35
@@ -328,7 +332,7 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.7
 set g_balance_grenadelauncher_bouncestop 0.12
 // }}}
-// {{{ minelayer 
+// {{{ minelayer
 set g_balance_minelayer_damage 65
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
@@ -350,7 +354,7 @@ set g_balance_minelayer_remote_edgedamage 40
 set g_balance_minelayer_remote_radius 200
 set g_balance_minelayer_remote_force 300
 // }}}
-// {{{ electro 
+// {{{ electro
 set g_balance_electro_lightning 0
 set g_balance_electro_primary_damage 55
 set g_balance_electro_primary_edgedamage 5
@@ -406,6 +410,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.30008
 set g_balance_crylink_primary_ammo 3
 set g_balance_crylink_primary_bouncedamagefactor 0.2
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
@@ -433,6 +438,7 @@ set g_balance_crylink_secondary_refire 0.5
 set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 3
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
@@ -514,7 +520,7 @@ set g_balance_hagar_secondary_lifetime_rand 0
 set g_balance_hagar_secondary_refire 0.15
 set g_balance_hagar_secondary_ammo 2
 // }}}
-// {{{ rocketlauncher 
+// {{{ rocketlauncher
 set g_balance_rocketlauncher_damage 65
 set g_balance_rocketlauncher_edgedamage 25
 set g_balance_rocketlauncher_force 360
index eef3cf8..bfe331b 100644 (file)
@@ -267,6 +267,7 @@ set g_balance_uzi_mode 0                            // Activates varible spread for sustained & burst m
 set g_balance_uzi_spread_min 0.02
 set g_balance_uzi_spread_max 0.6
 set g_balance_uzi_spread_add 0.012
+
 set g_balance_uzi_burst 0                              // # of bullets in a burst (if set to 2 or more)
 set g_balance_uzi_burst_refire 0.05            // refire between burst bullets
 set g_balance_uzi_burst_refire2 0.75   // refire after burst
@@ -274,17 +275,20 @@ set g_balance_uzi_burst_spread 0.04
 set g_balance_uzi_burst_damage 18              
 set g_balance_uzi_burst_force 50
 set g_balance_uzi_burst_ammo 3
+
 set g_balance_uzi_first 1
 set g_balance_uzi_first_damage 18
 set g_balance_uzi_first_force 20
 set g_balance_uzi_first_spread 0.03
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 1
+
 set g_balance_uzi_sustained_damage 10
 set g_balance_uzi_sustained_force 10
 set g_balance_uzi_sustained_spread 0.08
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
+
 set g_balance_uzi_speed 18000
 set g_balance_uzi_bulletconstant 115 // 13.1qu
 // }}}
@@ -328,7 +332,7 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
 set g_balance_minelayer_damage 35
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
@@ -350,7 +354,7 @@ set g_balance_minelayer_remote_edgedamage 40
 set g_balance_minelayer_remote_radius 200
 set g_balance_minelayer_remote_force 300
 // }}}
-// {{{ electro // TODO
+// {{{ electro
 set g_balance_electro_lightning 1
 set g_balance_electro_primary_damage 90
 set g_balance_electro_primary_edgedamage 0
@@ -393,7 +397,7 @@ set g_balance_electro_combo_radius 250
 set g_balance_electro_combo_comboradius 0
 set g_balance_electro_combo_speed 400
 // }}}
-// {{{ crylink 
+// {{{ crylink
 set g_balance_crylink_primary_damage 10
 set g_balance_crylink_primary_edgedamage 0
 set g_balance_crylink_primary_force -55
@@ -406,6 +410,7 @@ set g_balance_crylink_primary_refire 0.4
 set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 0
@@ -433,6 +438,7 @@ set g_balance_crylink_secondary_refire 0.2
 set g_balance_crylink_secondary_animtime 0.2
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
index 8eaa6c7..b66ef86 100644 (file)
@@ -410,6 +410,7 @@ set g_balance_crylink_primary_refire 0.8
 set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0.2
 set g_balance_crylink_primary_jointime 0.1
 set g_balance_crylink_primary_joinexplode 0
@@ -437,6 +438,7 @@ set g_balance_crylink_secondary_refire 0.15
 set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
index 52dc2bf..e7f5431 100644 (file)
@@ -55,67 +55,52 @@ set g_balance_nix_ammoincr_fuel 2
 // {{{ pickup items
 set g_pickup_ammo_anyway 1
 set g_pickup_weapons_anyway 1
-
 set g_pickup_shells 20
 set g_pickup_shells_weapon 10
 set g_pickup_shells_max 50
-
 set g_pickup_nails 60
 set g_pickup_nails_weapon 60
 set g_pickup_nails_max 300
-
 set g_pickup_rockets 25
 set g_pickup_rockets_weapon 15
 set g_pickup_rockets_max 150
-
 set g_pickup_cells 30
 set g_pickup_cells_weapon 20
 set g_pickup_cells_max 300
-
 set g_pickup_fuel 25
 set g_pickup_fuel_weapon 15
 set g_pickup_fuel_jetpack 50
 set g_pickup_fuel_max 999
-
 set g_pickup_armorsmall 5
 set g_pickup_armorsmall_max 999
 set g_pickup_armorsmall_anyway 0
-
 set g_pickup_armormedium 25
 set g_pickup_armormedium_max 100
 set g_pickup_armormedium_anyway 0
-
 set g_pickup_armorbig 50
 set g_pickup_armorbig_max 150
 set g_pickup_armorbig_anyway 0
-
 set g_pickup_armorlarge 100
 set g_pickup_armorlarge_max 999
 set g_pickup_armorlarge_anyway 0
-
 set g_pickup_healthsmall 5
 set g_pickup_healthsmall_max 999
 set g_pickup_healthsmall_anyway 0
-
 set g_pickup_healthmedium 25
 set g_pickup_healthmedium_max 100
 set g_pickup_healthmedium_anyway 0
-
 set g_pickup_healthlarge 50
 set g_pickup_healthlarge_max 150
 set g_pickup_healthlarge_anyway 0
-
 set g_pickup_healthmega 100
 set g_pickup_healthmega_max 999
 set g_pickup_healthmega_anyway 0
-
 set g_pickup_respawntime_short 15
 set g_pickup_respawntime_medium 20
 set g_pickup_respawntime_long 30
 set g_pickup_respawntime_powerup 120
 set g_pickup_respawntime_weapon 20
 set g_pickup_respawntime_ammo 15
-
 set g_pickup_respawntimejitter_short 0
 set g_pickup_respawntimejitter_medium 0
 set g_pickup_respawntimejitter_long 0
@@ -277,7 +262,6 @@ set g_balance_shotgun_secondary_force 150
 set g_balance_shotgun_secondary_refire 1.1
 set g_balance_shotgun_secondary_animtime 1
 // }}}
-
 // {{{ uzi
 set g_balance_uzi_mode 1                               // Activates varible spread for sustained & burst mode secondary
 set g_balance_uzi_spread_min 0.02
@@ -348,7 +332,7 @@ set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
 set g_balance_grenadelauncher_bouncefactor 0.5
 set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
-// {{{ minelayer // TODO
+// {{{ minelayer
 set g_balance_minelayer_damage 35
 set g_balance_minelayer_edgedamage 30
 set g_balance_minelayer_force 250
@@ -388,7 +372,6 @@ set g_balance_electro_primary_range 0
 set g_balance_electro_primary_falloff_mindist 255 // 0.3 * radius
 set g_balance_electro_primary_falloff_maxdist 850
 set g_balance_electro_primary_falloff_halflifedist 425
-
 set g_balance_electro_secondary_damage 25
 set g_balance_electro_secondary_edgedamage 0
 set g_balance_electro_secondary_force 50
@@ -407,7 +390,6 @@ set g_balance_electro_secondary_damageforcescale 2
 set g_balance_electro_secondary_count 3
 set g_balance_electro_secondary_bouncefactor 0.5
 set g_balance_electro_secondary_bouncestop 0.075
-
 set g_balance_electro_combo_damage 80
 set g_balance_electro_combo_edgedamage 10
 set g_balance_electro_combo_force 150
@@ -428,6 +410,7 @@ set g_balance_crylink_primary_refire 1
 set g_balance_crylink_primary_animtime 0.4
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
+set g_balance_crylink_primary_joindelay 0
 set g_balance_crylink_primary_joinspread 0.1
 set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_joinexplode 1                            //if != 0 do a extra damage pass when projectiles join
@@ -436,6 +419,7 @@ set g_balance_crylink_primary_joinexplode_edgedamage 20
 set g_balance_crylink_primary_joinexplode_radius 200
 set g_balance_crylink_primary_joinexplode_force 400
 set g_balance_crylink_primary_linkexplode 0
+
 set g_balance_crylink_primary_middle_lifetime 5 
 set g_balance_crylink_primary_middle_fadetime 0.25
 set g_balance_crylink_primary_other_lifetime 2 // range: 800 full, fades to 1300
@@ -454,6 +438,7 @@ set g_balance_crylink_secondary_refire 0.15
 set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
+set g_balance_crylink_secondary_joindelay 0
 set g_balance_crylink_secondary_joinspread 0
 set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_joinexplode 0                  
@@ -535,7 +520,7 @@ set g_balance_hagar_secondary_lifetime_rand 0
 set g_balance_hagar_secondary_refire 0.15
 set g_balance_hagar_secondary_ammo 1
 // }}}
-// {{{ rocketlauncher // TODO
+// {{{ rocketlauncher
 set g_balance_rocketlauncher_damage 120
 set g_balance_rocketlauncher_edgedamage 25
 set g_balance_rocketlauncher_force 350
@@ -615,6 +600,7 @@ set g_balance_hlac_secondary_force 100
 set g_balance_hlac_secondary_radius 50
 set g_balance_hlac_secondary_speed 15000
 set g_balance_hlac_secondary_lifetime 3
+
 set g_balance_hlac_secondary_refire 1
 set g_balance_hlac_secondary_animtime 0.7
 set g_balance_hlac_secondary_ammo 10
@@ -716,7 +702,6 @@ set g_balance_seeker_flac_speed 5000
 set g_balance_seeker_flac_speed_up 500
 set g_balance_seeker_flac_speed_z 0
 set g_balance_seeker_flac_spread 0.25
-
 set g_balance_seeker_missile_accel 1400
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
@@ -744,7 +729,6 @@ set g_balance_seeker_missile_speed_z 0
 set g_balance_seeker_missile_speed_max 1400
 set g_balance_seeker_missile_spread 0
 set g_balance_seeker_missile_turnrate 0.65
-
 set g_balance_seeker_tag_ammo 1
 set g_balance_seeker_tag_animtime 0.3
 set g_balance_seeker_tag_damageforcescale 4
diff --git a/fixbalance.sh b/fixbalance.sh
new file mode 100755 (executable)
index 0000000..cfc6cc0
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+main=balanceXonotic.cfg
+for X in balance*.cfg; do
+       case "$X" in
+               "$main")
+                       ;;
+               *)
+                       perl ../../misc/tools/cfgapply.pl "$main" "$X" > "$X.new" && mv "$X.new" "$X"
+                       ;;
+       esac
+done
+git diff
index fb1b6ee..8e67f61 100644 (file)
@@ -121,6 +121,7 @@ float autocvar_g_balance_crylink_primary_bounces;
 float autocvar_g_balance_crylink_primary_damage;
 float autocvar_g_balance_crylink_primary_edgedamage;
 float autocvar_g_balance_crylink_primary_force;
+float autocvar_g_balance_crylink_primary_joindelay;
 float autocvar_g_balance_crylink_primary_joinexplode;
 float autocvar_g_balance_crylink_primary_joinexplode_damage;
 float autocvar_g_balance_crylink_primary_joinexplode_edgedamage;
@@ -146,6 +147,7 @@ float autocvar_g_balance_crylink_secondary_bounces;
 float autocvar_g_balance_crylink_secondary_damage;
 float autocvar_g_balance_crylink_secondary_edgedamage;
 float autocvar_g_balance_crylink_secondary_force;
+float autocvar_g_balance_crylink_secondary_joindelay;
 float autocvar_g_balance_crylink_secondary_joinexplode;
 float autocvar_g_balance_crylink_secondary_joinexplode_damage;
 float autocvar_g_balance_crylink_secondary_joinexplode_edgedamage;
index 4495b72..151b508 100644 (file)
@@ -397,6 +397,7 @@ void W_Crylink_Attack (void)
                        proj.fade_rate = 1 / autocvar_g_balance_crylink_primary_other_fadetime;
                        proj.nextthink = time + autocvar_g_balance_crylink_primary_other_lifetime + autocvar_g_balance_crylink_primary_other_fadetime;
                }
+               proj.teleport_time = time + autocvar_g_balance_crylink_primary_joindelay;
                proj.cnt = autocvar_g_balance_crylink_primary_bounces;
                //proj.scale = 1 + 1 * proj.cnt;
 
@@ -484,6 +485,7 @@ void W_Crylink_Attack2 (void)
                        proj.fade_rate = 1 / autocvar_g_balance_crylink_secondary_line_fadetime;
                        proj.nextthink = time + autocvar_g_balance_crylink_secondary_line_lifetime + autocvar_g_balance_crylink_secondary_line_fadetime;
                }
+               proj.teleport_time = time + autocvar_g_balance_crylink_secondary_joindelay;
                proj.cnt = autocvar_g_balance_crylink_secondary_bounces;
                //proj.scale = 1 + 1 * proj.cnt;
 
@@ -542,7 +544,7 @@ float w_crylink(float req)
                }
                else
                {
-                       if (self.crylink_waitrelease)
+                       if (self.crylink_waitrelease && (!self.crylink_lastgroup || time > self.crylink_lastgroup.teleport_time))
                        {
                                // fired and released now!
                                if(self.crylink_lastgroup)
@@ -550,7 +552,6 @@ float w_crylink(float req)
                                        vector pos;
                                        entity linkjoineffect;
 
-
                                        if(self.crylink_waitrelease == 1)
                                        {
                                                pos = W_Crylink_LinkJoin(self.crylink_lastgroup, autocvar_g_balance_crylink_primary_joinspread * autocvar_g_balance_crylink_primary_speed, autocvar_g_balance_crylink_primary_jointime);
@@ -567,8 +568,6 @@ float w_crylink(float req)
                                        linkjoineffect.nextthink = time + w_crylink_linkjoin_time;
                                        linkjoineffect.owner = self;
                                        setorigin(linkjoineffect, pos);
-
-
                                }
                                self.crylink_waitrelease = 0;
                                if(!w_crylink(WR_CHECKAMMO1) && !w_crylink(WR_CHECKAMMO2))