Merge remote branch 'origin/fruitiex/fruitbalance'
authorRudolf Polzer <divVerent@xonotic.org>
Fri, 12 Nov 2010 06:57:24 +0000 (07:57 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Fri, 12 Nov 2010 06:57:24 +0000 (07:57 +0100)
29 files changed:
balance25.cfg
balanceLeeStricklin.cfg
balanceNexSVN.cfg
balanceSamual.cfg
balanceTest.cfg
balanceXonotic.cfg
balancetZork.cfg
defaultXonotic.cfg
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/csqcprojectile.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/mutator_vampire.qc [new file with mode: 0644]
qcsrc/server/mutators/mutators.qh
qcsrc/server/progs.src
qcsrc/server/teamplay.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_rocketlauncher.qc

index 2754c16..dbf2c8e 100644 (file)
@@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3
 set g_balance_grenadelauncher_primary_ammo 2
 set g_balance_grenadelauncher_primary_health 25
 set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
 
 set g_balance_grenadelauncher_secondary_type 1
@@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 10
 set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.5
+set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
 // {{{ minelayer // TODO
 set g_balance_minelayer_damage 35
@@ -395,6 +394,8 @@ 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
 set g_balance_crylink_primary_middle_fadetime 5
@@ -415,6 +416,8 @@ 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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
 set g_balance_crylink_secondary_middle_fadetime 5
@@ -503,11 +506,6 @@ set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
 set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
 set g_balance_rocketlauncher_remote_damage 105
 set g_balance_rocketlauncher_remote_edgedamage 40
 set g_balance_rocketlauncher_remote_radius 150
index 613a8eb..fa2c255 100644 (file)
@@ -305,8 +305,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3
 set g_balance_grenadelauncher_primary_ammo 2
 set g_balance_grenadelauncher_primary_health 72
 set g_balance_grenadelauncher_primary_damageforcescale 0
-set g_balance_grenadelauncher_primary_bouncefactor 0.7
-set g_balance_grenadelauncher_primary_bouncestop 0.12
 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
 
 set g_balance_grenadelauncher_secondary_type 1
@@ -325,9 +323,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 40
 set g_balance_grenadelauncher_secondary_damageforcescale 0
-set g_balance_grenadelauncher_secondary_bouncefactor 0.7
-set g_balance_grenadelauncher_secondary_bouncestop 0.12
 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.7
+set g_balance_grenadelauncher_bouncestop 0.12
 // }}}
 // {{{ minelayer // TODO
 set g_balance_minelayer_damage 35
@@ -406,6 +405,8 @@ 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
 set g_balance_crylink_primary_middle_fadetime 5
@@ -426,6 +427,8 @@ 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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
 set g_balance_crylink_secondary_middle_fadetime 5
@@ -514,11 +517,6 @@ set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
 set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.60 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
 set g_balance_rocketlauncher_remote_damage 120
 set g_balance_rocketlauncher_remote_edgedamage 46
 set g_balance_rocketlauncher_remote_radius 185
index c8134dc..cd8cb05 100644 (file)
@@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3
 set g_balance_grenadelauncher_primary_ammo 2
 set g_balance_grenadelauncher_primary_health 25
 set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
 set g_balance_grenadelauncher_secondary_type 1
 set g_balance_grenadelauncher_secondary_damage 70
@@ -313,9 +311,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 10
 set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.5
+set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
 // {{{ minelayer // TODO
 set g_balance_minelayer_damage 35
@@ -394,6 +393,8 @@ 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
 set g_balance_crylink_primary_middle_fadetime 5
@@ -414,6 +415,8 @@ 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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
 set g_balance_crylink_secondary_middle_fadetime 5
@@ -502,11 +505,6 @@ set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
 set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
 set g_balance_rocketlauncher_remote_damage 105
 set g_balance_rocketlauncher_remote_edgedamage 40
 set g_balance_rocketlauncher_remote_radius 150
index 8b7c0c2..94ec262 100644 (file)
@@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3
 set g_balance_grenadelauncher_primary_ammo 2
 set g_balance_grenadelauncher_primary_health 25
 set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
 
 set g_balance_grenadelauncher_secondary_type 1
@@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 70
 set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
 set g_balance_grenadelauncher_secondary_remote_detonateprimary 1
+
+set g_balance_grenadelauncher_bouncefactor 0.5
+set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
 // {{{ minelayer // TODO
 set g_balance_minelayer_damage 35
@@ -395,6 +394,8 @@ 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
 set g_balance_crylink_primary_middle_fadetime 5
@@ -415,6 +416,8 @@ set g_balance_crylink_secondary_animtime 0.1
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
 set g_balance_crylink_secondary_middle_fadetime 5
@@ -503,11 +506,6 @@ set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
 set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
 set g_balance_rocketlauncher_remote_damage 80
 set g_balance_rocketlauncher_remote_edgedamage 40
 set g_balance_rocketlauncher_remote_radius 100
index 97c9988..37cc8be 100644 (file)
@@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3
 set g_balance_grenadelauncher_primary_ammo 2
 set g_balance_grenadelauncher_primary_health 25
 set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
 
 set g_balance_grenadelauncher_secondary_type 1
@@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 10
 set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.5
+set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
 // {{{ minelayer // TODO
 set g_balance_minelayer_damage 35
@@ -394,7 +393,9 @@ 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_joinspeed 150
+set g_balance_crylink_primary_joinspeed 250
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_linkexplode 0
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
 set g_balance_crylink_primary_middle_fadetime 5
@@ -414,7 +415,9 @@ 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_joinspeed 150
+set g_balance_crylink_secondary_joinspeed 250
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_linkexplode 0
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
 set g_balance_crylink_secondary_middle_fadetime 5
@@ -503,11 +506,6 @@ set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
 set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
 set g_balance_rocketlauncher_remote_damage 90
 set g_balance_rocketlauncher_remote_edgedamage 20
 set g_balance_rocketlauncher_remote_radius 125
index f8430fe..6cc3e97 100644 (file)
@@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.4
 set g_balance_grenadelauncher_primary_ammo 2
 set g_balance_grenadelauncher_primary_health 80
 set g_balance_grenadelauncher_primary_damageforcescale 0
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.12
 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
 
 set g_balance_grenadelauncher_secondary_type 1
@@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.4
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 40
 set g_balance_grenadelauncher_secondary_damageforcescale 0
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.12
 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.5
+set g_balance_grenadelauncher_bouncestop 0.12
 // }}}
 // {{{ minelayer // TODO
 set g_balance_minelayer_damage 35
@@ -394,7 +393,9 @@ set g_balance_crylink_primary_refire 0.8
 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_joinspeed 150
+set g_balance_crylink_primary_joinspeed 250
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_linkexplode 0
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
 set g_balance_crylink_primary_middle_fadetime 5
@@ -415,6 +416,8 @@ 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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
 set g_balance_crylink_secondary_middle_fadetime 5
@@ -503,11 +506,6 @@ set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
 set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
 set g_balance_rocketlauncher_remote_damage 50
 set g_balance_rocketlauncher_remote_edgedamage 16.5
 set g_balance_rocketlauncher_remote_radius 120
index 9185230..56ea71c 100644 (file)
@@ -294,8 +294,6 @@ set g_balance_grenadelauncher_primary_animtime 0.3
 set g_balance_grenadelauncher_primary_ammo 2
 set g_balance_grenadelauncher_primary_health 25
 set g_balance_grenadelauncher_primary_damageforcescale 4
-set g_balance_grenadelauncher_primary_bouncefactor 0.5
-set g_balance_grenadelauncher_primary_bouncestop 0.075
 set g_balance_grenadelauncher_primary_remote_minbouncecnt 0
 
 set g_balance_grenadelauncher_secondary_type 1
@@ -314,9 +312,10 @@ set g_balance_grenadelauncher_secondary_animtime 0.3
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 10
 set g_balance_grenadelauncher_secondary_damageforcescale 4
-set g_balance_grenadelauncher_secondary_bouncefactor 0.5
-set g_balance_grenadelauncher_secondary_bouncestop 0.075
 set g_balance_grenadelauncher_secondary_remote_detonateprimary 0
+
+set g_balance_grenadelauncher_bouncefactor 0.5
+set g_balance_grenadelauncher_bouncestop 0.075
 // }}}
 // {{{ minelayer // TODO
 set g_balance_minelayer_damage 35
@@ -396,6 +395,8 @@ 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
 set g_balance_crylink_primary_middle_fadetime 5
@@ -416,6 +417,8 @@ 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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
 set g_balance_crylink_secondary_middle_fadetime 5
@@ -504,11 +507,6 @@ set g_balance_rocketlauncher_guideratedelay 0.01 // immediate
 set g_balance_rocketlauncher_guidegoal 512 // goal distance for (non-laser) guiding (higher = less control, lower = erratic)
 set g_balance_rocketlauncher_guidedelay 0.15 // delay before guiding kicks in
 set g_balance_rocketlauncher_guidestop 0 // stop guiding when firing again
-set g_balance_rocketlauncher_laserguided_speed 1000 //650
-set g_balance_rocketlauncher_laserguided_speedaccel 0
-set g_balance_rocketlauncher_laserguided_speedstart 1000
-set g_balance_rocketlauncher_laserguided_turnrate 0.75 //0.5
-set g_balance_rocketlauncher_laserguided_allow_steal 1
 set g_balance_rocketlauncher_remote_damage 90
 set g_balance_rocketlauncher_remote_edgedamage 20
 set g_balance_rocketlauncher_remote_radius 125
index 59c3be6..2e26355 100644 (file)
@@ -526,7 +526,6 @@ set g_minstagib_speed_moverate 1.25 "speed-multiplier that applies while you car
 set g_vampire 0 "set to 1 to enable the vampire mode, where the damage done to your opponent gets added to your own health"
 set g_weaponarena "0"  "put in a list of weapons to enable a weapon arena mode, or try \"all\" or \"most\""
 set g_weaponarena_random "0"   "if set to a number, only that weapon count is given on every spawn (randomly)"
-set g_laserguided_missile 0 "if set to 1 the rockets of the rocket launcher can be steered using a laserpointer"
 set g_midair 0 "if set to 1 you can only apply damage to your opponent while he is airborne"
 set g_midair_shieldtime 0.3 "number of seconds you are still invincible since you lost contact to the ground"
 set g_spawnsound 1 "set to 0 if you don't want to hear the spawn sound when a player spawns"
@@ -2009,6 +2008,9 @@ r_polygonoffset_decals_factor 0
 mod_q3shader_default_polygonoffset -14
 mod_q3shader_default_polygonfactor 0
 
+// allow fullbright
+set sv_allow_fullbright 0 "when set, clients may use r_fullbright on this server without getting a night vision effect overlay"
+
 // other config files
 exec balanceXonotic.cfg
 exec ctfscoring-ai.cfg
index 959d593..8e47e6f 100644 (file)
@@ -269,3 +269,5 @@ string weaponorder_byimpulse;
 string weaponorder_bypriority;
 
 float nex_charge_movingavg;
+
+float serverflags;
index 4846a9f..d358a59 100644 (file)
@@ -1093,6 +1093,8 @@ void Ent_Init()
        nex_scope = !ReadByte();
        campingrifle_scope = !ReadByte();
 
+       serverflags = ReadByte();
+
        if(!postinit)
                PostInit();
 }
index 235b3ae..1c58d39 100644 (file)
@@ -566,7 +566,8 @@ void CSQC_UpdateView(float w, float h)
        // next R_RenderScene call
        drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
 
-       if(cvar("r_fakelight") >= 2 || cvar("r_fullbright"))
+       if(cvar("r_fakelight") >= 2 || cvar("r_fullbright") >= 1)
+       if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)
        {
                // apply night vision effect
                vector rgb, tc_00, tc_01, tc_10, tc_11;
index 9eb7a16..4acf797 100644 (file)
@@ -646,3 +646,5 @@ string HUD_PANELNAME_ENGINEINFO             = "engineinfo";
 string HUD_PANELNAME_INFOMESSAGES      = "infomessages";
 
 float HUD_MENU_ENABLE          = 0;
+
+#define SERVERFLAG_ALLOW_FULLBRIGHT 1
index 35eff19..abdd41e 100644 (file)
@@ -1091,10 +1091,11 @@ float ClientInit_SendEntity(entity to, float sf)
                WriteString(MSG_ENTITY, "");
        WriteByte(MSG_ENTITY, self.count * 255.0); // g_balance_armor_blockpercent
        WriteByte(MSG_ENTITY, self.cnt * 255.0); // g_balance_weaponswitchdelay
-       WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_secondary_bouncefactor
-       WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_secondary_bouncestop
+       WriteCoord(MSG_ENTITY, self.bouncefactor); // g_balance_grenadelauncher_bouncefactor
+       WriteCoord(MSG_ENTITY, self.bouncestop); // g_balance_grenadelauncher_bouncestop
        WriteByte(MSG_ENTITY, cvar("g_balance_nex_secondary")); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, cvar("g_balance_campingrifle_secondary")); // client has to know if it should zoom or not
+       WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
        return TRUE;
 }
 
@@ -1111,14 +1112,14 @@ void ClientInit_CheckUpdate()
                self.cnt = cvar("g_balance_weaponswitchdelay");
                self.SendFlags |= 1;
        }
-       if(self.bouncefactor != cvar("g_balance_grenadelauncher_secondary_bouncefactor"))
+       if(self.bouncefactor != cvar("g_balance_grenadelauncher_bouncefactor"))
        {
-               self.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor");
+               self.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
                self.SendFlags |= 1;
        }
-       if(self.bouncestop != cvar("g_balance_grenadelauncher_secondary_bouncestop"))
+       if(self.bouncestop != cvar("g_balance_grenadelauncher_bouncestop"))
        {
-               self.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop");
+               self.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
                self.SendFlags |= 1;
        }
 }
@@ -1694,11 +1695,6 @@ void ClientDisconnect (void)
 
        bot_relinkplayerlist();
 
-       // remove laserdot
-       if(self.weaponentity)
-               if(self.weaponentity.lasertarget)
-                       remove(self.weaponentity.lasertarget);
-
        if(g_arena)
        {
                Spawnqueue_Unmark(self);
index d890f5d..a2943a7 100644 (file)
@@ -449,6 +449,16 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                take = damage;
        }
 
+       frag_inflictor = inflictor;
+       frag_attacker = attacker;
+       frag_target = self;
+       damage_take = take;
+       damage_save = save;
+       damage_force = force;
+       MUTATOR_CALLHOOK(PlayerDamage);
+       take = bound(0, damage_take, self.health);
+       save = bound(0, damage_save, self.armorvalue);
+
        if(sound_allowed(MSG_BROADCAST, attacker))
        {
                if (save > 10)
@@ -665,11 +675,6 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                // set up to fade out later
                SUB_SetFade (self, time + 6 + random (), 1);
 
-               // remove laserdot
-               if(self.weaponentity)
-                       if(self.weaponentity.lasertarget)
-                               remove(self.weaponentity.lasertarget);
-
                if(clienttype(self) == CLIENTTYPE_REAL)
                {
                        self.fixangle = TRUE;
index 4537573..907f178 100644 (file)
@@ -270,67 +270,6 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
 #define W_SetupShot(ent,antilag,recoil,snd,maxdamage) W_SetupShot_ProjectileSize(ent, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage)
 #define W_SetupShot_Range(ent,antilag,recoil,snd,maxdamage,range) W_SetupShot_Dir_ProjectileSize_Range(ent, v_forward, '0 0 0', '0 0 0', antilag, recoil, snd, maxdamage, range)
 
-void LaserTarget_Think()
-{
-       entity e;
-       vector offset;
-       float uselaser;
-       uselaser = 0;
-
-       // list of weapons that will use the laser, and the options that enable it
-       if(self.owner.laser_on && self.owner.weapon == WEP_ROCKET_LAUNCHER && g_laserguided_missile)
-               uselaser = 1;
-       // example
-       //if(self.owner.weapon == WEP_ELECTRO && cvar("g_laserguided_electro"))
-       //      uselaser = 1;
-
-
-
-       // if a laser-enabled weapon isn't selected, delete any existing laser and quit
-       if(!uselaser)
-       {
-               // rocket launcher isn't selected, so no laser target.
-               if(self.lasertarget != world)
-               {
-                       remove(self.lasertarget);
-                       self.lasertarget = world;
-               }
-               return;
-       }
-
-       if(!self.lasertarget)
-       {
-               // we don't have a lasertarget entity, so spawn one
-               //bprint("create laser target\n");
-               e = self.lasertarget = spawn();
-               e.owner = self.owner;                   // Its owner is my owner
-               e.classname = "laser_target";
-               e.movetype = MOVETYPE_NOCLIP;   // don't touch things
-               setmodel(e, "models/laser_dot.mdl");    // what it looks like, precision set below
-               e.scale = 1.25;                         // make it larger
-               e.alpha = 0.25;                         // transparency
-               e.colormod = '255 0 0' * (1/255) * 8;   // change colors
-               e.effects = EF_FULLBRIGHT | EF_LOWPRECISION;
-               // make it dynamically glow
-               // you should avoid over-using this, as it can slow down the player's computer.
-               e.glow_color = 251; // red color
-               e.glow_size = 12;
-       }
-       else
-               e = self.lasertarget;
-
-       // move the laser dot to where the player is looking
-
-       makevectors(self.owner.v_angle); // set v_forward etc to the direction the player is looking
-       offset = '0 0 26' + v_right*3;
-       traceline(self.owner.origin + offset, self.owner.origin + offset + v_forward * MAX_SHOT_DISTANCE, FALSE, self); // trace forward until you hit something, like a player or wall
-       setorigin(e, trace_endpos + v_forward*8); // move me to where the traceline ended
-       if(trace_plane_normal != '0 0 0')
-               e.angles = vectoangles(trace_plane_normal);
-       else
-               e.angles = vectoangles(v_forward);
-}
-
 float CL_Weaponentity_CustomizeEntityForClient()
 {
        self.viewmodelforclient = self.owner;
@@ -835,9 +774,6 @@ void CL_Weaponentity_Think()
                self.owner.weapon_morph4origin = QCWEAPONANIMATION_ORIGIN(self);
 
        }
-
-       // create or update the lasertarget entity
-       LaserTarget_Think();
 };
 
 void CL_ExteriorWeaponentity_Think()
index d250d39..31e5b77 100644 (file)
@@ -13,7 +13,7 @@ float CSQCProjectile_SendEntity(entity to, float sf)
        if(self.flags & FL_ONGROUND)
                sf |= 0x40;
 
-       if(self.fade_time != 0 && self.fade_rate != 0)
+       if(self.fade_time != 0 || self.fade_rate != 0)
        {
                ft = (self.fade_time - time) / sys_frametime;
                fr = (1 / self.fade_rate) / sys_frametime;
index 45394eb..95fce0a 100644 (file)
@@ -18,7 +18,7 @@ float require_spawnfunc_prefix; // if this float exists, only functions with spa
 float ctf_score_value(string parameter);
 
 float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_ca, g_lms, g_runematch, g_race, g_nexball, g_cts;
-float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_laserguided_missile, g_midair, g_minstagib, g_pinata, g_norecoil, g_vampire, g_minstagib_invis_alpha, g_bloodloss;
+float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_midair, g_minstagib, g_pinata, g_norecoil, g_minstagib_invis_alpha, g_bloodloss;
 float g_warmup_limit;
 float g_warmup_allguns;
 float g_warmup_allow_timeout;
@@ -243,10 +243,6 @@ float alreadychangedlevel;
 .float welcomemessage_time;
 .float version;
 
-// Laser target for laser-guided weapons
-.entity lasertarget;
-.float laser_on;
-
 // minstagib vars
 .float jump_interval;    // laser refire
 
@@ -660,3 +656,5 @@ string deathmessage;
 .float nex_charge;
 
 float allowed_to_spawn; // boolean variable used by the clan arena code to determine if a player can spawn (after the round has ended)
+
+float serverflags;
index 809df9e..460c608 100644 (file)
@@ -789,13 +789,6 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float
 
        if(targ.classname == "player" && attacker.classname == "player" && attacker != targ && attacker.health > 2)
        {
-               // Savage: vampire mode
-               if (g_vampire)
-               if (!g_minstagib)
-               if (time >= self.spawnshieldtime)
-               {
-                       attacker.health += damage;
-               }
                if(g_runematch)
                {
                        if (attacker.runes & RUNE_VAMPIRE)
index b351d77..688b5e4 100644 (file)
@@ -403,6 +403,7 @@ void cvar_changes_init()
                BADCVAR("g_maplist_votable_abstain");
                BADCVAR("g_maplist_votable_nodetail");
                BADCVAR("g_maplist_votable_suggestions");
+               BADCVAR("g_minstagib");
                BADCVAR("g_nexball_goallimit");
                BADCVAR("g_runematch_point_limit");
                BADCVAR("g_start_delay");
@@ -449,6 +450,12 @@ void cvar_changes_init()
                        }
                }
                ++cvar_purechanges_count;
+               // WARNING: this variable is used for the server list
+               // NEVER dare to skip this code!
+               // Hacks to intentionally appearing as "pure server" even though you DO have
+               // modified settings may be punished by removal from the server list.
+               // You can do to the variables cvar_changes and cvar_purechanges all you want,
+               // though.
        }
        buf_del(h);
        if(cvar_changes == "")
@@ -686,24 +693,34 @@ void spawnfunc_worldspawn (void)
                MUTATOR_CALLHOOK(BuildMutatorsString);
                s = ret_string;
 
+               // simple, probably not good in the mutator system
                if(cvar("g_grappling_hook"))
                        s = strcat(s, ":grappling_hook");
+
+               // initialiation stuff, not good in the mutator system
                if(!cvar("g_use_ammunition"))
                        s = strcat(s, ":no_use_ammunition");
+
+               // initialiation stuff, not good in the mutator system
                if(!cvar("g_pickup_items"))
                        s = strcat(s, ":no_pickup_items");
+
+               // initialiation stuff, not good in the mutator system
                if(cvar_string("g_weaponarena") != "0")
                        s = strcat(s, ":", cvar_string("g_weaponarena"), " arena");
-               if(cvar("g_vampire"))
-                       s = strcat(s, ":vampire");
-               if(cvar("g_laserguided_missile"))
-                       s = strcat(s, ":laserguided_missile");
+
+               // TODO to mutator system
                if(cvar("g_norecoil"))
                        s = strcat(s, ":norecoil");
+
+               // TODO to mutator system
                if(cvar("g_midair"))
                        s = strcat(s, ":midair");
+
+               // TODO to mutator system
                if(cvar("g_minstagib"))
                        s = strcat(s, ":minstagib");
+
                GameLogEcho(s);
                GameLogEcho(":gameinfo:end");
        }
index b074164..1d373c9 100644 (file)
@@ -1186,6 +1186,12 @@ void readlevelcvars(void)
                MUTATOR_ADD(mutator_dodging);
        if(cvar("g_rocket_flying"))
                MUTATOR_ADD(mutator_rocketflying);
+       if(cvar("g_vampire"))
+               MUTATOR_ADD(mutator_vampire);
+
+       serverflags = 0;
+       if(cvar("sv_allow_fullbright"))
+               serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
 
     g_bugrigs = cvar("g_bugrigs");
     g_bugrigs_planar_movement = cvar("g_bugrigs_planar_movement");
@@ -1226,11 +1232,9 @@ void readlevelcvars(void)
        g_footsteps = cvar("g_footsteps");
        g_grappling_hook = cvar("g_grappling_hook");
        g_jetpack = cvar("g_jetpack");
-       g_laserguided_missile = cvar("g_laserguided_missile");
        g_midair = cvar("g_midair");
        g_minstagib = cvar("g_minstagib");
        g_norecoil = cvar("g_norecoil");
-       g_vampire = cvar("g_vampire");
        g_bloodloss = cvar("g_bloodloss");
        sv_maxidle = cvar("sv_maxidle");
        sv_maxidle_spectatorsareidle = cvar("sv_maxidle_spectatorsareidle");
index cdc28f7..fdfbdfb 100644 (file)
@@ -118,3 +118,14 @@ MUTATOR_HOOKABLE(EditProjectile);
        // INPUT:
                entity self;
                entity other;
+
+MUTATOR_HOOKABLE(PlayerDamage);
+       // called when a player gets damaged to e.g. remove stuff he was carrying.
+       // INPUT:
+               entity frag_inflictor;
+               entity frag_attacker;
+               entity frag_target; // same as self
+               vector damage_force; // NOTE: this force already HAS been applied (create and use a Damage hook to change that one)
+       // INPUT, OUTPUT:
+               float damage_take;
+               float damage_save;
diff --git a/qcsrc/server/mutators/mutator_vampire.qc b/qcsrc/server/mutators/mutator_vampire.qc
new file mode 100644 (file)
index 0000000..54b5b9f
--- /dev/null
@@ -0,0 +1,37 @@
+MUTATOR_HOOKFUNCTION(vampire_PlayerDamage)
+{
+       if(time < self.spawnshieldtime)
+               return 0;
+       if(g_minstagib)
+       {
+               // minstagib: each hit means +1 ammo
+               frag_attacker.ammo_cells += 2; // note: 1 cell was deducted for the shot
+       }
+       else
+       {
+               // otherwise: each hit gets damage back
+               frag_attacker.health += damage_take;
+       }
+       return 0;
+}
+
+MUTATOR_HOOKFUNCTION(vampire_BuildMutatorsString)
+{
+       ret_string = strcat(ret_string, ":Vampire");
+       return 0;
+}
+
+MUTATOR_HOOKFUNCTION(vampire_BuildMutatorsPrettyString)
+{
+       ret_string = strcat(ret_string, ", Vampire");
+       return 0;
+}
+
+MUTATOR_DEFINITION(mutator_vampire)
+{
+       MUTATOR_HOOK(PlayerDamage, vampire_PlayerDamage, CBC_ORDER_ANY);
+       MUTATOR_HOOK(BuildMutatorsString, vampire_BuildMutatorsString, CBC_ORDER_ANY);
+       MUTATOR_HOOK(BuildMutatorsPrettyString, vampire_BuildMutatorsPrettyString, CBC_ORDER_ANY);
+
+       return 0;
+}
index 91d2ea5..542014e 100644 (file)
@@ -3,3 +3,4 @@ MUTATOR_DECLARATION(gamemode_keyhunt);
 MUTATOR_DECLARATION(mutator_nix);
 MUTATOR_DECLARATION(mutator_dodging);
 MUTATOR_DECLARATION(mutator_rocketflying);
+MUTATOR_DECLARATION(mutator_vampire);
index 1443317..c2718d4 100644 (file)
@@ -180,6 +180,7 @@ mutators/gamemode_keyhunt.qc
 mutators/mutator_nix.qc
 mutators/mutator_dodging.qc
 mutators/mutator_rocketflying.qc
+mutators/mutator_vampire.qc
 
 ../warpzonelib/anglestransform.qc
 ../warpzonelib/mathlib.qc
index 1232e3c..13680e6 100644 (file)
@@ -512,12 +512,8 @@ void PrintWelcomeMessage(entity pl)
                modifications = strcat(modifications, ", Cloaked");
        if(g_grappling_hook)
                modifications = strcat(modifications, ", Hook");
-       if(g_laserguided_missile)
-               modifications = strcat(modifications, ", LG missiles");
        if(g_midair)
                modifications = strcat(modifications, ", Midair");
-       if(g_vampire)
-               modifications = strcat(modifications, ", Vampire");
        if(g_pinata)
                modifications = strcat(modifications, ", Pinata");
        if(g_weapon_stay)
index 5665634..b783f5b 100644 (file)
@@ -44,8 +44,10 @@ void W_Crylink_LinkExplode (entity e, entity e2)
 // stored in w_crylink_linkjoin_time.
 // could possibly network this origin and time, and display a special particle
 // effect when projectiles meet there :P
+// jspeed: MINIMUM jing speed
+// jtime: MAXIMUM jing time (0: none)
 float w_crylink_linkjoin_time;
-vector W_Crylink_LinkJoin(entity e, float joinspeed)
+vector W_Crylink_LinkJoin(entity e, float jspeed, float jtime)
 {
        vector avg_origin, avg_velocity;
        vector targ_origin;
@@ -59,8 +61,8 @@ vector W_Crylink_LinkJoin(entity e, float joinspeed)
        n = 1;
        for(p = e; (p = p.queuenext) != e; )
        {
-               avg_origin += p.origin;
-               avg_velocity += p.velocity;
+               avg_origin += WarpZone_RefSys_TransformOrigin(p, e, p.origin);
+               avg_velocity += WarpZone_RefSys_TransformVelocity(p, e, p.velocity);
                ++n;
        }
        avg_origin *= (1.0 / n);
@@ -72,46 +74,54 @@ vector W_Crylink_LinkJoin(entity e, float joinspeed)
        // yes, mathematically we can do this in ONE step, but beware of 32bit floats...
        avg_dist = pow(vlen(e.origin - avg_origin), 2);
        for(p = e; (p = p.queuenext) != e; )
-               avg_dist += pow(vlen(e.origin - avg_origin), 2);
+               avg_dist += pow(vlen(WarpZone_RefSys_TransformOrigin(p, e, p.origin) - avg_origin), 2);
        avg_dist *= (1.0 / n);
        avg_dist = sqrt(avg_dist);
 
        if(avg_dist == 0)
                return avg_origin; // no change needed
 
-       if(joinspeed == 0)
+       if(jspeed == 0 && jtime == 0)
        {
                e.velocity = avg_velocity;
                UpdateCSQCProjectile(e);
                for(p = e; (p = p.queuenext) != e; )
                {
-                       p.velocity = avg_velocity;
+                       p.velocity = WarpZone_RefSys_TransformVelocity(e, p, avg_velocity);
                        UpdateCSQCProjectile(p);
                }
        }
        else
        {
-               w_crylink_linkjoin_time = avg_dist / joinspeed;
+               if(jtime)
+               {
+                       if(jspeed)
+                               w_crylink_linkjoin_time = min(jtime, avg_dist / jspeed);
+                       else
+                               w_crylink_linkjoin_time = jtime;
+               }
+               else
+                       w_crylink_linkjoin_time = avg_dist / jspeed;
                targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
 
-               e.velocity = (targ_origin - e.origin) * (joinspeed / avg_dist);
+               e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
                UpdateCSQCProjectile(e);
                for(p = e; (p = p.queuenext) != e; )
                {
-                       p.velocity = (targ_origin - p.origin) * (joinspeed / avg_dist);
+                       p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
                        UpdateCSQCProjectile(p);
                }
 
                // analysis:
-               //   joinspeed -> +infinity:
+               //   jspeed -> +infinity:
                //      w_crylink_linkjoin_time -> +0
                //      targ_origin -> avg_origin
                //      p->velocity -> HUEG towards center
-               //   joinspeed -> 0:
+               //   jspeed -> 0:
                //      w_crylink_linkjoin_time -> +/- infinity
                //      targ_origin -> avg_velocity * +/- infinity
                //      p->velocity -> avg_velocity
-               //   joinspeed -> -infinity:
+               //   jspeed -> -infinity:
                //      w_crylink_linkjoin_time -> -0
                //      targ_origin -> avg_origin
                //      p->velocity -> HUEG away from center
@@ -173,7 +183,7 @@ void W_Crylink_Touch (void)
                f = cvar("g_balance_crylink_primary_bouncedamagefactor");
        if(a)
                f *= a;
-       if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_primary_damage") * f, cvar("g_balance_crylink_primary_edgedamage") * f, cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force") * f, self.projectiledeathtype, other))
+       if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_primary_damage") * f, cvar("g_balance_crylink_primary_edgedamage") * f, cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force") * f, self.projectiledeathtype, other) && cvar("g_balance_crylink_primary_linkexplode"))
        {
                W_Crylink_LinkExplode(self.queuenext, self);
                remove (self);
@@ -221,7 +231,7 @@ void W_Crylink_Touch2 (void)
                f = cvar("g_balance_crylink_secondary_bouncedamagefactor");
        if(a)
                f *= a;
-       if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage") * f, cvar("g_balance_crylink_secondary_edgedamage") * f, cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force") * f, self.projectiledeathtype, other))
+       if (RadiusDamage (self, self.realowner, cvar("g_balance_crylink_secondary_damage") * f, cvar("g_balance_crylink_secondary_edgedamage") * f, cvar("g_balance_crylink_secondary_radius"), world, cvar("g_balance_crylink_secondary_force") * f, self.projectiledeathtype, other) && cvar("g_balance_crylink_secondary_linkexplode"))
        {
                W_Crylink_LinkExplode(self.queuenext, self);
                remove (self);
@@ -274,7 +284,11 @@ void W_Crylink_Attack (void)
                proj.classname = "spike";
                proj.bot_dodge = TRUE;
                proj.bot_dodgerating = cvar("g_balance_crylink_primary_damage");
-               if(counter == 0) { // first projectile, store in firstproj for now
+               if(shots == 1) {
+                       proj.queuenext = proj;
+                       proj.queueprev = proj;
+               }
+               else if(counter == 0) { // first projectile, store in firstproj for now
                        firstproj = proj;
                }
                else if(counter == shots - 1) { // last projectile, link up with first projectile
@@ -316,13 +330,13 @@ void W_Crylink_Attack (void)
                if(counter == 0)
                {
                        proj.fade_time = time + cvar("g_balance_crylink_primary_middle_lifetime");
-                       self.fade_rate = 1 / cvar("g_balance_crylink_primary_middle_fadetime");
+                       proj.fade_rate = 1 / cvar("g_balance_crylink_primary_middle_fadetime");
                        proj.nextthink = time + cvar("g_balance_crylink_primary_middle_lifetime") + cvar("g_balance_crylink_primary_middle_fadetime");
                }
                else
                {
                        proj.fade_time = time + cvar("g_balance_crylink_primary_other_lifetime");
-                       self.fade_rate = 1 / cvar("g_balance_crylink_primary_other_fadetime");
+                       proj.fade_rate = 1 / cvar("g_balance_crylink_primary_other_fadetime");
                        proj.nextthink = time + cvar("g_balance_crylink_primary_other_lifetime") + cvar("g_balance_crylink_primary_other_fadetime");
                }
                proj.cnt = cvar("g_balance_crylink_primary_bounces");
@@ -363,7 +377,11 @@ void W_Crylink_Attack2 (void)
                proj.classname = "spike";
                proj.bot_dodge = TRUE;
                proj.bot_dodgerating = cvar("g_balance_crylink_secondary_damage");
-               if(counter == 0) { // first projectile, store in firstproj for now
+               if(shots == 1) {
+                       proj.queuenext = proj;
+                       proj.queueprev = proj;
+               }
+               else if(counter == 0) { // first projectile, store in firstproj for now
                        firstproj = proj;
                }
                else if(counter == shots - 1) { // last projectile, link up with first projectile
@@ -393,13 +411,13 @@ void W_Crylink_Attack2 (void)
                if(counter == (shots - 1) / 2)
                {
                        proj.fade_time = time + cvar("g_balance_crylink_secondary_middle_lifetime");
-                       self.fade_rate = 1 / cvar("g_balance_crylink_secondary_middle_fadetime");
+                       proj.fade_rate = 1 / cvar("g_balance_crylink_secondary_middle_fadetime");
                        proj.nextthink = time + cvar("g_balance_crylink_secondary_middle_lifetime") + cvar("g_balance_crylink_secondary_middle_fadetime");
                }
                else
                {
                        proj.fade_time = time + cvar("g_balance_crylink_secondary_line_lifetime");
-                       self.fade_rate = 1 / cvar("g_balance_crylink_secondary_line_fadetime");
+                       proj.fade_rate = 1 / cvar("g_balance_crylink_secondary_line_fadetime");
                        proj.nextthink = time + cvar("g_balance_crylink_secondary_line_lifetime") + cvar("g_balance_crylink_secondary_line_fadetime");
                }
                proj.cnt = cvar("g_balance_crylink_secondary_bounces");
@@ -443,7 +461,7 @@ float w_crylink(float req)
                        {
                                W_Crylink_Attack();
                                weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_crylink_primary_animtime"), w_ready);
-                               if(cvar("g_balance_crylink_primary_joinspeed") != 0)
+                               if(cvar("g_balance_crylink_primary_joinspeed") != 0 || cvar("g_balance_crylink_primary_jointime") != 0)
                                        self.crylink_waitrelease = 1;
                        }
                }
@@ -454,7 +472,7 @@ float w_crylink(float req)
                        {
                                W_Crylink_Attack2();
                                weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_crylink_secondary_animtime"), w_ready);
-                               if(cvar("g_balance_crylink_secondary_joinspeed") != 0)
+                               if(cvar("g_balance_crylink_secondary_joinspeed") != 0 || cvar("g_balance_crylink_secondary_jointime") != 0)
                                        self.crylink_waitrelease = 2;
                        }
                }
@@ -468,11 +486,11 @@ float w_crylink(float req)
                                        vector pos;
                                        if(self.crylink_waitrelease == 1)
                                        {
-                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspeed"));
+                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspeed"), cvar("g_balance_crylink_primary_jointime"));
                                        }
                                        else
                                        {
-                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspeed"));
+                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspeed"), cvar("g_balance_crylink_secondary_jointime"));
                                        }
 
                                        entity linkjoineffect;
index e92b2b2..75d3d7e 100644 (file)
@@ -174,8 +174,8 @@ void W_Grenade_Attack (void)
        gren.bot_dodge = TRUE;
        gren.bot_dodgerating = cvar("g_balance_grenadelauncher_primary_damage");
        gren.movetype = MOVETYPE_BOUNCE;
-       gren.bouncefactor = cvar("g_balance_grenadelauncher_primary_bouncefactor");
-       gren.bouncestop = cvar("g_balance_grenadelauncher_primary_bouncestop");
+       gren.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
+       gren.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
        PROJECTILE_MAKETRIGGER(gren);
        gren.projectiledeathtype = WEP_GRENADE_LAUNCHER;
        setorigin(gren, w_shotorg);
@@ -221,8 +221,8 @@ void W_Grenade_Attack2 (void)
        gren.bot_dodge = TRUE;
        gren.bot_dodgerating = cvar("g_balance_grenadelauncher_secondary_damage");
        gren.movetype = MOVETYPE_BOUNCE;
-       gren.bouncefactor = cvar("g_balance_grenadelauncher_secondary_bouncefactor");
-       gren.bouncestop = cvar("g_balance_grenadelauncher_secondary_bouncestop");
+       gren.bouncefactor = cvar("g_balance_grenadelauncher_bouncefactor");
+       gren.bouncestop = cvar("g_balance_grenadelauncher_bouncestop");
        PROJECTILE_MAKETRIGGER(gren);
        gren.projectiledeathtype = WEP_GRENADE_LAUNCHER | HITTYPE_SECONDARY;
        setorigin(gren, w_shotorg);
index 3b9c940..aeefbcd 100644 (file)
@@ -171,9 +171,6 @@ void W_Mine_Think (void)
        if (self.owner.deadflag == DEAD_NO)
        if (self.minelayer_detonate)
                W_Mine_RemoteExplode();
-
-       if(self.csqcprojectile_clientanimate == 0)
-               UpdateCSQCProjectile(self);
 }
 
 void W_Mine_Touch (void)
@@ -252,7 +249,7 @@ void W_Mine_Attack (void)
        mine.cnt = time + cvar("g_balance_minelayer_lifetime");
        mine.flags = FL_PROJECTILE;
 
-       CSQCProjectile(mine, FALSE, PROJECTILE_MINE, TRUE);
+       CSQCProjectile(mine, TRUE, PROJECTILE_MINE, TRUE);
 
        // muzzle flash for 1st person view
        flash = spawn ();
index a57da6a..c29fda3 100644 (file)
@@ -37,8 +37,6 @@ void W_Rocket_Explode ()
                        ATTACK_FINISHED(self.owner) = time;
                        self.owner.switchweapon = w_getbestweapon(self.owner);
                }
-               if(g_laserguided_missile)
-                       ATTACK_FINISHED(self.owner) = time + cvar("g_balance_rocketlauncher_refire") * W_WeaponRateFactor();
        }
        remove (self);
 }
@@ -60,8 +58,6 @@ void W_Rocket_DoRemoteExplode ()
                        ATTACK_FINISHED(self.owner) = time;
                        self.owner.switchweapon = w_getbestweapon(self.owner);
                }
-               if(g_laserguided_missile)
-                       ATTACK_FINISHED(self.owner) = time + cvar("g_balance_rocketlauncher_refire") * W_WeaponRateFactor();
        }
        remove (self);
 }
@@ -157,12 +153,11 @@ vector rocket_steerto(vector thisdir, vector goaldir, float maxturn_cos)
 
 void W_Rocket_Think (void)
 {
-       entity e;
        vector desireddir, olddir, newdir, desiredorigin, goal;
 #if 0
        float cosminang, cosmaxang, cosang;
 #endif
-       float turnrate, velspeed, f;
+       float velspeed, f;
        self.nextthink = time;
        if (time > self.cnt)
        {
@@ -172,117 +167,65 @@ void W_Rocket_Think (void)
                return;
        }
 
-       if(g_laserguided_missile)
-       {
-               // accelerate
-               makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
-               velspeed = cvar("g_balance_rocketlauncher_laserguided_speed") * g_weaponspeedfactor - (self.velocity * v_forward);
-               if (velspeed > 0)
-                       self.velocity = self.velocity + v_forward * min(cvar("g_balance_rocketlauncher_laserguided_speedaccel") * frametime, velspeed);
-       }
-       else
-       {
-               // accelerate
-               makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
-               velspeed = cvar("g_balance_rocketlauncher_speed") * g_weaponspeedfactor - (self.velocity * v_forward);
-               if (velspeed > 0)
-                       self.velocity = self.velocity + v_forward * min(cvar("g_balance_rocketlauncher_speedaccel") * g_weaponspeedfactor * frametime, velspeed);
-       }
+       // accelerate
+       makevectors(self.angles_x * '-1 0 0' + self.angles_y * '0 1 0');
+       velspeed = cvar("g_balance_rocketlauncher_speed") * g_weaponspeedfactor - (self.velocity * v_forward);
+       if (velspeed > 0)
+               self.velocity = self.velocity + v_forward * min(cvar("g_balance_rocketlauncher_speedaccel") * g_weaponspeedfactor * frametime, velspeed);
 
        // laser guided, or remote detonation
        if (self.owner.weapon == WEP_ROCKET_LAUNCHER)
        {
-               if(g_laserguided_missile)
+               if(self == self.owner.lastrocket)
+               if not(self.owner.rl_release)
+               if not(self.BUTTON_ATCK2)
+               if(cvar("g_balance_rocketlauncher_guiderate"))
+               if(time > self.pushltime)
+               if(self.owner.deadflag == DEAD_NO)
                {
-                       if(self.rl_detonate_later)
-                               W_Rocket_RemoteExplode();
-
-                       if(cvar("g_balance_rocketlauncher_laserguided_allow_steal"))
-                       {
-                               if(self.owner.laser_on)
-                               {
-                                       if(self.attack_finished_single < time)
-                                       {
-                                               self.attack_finished_single = time + 0.2 + random()*0.3;
-                                               self.enemy = FindLaserTarget(self, 0.7, 0.7);
-                                       }
-
-                                       if(!self.enemy)
-                                               self.enemy = self.owner.weaponentity.lasertarget;
-                               }
-                               else self.enemy = world;
-                       }
-                       else // don't allow stealing: always target my owner's laser (if it exists)
-                               self.enemy = self.owner.weaponentity.lasertarget;
-
-                       if(self.enemy != world)
-                       {
-                               //bprint("Targeting ", self.enemy.owner.netname, "'s laser\n");
-                               velspeed = vlen(self.velocity);
-                               e = self.enemy;//self.owner.weaponentity.lasertarget;
-                               turnrate = cvar("g_balance_rocketlauncher_laserguided_turnrate");//0.65;                                                // how fast to turn
-                               desireddir = normalize(e.origin - self.origin);         // get direction from my position to the laser target
-                               olddir = normalize(self.velocity);                                      // get my current direction
-                               newdir = normalize(olddir + desireddir * turnrate);     // take the average of the 2 directions; not the best method but simple & easy
-                               self.velocity = newdir * velspeed;                                      // make me fly in the new direction at my flight speed
-                               self.angles = vectoangles(self.velocity);                       // turn model in the new flight direction
-
-                               ATTACK_FINISHED(self.owner) = time + 0.2 * W_WeaponRateFactor();
-                       }
-               }
-               else
-               {
-                       if(self == self.owner.lastrocket)
-                       if not(self.owner.rl_release)
-                       if not(self.BUTTON_ATCK2)
-                       if(cvar("g_balance_rocketlauncher_guiderate"))
-                       if(time > self.pushltime)
-                       if(self.owner.deadflag == DEAD_NO)
-                       {
-                               f = cvar("g_balance_rocketlauncher_guideratedelay");
-                               if(f)
-                                       f = bound(0, (time - self.pushltime) / f, 1);
-                               else
-                                       f = 1;
+                       f = cvar("g_balance_rocketlauncher_guideratedelay");
+                       if(f)
+                               f = bound(0, (time - self.pushltime) / f, 1);
+                       else
+                               f = 1;
 
-                               velspeed = vlen(self.velocity);
+                       velspeed = vlen(self.velocity);
 
-                               makevectors(self.owner.v_angle);
-                               desireddir = WarpZone_RefSys_TransformVelocity(self.owner, self, v_forward);
-                               desiredorigin = WarpZone_RefSys_TransformOrigin(self.owner, self, self.owner.origin + self.owner.view_ofs);
-                               olddir = normalize(self.velocity);
+                       makevectors(self.owner.v_angle);
+                       desireddir = WarpZone_RefSys_TransformVelocity(self.owner, self, v_forward);
+                       desiredorigin = WarpZone_RefSys_TransformOrigin(self.owner, self, self.owner.origin + self.owner.view_ofs);
+                       olddir = normalize(self.velocity);
 
 #if 0
-                               // disabled this code because it doesn't do what I want it to do :P
-                               cosminang = cos(cvar("g_balance_rocketlauncher_guidefadeangle") * DEG2RAD);
-                               cosmaxang = cos(cvar("g_balance_rocketlauncher_guidemaxangle") * DEG2RAD);
-                               cosang = desireddir * normalize(self.origin - desiredorigin);
-                               if(cosminang == cosmaxang)
-                                       f *= (cosang >= cosminang);
-                               else
-                                       f *= bound(0, (cosang - cosmaxang) / (cosminang - cosmaxang), 1);
+                       // disabled this code because it doesn't do what I want it to do :P
+                       cosminang = cos(cvar("g_balance_rocketlauncher_guidefadeangle") * DEG2RAD);
+                       cosmaxang = cos(cvar("g_balance_rocketlauncher_guidemaxangle") * DEG2RAD);
+                       cosang = desireddir * normalize(self.origin - desiredorigin);
+                       if(cosminang == cosmaxang)
+                               f *= (cosang >= cosminang);
+                       else
+                               f *= bound(0, (cosang - cosmaxang) / (cosminang - cosmaxang), 1);
 #endif
 
-                               // now it gets tricky... we want to move like some curve to approximate the target direction
-                               // but we are limiting the rate at which we can turn!
-                               goal = desiredorigin + ((self.origin - desiredorigin) * desireddir + cvar("g_balance_rocketlauncher_guidegoal")) * desireddir;
-                               newdir = rocket_steerto(olddir, normalize(goal - self.origin), cos(cvar("g_balance_rocketlauncher_guiderate") * f * frametime * DEG2RAD));
+                       // now it gets tricky... we want to move like some curve to approximate the target direction
+                       // but we are limiting the rate at which we can turn!
+                       goal = desiredorigin + ((self.origin - desiredorigin) * desireddir + cvar("g_balance_rocketlauncher_guidegoal")) * desireddir;
+                       newdir = rocket_steerto(olddir, normalize(goal - self.origin), cos(cvar("g_balance_rocketlauncher_guiderate") * f * frametime * DEG2RAD));
 
-                               self.velocity = newdir * velspeed;
-                               self.angles = vectoangles(self.velocity);
+                       self.velocity = newdir * velspeed;
+                       self.angles = vectoangles(self.velocity);
 
-                               if(!self.count)
-                               {
-                                       pointparticles(particleeffectnum("rocket_guide"), self.origin, self.velocity, 1);
-                                       // TODO add a better sound here
-                                       sound (self.owner, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
-                                       self.count = 1;
-                               }
+                       if(!self.count)
+                       {
+                               pointparticles(particleeffectnum("rocket_guide"), self.origin, self.velocity, 1);
+                               // TODO add a better sound here
+                               sound (self.owner, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
+                               self.count = 1;
                        }
-
-                       if(self.rl_detonate_later)
-                               W_Rocket_RemoteExplode();
                }
+
+               if(self.rl_detonate_later)
+                       W_Rocket_RemoteExplode();
        }
 
        if(self.csqcprojectile_clientanimate == 0)
@@ -345,10 +288,7 @@ void W_Rocket_Attack (void)
        setsize (missile, '-3 -3 -3', '3 3 3'); // give it some size so it can be shot
 
        setorigin (missile, w_shotorg - v_forward * 3); // move it back so it hits the wall at the right point
-       if(g_laserguided_missile && self.laser_on)
-               W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_laserguided_speedstart"), 0);
-       else
-               W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_speedstart"), 0);
+       W_SetupProjectileVelocity(missile, cvar("g_balance_rocketlauncher_speedstart"), 0);
        missile.angles = vectoangles (missile.velocity);
 
        missile.touch = W_Rocket_Touch;
@@ -357,7 +297,7 @@ void W_Rocket_Attack (void)
        missile.cnt = time + cvar("g_balance_rocketlauncher_lifetime");
        missile.flags = FL_PROJECTILE;
 
-       CSQCProjectile(missile, cvar("g_balance_rocketlauncher_guiderate") == 0 && cvar("g_balance_rocketlauncher_speedaccel") == 0 && !g_laserguided_missile, PROJECTILE_ROCKET, FALSE); // because of fly sound
+       CSQCProjectile(missile, cvar("g_balance_rocketlauncher_guiderate") == 0 && cvar("g_balance_rocketlauncher_speedaccel") == 0, PROJECTILE_ROCKET, FALSE); // because of fly sound
 
        // muzzle flash for 1st person view
        flash = spawn ();
@@ -473,71 +413,32 @@ float w_rlauncher(float req)
        }
        else if (req == WR_THINK)
        {
-               if(g_laserguided_missile)
+               if (self.BUTTON_ATCK)
                {
-                       if (self.BUTTON_ATCK && self.rl_release)
+                       if(self.rl_release || cvar("g_balance_rocketlauncher_guidestop"))
+                       if(weapon_prepareattack(0, cvar("g_balance_rocketlauncher_refire")))
                        {
-                               rockfound = 0;
-                               for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.owner == self)
-                               {
-                                       if(!rock.rl_detonate_later)
-                                       {
-                                               rock.rl_detonate_later = TRUE;
-                                               rockfound = 1;
-                                       }
-                               }
-                               if(rockfound)
-                                       sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
-                               else
-                               {
-                                       if (weapon_prepareattack(0, cvar("g_balance_rocketlauncher_refire")))
-                                       {
-                                               W_Rocket_Attack();
-                                               weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_rocketlauncher_animtime"), w_ready);
-                                       }
-                               }
+                               W_Rocket_Attack();
+                               weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_rocketlauncher_animtime"), w_ready);
                                self.rl_release = 0;
                        }
-                       if (!self.BUTTON_ATCK)
-                               self.rl_release = 1;
-                       if (self.BUTTON_ATCK2)
-                       if(self.exteriorweaponentity.attack_finished_single < time)
-                       {
-                               self.exteriorweaponentity.attack_finished_single = time + 0.4;
-                               self.laser_on = !self.laser_on;
-                               // UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
-                               sound (self, CHAN_WEAPON2, "weapons/rocket_mode.wav", VOL_BASE, ATTN_NORM);
-                       }
                }
                else
-               {
-                       if (self.BUTTON_ATCK)
-                       {
-                               if(self.rl_release || cvar("g_balance_rocketlauncher_guidestop"))
-                               if(weapon_prepareattack(0, cvar("g_balance_rocketlauncher_refire")))
-                               {
-                                       W_Rocket_Attack();
-                                       weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_rocketlauncher_animtime"), w_ready);
-                                       self.rl_release = 0;
-                               }
-                       }
-                       else
-                               self.rl_release = 1;
+                       self.rl_release = 1;
 
-                       if (self.BUTTON_ATCK2)
+               if (self.BUTTON_ATCK2)
+               {
+                       rockfound = 0;
+                       for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.owner == self)
                        {
-                               rockfound = 0;
-                               for(rock = world; (rock = find(rock, classname, "rocket")); ) if(rock.owner == self)
+                               if(!rock.rl_detonate_later)
                                {
-                                       if(!rock.rl_detonate_later)
-                                       {
-                                               rock.rl_detonate_later = TRUE;
-                                               rockfound = 1;
-                                       }
+                                       rock.rl_detonate_later = TRUE;
+                                       rockfound = 1;
                                }
-                               if(rockfound)
-                                       sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
                        }
+                       if(rockfound)
+                               sound (self, CHAN_WEAPON2, "weapons/rocket_det.wav", VOL_BASE, ATTN_NORM);
                }
        }
        else if (req == WR_PRECACHE)
@@ -549,10 +450,6 @@ float w_rlauncher(float req)
                precache_sound ("weapons/rocket_det.wav");
                precache_sound ("weapons/rocket_fire.wav");
                precache_sound ("weapons/rocket_mode.wav");
-               if (g_laserguided_missile)
-               {
-                       precache_model ("models/laser_dot.mdl"); // rocket launcher
-               }
        }
        else if (req == WR_SETUP)
        {