]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/tzork/turretfixes'
authorRudolf Polzer <divVerent@xonotic.org>
Fri, 7 Jan 2011 14:45:40 +0000 (15:45 +0100)
committerRudolf Polzer <divVerent@xonotic.org>
Fri, 7 Jan 2011 14:45:40 +0000 (15:45 +0100)
31 files changed:
balance25.cfg
balanceLeeStricklin.cfg
balanceSamual.cfg
balanceXonotic.cfg
balancetZork.cfg
fixbalance.sh [new file with mode: 0755]
gfx/hud/default/weaponcampingrifle.tga [deleted file]
gfx/hud/default/weaponsniperrifle.tga [new file with mode: 0644]
gfx/hud/luminos/weaponcampingrifle.tga [deleted file]
gfx/hud/luminos/weaponsniperrifle.tga [new file with mode: 0644]
gfx/hud/old/weaponcampingrifle.tga [deleted file]
gfx/hud/old/weaponsniperrifle.tga [new file with mode: 0644]
qcsrc/client/View.qc
qcsrc/client/scoreboard.qc
qcsrc/server/anticheat.qc
qcsrc/server/assault.qc
qcsrc/server/autocvars.qh
qcsrc/server/cl_player.qc
qcsrc/server/func_breakable.qc
qcsrc/server/g_hook.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/base.qh
qcsrc/server/mutators/gamemode_freezetag.qc
qcsrc/server/scores_rules.qc
qcsrc/server/tturrets/system/system_aimprocs.qc
qcsrc/server/tturrets/system/system_damage.qc
qcsrc/server/tturrets/system/system_main.qc
qcsrc/server/tturrets/units/unit_fusionreactor.qc
qcsrc/server/w_crylink.qc
qcsrc/server/w_nex.qc
qcsrc/server/waypointsprites.qc

index 0a0043f597b89d65db70a21015063286c37602e4..f50eb7e290b70ac7635499a0cdb6ca6c1cb35681 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 5874f7057abeb1cc6475f1fb05820ab18fd6c85b..dd1a2022ad500f852ce2c9d5e285c5613278754a 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 eef3cf8e188b5d42ddc7bce389f91973bcb3f2b8..bfe331b151860f02269de54245f3b32f542af4d6 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 5898bf5bf17a2a9d4debf00c86df64c030d14aab..b66ef86bd6682d916cb3850f50cbd46414ef41b6 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                  
@@ -611,7 +613,7 @@ set g_balance_sniperrifle_auto_reload_on_switch 0
 set g_balance_sniperrifle_bursttime 0
 set g_balance_sniperrifle_primary_tracer 1
 set g_balance_sniperrifle_primary_damage 60
-set g_balance_sniperrifle_primary_headshotaddeddamage 100
+set g_balance_sniperrifle_primary_headshotaddeddamage 60
 set g_balance_sniperrifle_primary_spread 0
 set g_balance_sniperrifle_primary_force 2
 set g_balance_sniperrifle_primary_speed 40000
@@ -625,7 +627,7 @@ set g_balance_sniperrifle_primary_bullethail 0 // empty magazine on shot
 set g_balance_sniperrifle_secondary 1
 set g_balance_sniperrifle_secondary_tracer 0
 set g_balance_sniperrifle_secondary_damage 42
-set g_balance_sniperrifle_secondary_headshotaddeddamage 70
+set g_balance_sniperrifle_secondary_headshotaddeddamage 42
 set g_balance_sniperrifle_secondary_spread 0
 set g_balance_sniperrifle_secondary_force 2
 set g_balance_sniperrifle_secondary_speed 20000
index 52dc2bf4f51e166ce629a136b0af820d3642fc02..e7f5431d045aefcd0946461e388ab07b0922ec62 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
diff --git a/gfx/hud/default/weaponcampingrifle.tga b/gfx/hud/default/weaponcampingrifle.tga
deleted file mode 100644 (file)
index f5c2e55..0000000
Binary files a/gfx/hud/default/weaponcampingrifle.tga and /dev/null differ
diff --git a/gfx/hud/default/weaponsniperrifle.tga b/gfx/hud/default/weaponsniperrifle.tga
new file mode 100644 (file)
index 0000000..f5c2e55
Binary files /dev/null and b/gfx/hud/default/weaponsniperrifle.tga differ
diff --git a/gfx/hud/luminos/weaponcampingrifle.tga b/gfx/hud/luminos/weaponcampingrifle.tga
deleted file mode 100644 (file)
index f5c2e55..0000000
Binary files a/gfx/hud/luminos/weaponcampingrifle.tga and /dev/null differ
diff --git a/gfx/hud/luminos/weaponsniperrifle.tga b/gfx/hud/luminos/weaponsniperrifle.tga
new file mode 100644 (file)
index 0000000..f5c2e55
Binary files /dev/null and b/gfx/hud/luminos/weaponsniperrifle.tga differ
diff --git a/gfx/hud/old/weaponcampingrifle.tga b/gfx/hud/old/weaponcampingrifle.tga
deleted file mode 100644 (file)
index 09da559..0000000
Binary files a/gfx/hud/old/weaponcampingrifle.tga and /dev/null differ
diff --git a/gfx/hud/old/weaponsniperrifle.tga b/gfx/hud/old/weaponsniperrifle.tga
new file mode 100644 (file)
index 0000000..09da559
Binary files /dev/null and b/gfx/hud/old/weaponsniperrifle.tga differ
index 160ad063f17744ef89c96c6480fa08c36ad82b81..704e58107f597a67ec33e3b201a816da196b09fc 100644 (file)
@@ -572,7 +572,7 @@ void CSQC_UpdateView(float w, float h)
        // next R_RenderScene call
        drawstring('0 0 0', "", '1 1 0', '1 1 1', 0, 0);
 
-       if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright >= 1)
+       if(autocvar_r_fakelight >= 2 || autocvar_r_fullbright)
        if not(serverflags & SERVERFLAG_ALLOW_FULLBRIGHT)
        {
                // apply night vision effect
index 14f80db9978aabd5c6eecaa7f885a5b0fc0338f2..ebdd92361f6a90a33ef8732a69558bba7df82198 100644 (file)
@@ -248,12 +248,12 @@ string HUD_DefaultColumnLayout()
 {
        return strcat( // fteqcc sucks
                "ping pl name | ",
-               "-teams,race,lms/kills -teams,lms/deaths -teams,lms,race,ka/suicides -race,dm,tdm,ka/frags ", // tdm already has this in "score"
+               "-teams,race,lms/kills +freezetag/kills -teams,lms/deaths +freezetag/deaths -teams,lms,race,ka/suicides +freezetag/suicides -race,dm,tdm,ka,freezetag/frags ", // tdm already has this in "score"
                "+ctf/caps +ctf/pickups +ctf/fckills +ctf/returns ",
                "+lms/lives +lms/rank ",
                "+kh/caps +kh/pushes +kh/destroyed ",
                "?+race/laps ?+race/time ?+race/fastest ",
-               "+as/objectives +nexball/faults +nexball/goals +ka/drops +ka/pickups +ka/bckills ",
+               "+as/objectives +nexball/faults +nexball/goals +ka/drops +ka/pickups +ka/bckills +freezetag/revivals ",
                "-lms,race,nexball/score");
 }
 
index eae7df6aaa81ccb1576155d36281bf6999243697..284e72be94602cbb1f5ea85585f015d24b6e6040 100644 (file)
@@ -153,6 +153,17 @@ void anticheat_prethink()
        self.anticheat_div0_evade_offset = 0;
 }
 
+string anticheat_display(float f, float mi, float ma)
+{
+       string s;
+       s = ftos(f);
+       if(f <= mi)
+               return strcat(s, ":N");
+       if(f >= ma)
+               return strcat(s, ":Y");
+       return strcat(s, ":-");
+}
+
 void anticheat_report()
 {
        if(!autocvar_sv_eventlog)
@@ -161,7 +172,7 @@ void anticheat_report()
        GameLogEcho(strcat(":anticheat:speedhack:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_speedhack))));
        GameLogEcho(strcat(":anticheat:div0_strafebot_old:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_old))));
        GameLogEcho(strcat(":anticheat:div0_strafebot_new:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_strafebot_new))));
-       GameLogEcho(strcat(":anticheat:div0_evade:", ftos(self.playerid), ":", ftos(MEAN_EVALUATE(anticheat_div0_evade))));
+       GameLogEcho(strcat(":anticheat:div0_evade:", ftos(self.playerid), ":", anticheat_display(MEAN_EVALUATE(anticheat_div0_evade), 0.15, 0.3)));
 }
 
 void anticheat_serverframe()
index 0d7da73572a3083af09aff6a296b55afbe4fabf2..05b2cc750232e5fbc65a5136decf6d524c864fee 100644 (file)
@@ -71,7 +71,11 @@ void assault_objective_decrease_use() {
        }
 
        if(other.assault_sprite)
+       {
                WaypointSprite_Disown(other.assault_sprite, waypointsprite_deadlifetime);
+               if(other.classname == "func_assault_destructible")
+                       other.sprite = world;
+       }
        else
                return; // already activated! cannot activate again!
 
@@ -148,7 +152,11 @@ void target_objective_decrease_activate()
        for(ent = world; (ent = find(ent, target, self.targetname)); )
        {
                if(ent.assault_sprite != world)
+               {
                        WaypointSprite_Disown(ent.assault_sprite, waypointsprite_deadlifetime);
+                       if(ent.classname == "func_assault_destructible")
+                               ent.sprite = world;
+               }
 
                spr = WaypointSprite_SpawnFixed("<placeholder>", 0.5 * (ent.absmin + ent.absmax), ent, assault_sprite);
                spr.assault_decreaser = self;
@@ -156,7 +164,12 @@ void target_objective_decrease_activate()
                spr.classname = "sprite_waypoint";
                WaypointSprite_UpdateRule(spr, assault_attacker_team, SPRITERULE_TEAMPLAY);
                if(ent.classname == "func_assault_destructible")
+               {
                        WaypointSprite_UpdateSprites(spr, "as-defend", "as-destroy", "as-destroy");
+                       WaypointSprite_UpdateMaxHealth(spr, ent.max_health);
+                       WaypointSprite_UpdateHealth(spr, ent.health);
+                       ent.sprite = spr;
+               }
                else
                        WaypointSprite_UpdateSprites(spr, "as-defend", "as-push", "as-push");
                WaypointSprite_UpdateTeamRadar(spr, RADARICON_OBJECTIVE, '1 0.5 0');
index fb1b6ee8ab71a21dee5c97f009426d51260aa509..8e67f618ad74816804ea7198f62009c1af7dfbca 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 025dfc477e902a002cfa7b35ce89b7baea3b818b..bac718356b2ad1b580db3de71bc772ebbdc58067 100644 (file)
@@ -387,7 +387,6 @@ void PlayerCorpseDamage (entity inflictor, entity attacker, float damage, float
 
 void ClientKill_Now_TeamChange();
 void freezetag_CheckWinner();
-void freezetag_Unfreeze();
 
 void PlayerDamage (entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
 {
index 44605ddeee793899a83ad425d6ed0182a4a856e2..3af433aceb075b966993512f0f42f330906bc487 100644 (file)
@@ -122,6 +122,11 @@ void func_breakable_behave_destroyed()
 void func_breakable_behave_restore()
 {
        self.health = self.max_health;
+       if(self.sprite)
+       {
+               WaypointSprite_UpdateMaxHealth(self.sprite, self.max_health);
+               WaypointSprite_UpdateHealth(self.sprite, self.health);
+       }
        self.takedamage = DAMAGE_AIM;
        self.event_damage = func_breakable_damage;
        self.state = 0;
@@ -180,9 +185,12 @@ void func_breakable_damage(entity inflictor, entity attacker, float damage, floa
        if(self.team)
                if(attacker.team == self.team)
                        return;
+       self.health = self.health - damage;
        if(self.sprite)
+       {
                WaypointSprite_Ping(self.sprite);
-       self.health = self.health - damage;
+               WaypointSprite_UpdateHealth(self.sprite, self.health);
+       }
        func_breakable_colormod();
 
        if(self.health <= 0)
index dcc13c4df023899d27b09aad97ef0eab2c2b90e0..bb3a8546480b0001934674521349e5541fd35a56 100644 (file)
@@ -332,6 +332,9 @@ void FireGrapplingHook (void)
        if((arena_roundbased && time < warmup) || (time < game_starttime))
                return;
 
+    if(g_freezetag && self.freezetag_frozen)
+        return;
+
        makevectors(self.v_angle);
 
        s = self.cvar_cl_gunalign;
index 02fa0f806fdd7b880351e5c323c1dc34f1ea197a..a770ec55eb5c0bbd1be910cddf08844b3203e179 100644 (file)
@@ -997,9 +997,7 @@ void readplayerstartcvars()
                start_armorvalue = 0;
                start_weapons = WEPBIT_MINSTANEX;
                weapon_action(WEP_MINSTANEX, WR_PRECACHE);
-               start_ammo_cells = cvar("g_minstagib_ammo_start");
                g_minstagib_invis_alpha = cvar("g_minstagib_invis_alpha");
-               start_ammo_fuel = cvar("g_start_ammo_fuel");
 
                if (g_minstagib_invis_alpha <= 0)
                        g_minstagib_invis_alpha = -1;
@@ -1017,7 +1015,12 @@ void readplayerstartcvars()
        if(!cvar("g_use_ammunition"))
                start_items |= IT_UNLIMITED_AMMO;
 
-       if(start_items & IT_UNLIMITED_WEAPON_AMMO)
+       if(g_minstagib)
+       {
+               start_ammo_cells = cvar("g_minstagib_ammo_start");
+               start_ammo_fuel = cvar("g_start_ammo_fuel");
+       }
+       else if(start_items & IT_UNLIMITED_WEAPON_AMMO)
        {
                for (j = WEP_FIRST; j <= WEP_LAST; ++j)
                {
index b7c523dcbbfd0853c80bab058559b380fb104f0d..aa581228bd474fc32a12bc885291d0ae9a0c9775 100644 (file)
@@ -94,6 +94,10 @@ MUTATOR_HOOKABLE(FilterItem);
        // checks if the current item may be spawned (self.items and self.weapons may be read and written to, as well as the ammo_ fields)
        // return error to request removal
 
+MUTATOR_HOOKABLE(TurretSpawn);
+       // return error to request removal
+       // INPUT: self - turret
+       
 MUTATOR_HOOKABLE(OnEntityPreSpawn);
        // return error to prevent entity spawn, or modify the entity
 
index e69a746793b57608cecedbf025bb197d98fd346a..410a33673c9b8c0aff3f18343ddefdb93f666487 100644 (file)
@@ -2,6 +2,7 @@ void freezetag_Initialize()
 {
        precache_model("models/ice/ice.md3");
        warmup = time + autocvar_g_start_delay + autocvar_g_freezetag_warmup;
+       ScoreRules_freezetag();
 }
 
 void freezetag_CheckWinner()
@@ -22,6 +23,7 @@ void freezetag_CheckWinner()
 
        entity e, winner;
        string teamname;
+       winner = world;
 
        FOR_EACH_PLAYER(e)
        {
@@ -34,7 +36,6 @@ void freezetag_CheckWinner()
 
        if(winner != world) // just in case a winner wasn't found
        {
-               TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
                if(winner.team == COLOR_TEAM1)
                        teamname = "^1Red Team";
                else if(winner.team == COLOR_TEAM2)
@@ -47,18 +48,22 @@ void freezetag_CheckWinner()
                        centerprint(e, strcat(teamname, "^5 wins the round, all other teams were frozen.\n"));
                }
                bprint(teamname, "^5 wins the round since all the other teams were frozen.\n");
+               TeamScore_AddToTeam(winner.team, ST_SCORE, +1);
        }
 
        next_round = time + 5;
 }
 
+// this is needed to allow the player to turn his view around (fixangle can't
+// be used to freeze his view, as that also changes the angles), while not
+// turning that ice object with the player
 void freezetag_Ice_Think()
 {
        setorigin(self, self.owner.origin - '0 0 16');
        self.nextthink = time;
 }
 
-void freezetag_Freeze()
+void freezetag_Freeze(entity attacker)
 {
        self.freezetag_frozen = 1;
 
@@ -71,7 +76,11 @@ void freezetag_Freeze()
        ice.frame = floor(random() * 21); // ice model has 20 different looking frames
        setmodel(ice, "models/ice/ice.md3");
 
-       self.movement = '0 0 0';
+       entity oldself;
+       oldself = self;
+       self = ice;
+       freezetag_Ice_Think();
+       self = oldself;
 
        // add waypoint
        WaypointSprite_Spawn("freezetag_frozen", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attached, TRUE);
@@ -79,9 +88,27 @@ void freezetag_Freeze()
        {
                WaypointSprite_UpdateTeamRadar(self.waypointsprite_attached, RADARICON_WAYPOINT, '0.25 0.90 1');
        }
+
+       if(attacker == self)
+       {
+               // you froze your own dumb self
+               // counted as "suicide" already
+               PlayerScore_Add(self, SP_SCORE, -1);
+       }
+       else if(attacker.classname == "player")
+       {
+               // got frozen by an enemy
+               // counted as "kill" and "death" already
+               PlayerScore_Add(self, SP_SCORE, -1);
+               PlayerScore_Add(attacker, SP_SCORE, +1);
+       }
+       else
+       {
+               // nothing - got frozen by the game type rules themselves
+       }
 }
 
-void freezetag_Unfreeze()
+void freezetag_Unfreeze(entity attacker)
 {
        self.freezetag_frozen = 0;
 
@@ -116,7 +143,7 @@ MUTATOR_HOOKFUNCTION(freezetag_RemovePlayer)
        if(totalspawned > 2) // only check for winners if we had more than two players (one of them left, don't let the other player win just because of that)
                freezetag_CheckWinner();
 
-       freezetag_Unfreeze();
+       freezetag_Unfreeze(world);
 
        return 1;
 }
@@ -135,7 +162,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
                        --pinkalive;
                --totalalive;
 
-        freezetag_Freeze();
+        freezetag_Freeze(frag_attacker);
        }
 
     if(frag_attacker.classname == STR_PLAYER)
@@ -163,7 +190,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerDies)
 
 MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
 {
-    freezetag_Unfreeze(); // start by making sure that all ice blocks are removed
+    freezetag_Unfreeze(world); // start by making sure that all ice blocks are removed
 
        if(totalspawned == 1 && time > game_starttime) // only one player active on server, start a new match immediately
        if(!next_round && warmup && (time < warmup - autocvar_g_freezetag_warmup || time > warmup)) // not awaiting next round
@@ -174,7 +201,7 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerSpawn)
        if(warmup && time > warmup) // spawn too late, freeze player
        {
                centerprint(self, "^1You spawned after the round started, you'll spawn as frozen.\n");
-               freezetag_Freeze();
+               freezetag_Freeze(world);
        }
 
        return 1;
@@ -217,11 +244,35 @@ MUTATOR_HOOKFUNCTION(freezetag_PlayerPreThink)
             self.freezetag_revive_progress = (time - self.freezetag_beginrevive_time) / autocvar_g_freezetag_revive_time;
             if(time - self.freezetag_beginrevive_time >= autocvar_g_freezetag_revive_time)
             {
-                freezetag_Unfreeze();
+                freezetag_Unfreeze(self);
+               entity o;
+               o = other;
+               
+               // EVERY team mate nearby gets a point (even if multiple!)
+               float n;
+               FOR_EACH_PLAYER(other) if(self != other)
+               {
+                       if(other.freezetag_frozen == 0)
+                       {
+                               if(other.team == self.team)
+                               {
+                                       teammate_nearby = boxesoverlap(self.absmin - revive_extra_size, self.absmax + revive_extra_size, other.absmin, other.absmax);
+                                       if(teammate_nearby)
+                                       {
+                                               PlayerScore_Add(other, SP_FREEZETAG_REVIVALS, +1);
+                                               PlayerScore_Add(other, SP_SCORE, +1);
+                                               ++n;
+                                       }
+                               }
+                       }
+               }
 
-                centerprint(self, strcat("^5You were revived by ^7", other.netname, ".\n"));
-                centerprint(other, strcat("^5You revived ^7", self.netname, ".\n"));
-                bprint("^7", other.netname, "^5 revived ^7", self.netname, ".\n");
+               if(n > 1)
+                       centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5 et al.\n"));
+               else
+                       centerprint(self, strcat("^5You were revived by ^7", o.netname, "^5.\n"));
+                centerprint(o, strcat("^5You revived ^7", self.netname, "^5.\n"));
+                bprint("^7", o.netname, "^5 revived ^7", self.netname, "^5.\n");
 
                 self.freezetag_beginrevive_time = -9999;
                 self.freezetag_revive_progress = 0;
index a4c993d83f1cd1fc4117f2517aa29b388205fa88..61fc9f4c9e5e5521778427724f033bc756ff1338 100644 (file)
@@ -34,7 +34,6 @@ void ScoreRules_basics_end()
 }
 void ScoreRules_generic()
 {
-       CheckAllowedTeams(world);
        if(teams_matter)
        {
                CheckAllowedTeams(world);
@@ -202,3 +201,13 @@ void ScoreRules_keepaway()
        ScoreInfo_SetLabel_PlayerScore(SP_KEEPAWAY_DROPS,               "drops",                SFL_LOWER_IS_BETTER);
        ScoreRules_basics_end();
 }
+
+// FreezeTag stuff
+#define SP_FREEZETAG_REVIVALS 4
+void ScoreRules_freezetag()
+{
+       CheckAllowedTeams(world);
+       ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); // SFL_SORT_PRIO_PRIMARY
+       ScoreInfo_SetLabel_PlayerScore(SP_FREEZETAG_REVIVALS,           "revivals",             0);
+       ScoreRules_basics_end();
+}
index 80344a9e1f211bd2501911c7dc6272f39659264b..843af3d5ad64fad215932d91c7c25a7300febf92 100644 (file)
@@ -19,15 +19,15 @@ TFL_AIM_GROUND
 vector turret_stdproc_aim_generic()
 {
 
-    vector pre_pos,prep;
-    float distance,impact_time,i,mintime;
+    vector pre_pos, prep;
+    float distance, impact_time, i, mintime;
 
     turret_tag_fire_update();
 
     if(self.aim_flags & TFL_AIM_SIMPLE)
         return real_origin(self.enemy);
 
-       mintime = max(self.attack_finished_single - time,0) + sys_frametime ;
+       mintime = max(self.attack_finished_single - time,0) + sys_frametime;
 
     // Baseline
     pre_pos = real_origin(self.enemy);
index b7af33af82e506cc657ceee10e3cd6573fbb42d5..c7f25a4467825f6b9c6eefbd7ba9f4fc96b73289 100644 (file)
@@ -287,8 +287,6 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
     // thorw head slightly off aim when hit?
     if (self.damage_flags & TFL_DMG_HEADSHAKE)
     {
-        //baseent.tur_aimoff_x += (random() * damage);
-        //baseent.tur_aimoff_y += ((random()*0.75) * damage);
         self.tur_head.angles_x = self.tur_head.angles_x + (-0.5 + random()) * damage;
         self.tur_head.angles_y = self.tur_head.angles_y + (-0.5 + random()) * damage;
     }
@@ -296,11 +294,8 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo
     if (self.turrcaps_flags & TFL_TURRCAPS_MOVE)
         self.velocity = self.velocity + vforce;
 
-    // FIXME: Better damage feedback
-    // Start burning when we have 10% or less health left
-    //if (self.health < (self.tur_health * 0.1))
-    //    self.effects = EF_FLAME;
-
+    // FIXME: Better damage feedback?
+    
     if (self.health <= 0)
     {
         self.event_damage           = SUB_Null;
index 4a2e886af863bdca739e41c43786dc5f684bc5ab..7d023e99ef199d9049f3954a9779e4847fa61881 100644 (file)
@@ -637,6 +637,10 @@ void turret_think()
     if (self.ammo < self.ammo_max)
         self.ammo = min(self.ammo + self.ammo_recharge, self.ammo_max);
 
+    if (self.health < (self.tur_health * 0.5))
+               if(random() < 0.25)
+                       te_spark(self.origin + '0 0 40', randomvec() * 256 + '0 0 256', 16);
+                       
     // Inactive turrets needs to run the think loop,
     // So they can handle animation and wake up if need be.
     if not (self.tur_active)
@@ -873,6 +877,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
     {
         e = spawn();
 
+        /*
         setorigin(e,'0 0 0');
         setmodel(e,"models/turrets/plasma.md3");
         vector v;
@@ -883,6 +888,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
             //crash();
         }
         setmodel(e,"");
+        */
 
         e.classname = "turret_manager";
         e.think = turrets_manager_think;
@@ -1129,6 +1135,10 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
 // Offsets & origins
     if (!self.tur_shotorg)   self.tur_shotorg = '50 0 50';
 
+// Gane hooks
+       if(MUTATOR_CALLHOOK(TurretSpawn))
+               return 0;
+
 // End of default & sanety checks, start building the turret.
 
 // Spawn extra bits
@@ -1234,7 +1244,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base
         activator = ee;
         self.use();
     }
-
+       
        turret_stdproc_respawn();
     return 1;
 }
index 601a934c5b206eaecc2833aedc5af1048a3e7ec1..03b0c40ad91cc49b873ee48344a18c250d6eeb0a 100644 (file)
@@ -2,19 +2,6 @@ void spawnfunc_turret_fusionreactor();
 void turret_fusionreactor_dinit();
 void turret_fusionreactor_fire();
 
-float turret_fusionreactor_firecheck()
-{
-    if (self.enemy == world) return 0;
-    if not (self.enemy.ammo_flags & TFL_AMMO_RECIVE) return 0;
-    if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY) return 0;
-    if (self.ammo < self.shot_dmg) return 0;
-    if (self.enemy.ammo >= self.enemy.ammo_max) return 0;
-    if (self.tur_dist_aimpos > self.target_range) return 0;
-    if (self.tur_dist_aimpos < self.target_range_min) return 0;
-
-    return 1;
-}
-
 void turret_fusionreactor_fire()
 {
     vector fl_org;
@@ -22,20 +9,51 @@ void turret_fusionreactor_fire()
     self.enemy.ammo = min(self.enemy.ammo + self.shot_dmg,self.enemy.ammo_max);
     fl_org = 0.5 * (self.enemy.absmin + self.enemy.absmax);
     te_smallflash(fl_org);
-    //te_lightning1(world,self.origin,self.enemy.origin);
 }
 
 void turret_fusionreactor_postthink()
 {
-    float f;
-    f = self.ammo / self.ammo_max;
-    self.tur_head.avelocity = '0 250 0' * f;
+    self.tur_head.avelocity = '0 250 0' * (self.ammo / self.ammo_max);
 }
 
+/*
 void turret_fusionreactor_respawnhook()
 {
     self.tur_head.avelocity = '0 50 0';
 }
+*/
+
+/**
+** Preforms pre-fire checks for fusionreactor
+**/
+float turret_fusionreactor_firecheck()
+{
+       if (self.attack_finished_single > time) 
+               return 0;
+
+       if (self.enemy.deadflag != DEAD_NO)
+               return 0;
+
+       if (self.enemy == world)
+               return 0;
+
+       if (self.ammo < self.shot_dmg)
+               return 0;
+
+       if (self.enemy.ammo >= self.enemy.ammo_max)
+               return 0;
+       
+       if (vlen(self.enemy.origin - self.origin) > self.target_range)
+               return 0;                               
+       
+       if(self.team != self.enemy.team)
+               return 0;
+       
+       if not (self.enemy.ammo_flags & TFL_AMMO_ENERGY)
+               return 0;    
+       
+       return 1;
+}
 
 void turret_fusionreactor_dinit()
 {
@@ -48,7 +66,7 @@ void turret_fusionreactor_dinit()
     self.shoot_flags         = TFL_SHOOT_HITALLVALID;
     self.aim_flags           = TFL_AIM_NO;
     self.track_flags         = TFL_TRACK_NO;
-    self.turret_respawnhook  = turret_fusionreactor_respawnhook;
+    // self.turret_respawnhook  = turret_fusionreactor_respawnhook;
 
     if (turret_stdproc_init("fusreac_std",0,"models/turrets/base.md3","models/turrets/reactor.md3") == 0)
     {
index 4495b720c54e02eecd3ab2ca62e772aa31771adb..151b508f4105b7bb336391678c137c2bbc9cfe9e 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))
index 7b1239b898859f206b22bfe7881b49d8b72a8fb6..031749be3868368bd338991344c0077292cca0f4 100644 (file)
@@ -47,8 +47,8 @@ void W_Nex_Attack (float issecondary)
        {
                charge = autocvar_g_balance_nex_charge_mindmg / mydmg + (1 - autocvar_g_balance_nex_charge_mindmg / mydmg) * self.nex_charge;
                self.nex_charge *= autocvar_g_balance_nex_charge_shot_multiplier; // do this AFTER setting mydmg/myforce
-                                                                                // O RLY? -- divVerent
-                                                                         // YA RLY -- FruitieX
+               // O RLY? -- divVerent
+               // YA RLY -- FruitieX
        }
        else
                charge = 1;
@@ -56,10 +56,10 @@ void W_Nex_Attack (float issecondary)
        myforce *= charge;
 
        W_SetupShot (self, TRUE, 5, "weapons/nexfire.wav", CHAN_WEAPON, mydmg);
-    if(charge > autocvar_g_balance_nex_charge_limit && autocvar_g_balance_nex_charge_limit) // if the Nex is overcharged, we play an extra sound
-    {
-        sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_limit) / (1 - 0.5 * autocvar_g_balance_nex_charge_limit), ATTN_NORM);
-    }
+       if(charge > autocvar_g_balance_nex_charge_limit && autocvar_g_balance_nex_charge_limit) // if the Nex is overcharged, we play an extra sound
+       {
+               sound (self, CHAN_WEAPON2, "weapons/nexcharge.wav", VOL_BASE * (charge - 0.5 * autocvar_g_balance_nex_charge_limit) / (1 - 0.5 * autocvar_g_balance_nex_charge_limit), ATTN_NORM);
+       }
 
        yoda = 0;
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
@@ -69,7 +69,7 @@ void W_Nex_Attack (float issecondary)
 
        //beam and muzzle flash done on client
        SendCSQCNexBeamParticle(charge);
-       
+
        // flash and burn the wall
        if (trace_ent.solid == SOLID_BSP && !(trace_dphitq3surfaceflags & Q3SURFACEFLAG_NOIMPACT))
                Damage_DamageInfo(trace_endpos, mydmg, 0, 0, myforce * w_shotdir, WEP_NEX, self);
@@ -94,27 +94,13 @@ float w_nex(float req)
                if(autocvar_g_balance_nex_charge && self.nex_charge < autocvar_g_balance_nex_charge_limit)
                        self.nex_charge = min(1, self.nex_charge + autocvar_g_balance_nex_charge_rate * frametime / W_TICSPERFRAME);
 
-        if(autocvar_g_balance_nex_charge)
-        {
-            self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-            self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-            self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
-
-            if(self.nex_charge > autocvar_g_balance_nex_charge_limit)
-            {
-                self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
-                self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
-                self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
-            }
-        }
-
                if(autocvar_g_balance_nex_secondary_chargepool)
-               if(self.nex_chargepool_ammo < 1)
-               {
-                       if(self.nex_chargepool_pauseregen_finished < time)
-                               self.nex_chargepool_ammo = min(1, self.nex_chargepool_ammo + autocvar_g_balance_nex_secondary_chargepool_regen * frametime / W_TICSPERFRAME);
-                       self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_nex_secondary_chargepool_pause_health_regen);
-               }
+                       if(self.nex_chargepool_ammo < 1)
+                       {
+                               if(self.nex_chargepool_pauseregen_finished < time)
+                                       self.nex_chargepool_ammo = min(1, self.nex_chargepool_ammo + autocvar_g_balance_nex_secondary_chargepool_regen * frametime / W_TICSPERFRAME);
+                               self.pauseregen_finished = max(self.pauseregen_finished, time + autocvar_g_balance_nex_secondary_chargepool_pause_health_regen);
+                       }
 
                if (self.BUTTON_ATCK)
                {
@@ -124,43 +110,52 @@ float w_nex(float req)
                                weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_nex_primary_animtime, w_ready);
                        }
                }
-               if (self.BUTTON_ATCK2)
+               if ((autocvar_g_balance_nex_secondary_charge && !autocvar_g_balance_nex_secondary) ? self.BUTTON_ZOOM : self.BUTTON_ATCK2)
                {
                        if(autocvar_g_balance_nex_secondary_charge)
                        {
                                self.nex_charge_rottime = time + autocvar_g_balance_nex_charge_rot_pause;
                                dt = frametime / W_TICSPERFRAME;
 
-                               if(autocvar_g_balance_nex_secondary_chargepool)
+                               if(self.nex_charge < 1)
                                {
-                                       if(autocvar_g_balance_nex_secondary_ammo)
+                                       if(autocvar_g_balance_nex_secondary_chargepool)
                                        {
-                                               // always deplete if secondary is held
-                                               self.nex_chargepool_ammo = max(0, self.nex_chargepool_ammo - autocvar_g_balance_nex_secondary_ammo * dt);
+                                               if(autocvar_g_balance_nex_secondary_ammo)
+                                               {
+                                                       // always deplete if secondary is held
+                                                       self.nex_chargepool_ammo = max(0, self.nex_chargepool_ammo - autocvar_g_balance_nex_secondary_ammo * dt);
 
-                                               dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
-                                               self.nex_chargepool_pauseregen_finished = time + autocvar_g_balance_nex_secondary_chargepool_pause_regen;
-                                               dt = min(dt, self.nex_chargepool_ammo);
-                                               dt = max(0, dt);
+                                                       dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
+                                                       self.nex_chargepool_pauseregen_finished = time + autocvar_g_balance_nex_secondary_chargepool_pause_regen;
+                                                       dt = min(dt, self.nex_chargepool_ammo);
+                                                       dt = max(0, dt);
 
-                                               self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
+                                                       self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
+                                               }
                                        }
-                               }
 
-                               else if(autocvar_g_balance_nex_secondary_ammo)
-                               {
-                                       if(self.nex_charge < 1)
+                                       else if(autocvar_g_balance_nex_secondary_ammo)
                                        {
-                                               dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
-                                               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
+                                               if(self.BUTTON_ATCK2) // only eat ammo when the button is pressed
                                                {
-                                                       dt = min(dt, (self.ammo_cells - autocvar_g_balance_nex_primary_ammo) / autocvar_g_balance_nex_secondary_ammo);
-                                                       dt = max(0, dt);
-                                                       if(dt > 0)
+                                                       dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
+                                                       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
                                                        {
-                                                               self.ammo_cells = max(autocvar_g_balance_nex_secondary_ammo, self.ammo_cells - autocvar_g_balance_nex_secondary_ammo * dt);
+                                                               dt = min(dt, (self.ammo_cells - autocvar_g_balance_nex_primary_ammo) / autocvar_g_balance_nex_secondary_ammo);
+                                                               dt = max(0, dt);
+                                                               if(dt > 0)
+                                                               {
+                                                                       self.ammo_cells = max(autocvar_g_balance_nex_secondary_ammo, self.ammo_cells - autocvar_g_balance_nex_secondary_ammo * dt);
+                                                               }
                                                        }
+                                                       self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
                                                }
+                                       }
+
+                                       else
+                                       {
+                                               dt = min(dt, (1 - self.nex_charge) / autocvar_g_balance_nex_secondary_charge_rate);
                                                self.nex_charge += dt * autocvar_g_balance_nex_secondary_charge_rate;
                                        }
                                }
@@ -174,6 +169,20 @@ float w_nex(float req)
                                }
                        }
                }
+
+               if(autocvar_g_balance_nex_charge)
+               {
+                       self.weaponentity_glowmod_x = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+                       self.weaponentity_glowmod_y = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+                       self.weaponentity_glowmod_z = autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_half * min(1, self.nex_charge / autocvar_g_balance_nex_charge_limit);
+
+                       if(self.nex_charge > autocvar_g_balance_nex_charge_limit)
+                       {
+                               self.weaponentity_glowmod_x = self.weaponentity_glowmod_x + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_red_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+                               self.weaponentity_glowmod_y = self.weaponentity_glowmod_y + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_green_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+                               self.weaponentity_glowmod_z = self.weaponentity_glowmod_z + autocvar_g_weapon_charge_colormod_hdrmultiplier * autocvar_g_weapon_charge_colormod_blue_full * (self.nex_charge - autocvar_g_balance_nex_charge_limit) / (1 - autocvar_g_balance_nex_charge_limit);
+                       }
+               }
        }
        else if (req == WR_PRECACHE)
        {
index 5bbf02676f7a16e29a6b1e7dbbd19a0d80bf65d1..bda0e77b8a972543b558d4051a13aecdf6d7acec 100644 (file)
@@ -81,8 +81,13 @@ void WaypointSprite_UpdateTeamRadar(entity e, float icon, vector col)
        e.SendFlags |= 32;
 }
 
+.float waypointsprite_pingtime;
 void WaypointSprite_Ping(entity e)
 {
+       // anti spam
+       if(time < e.waypointsprite_pingtime)
+               return;
+       e.waypointsprite_pingtime = time + 0.3;
        // ALWAYS sends (this causes a radar circle), thus no check
        e.cnt |= 0x80;
        e.SendFlags |= 32;