]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/fruitiex/race_nouid_norec'
authorRudolf Polzer <divverent@alientrap.org>
Mon, 15 Nov 2010 20:48:10 +0000 (21:48 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 15 Nov 2010 20:48:10 +0000 (21:48 +0100)
87 files changed:
balance25.cfg
balanceLeeStricklin.cfg
balanceNexSVN.cfg
balanceSamual.cfg
balanceTest.cfg
balanceXonotic.cfg
balancetZork.cfg
defaultXonotic.cfg
demos/the-big-keybench.dem [new file with mode: 0644]
effectinfo.txt
gfx/menu/default/icon_ipv4.tga [new file with mode: 0644]
gfx/menu/default/icon_ipv6.tga [new file with mode: 0644]
gfx/menu/luminos/checkbox_d0.tga
gfx/menu/luminos/checkbox_f0.tga
gfx/menu/luminos/checkbox_n0.tga
gfx/menu/luminos/icon_ipv4.tga [new file with mode: 0644]
gfx/menu/luminos/icon_ipv6.tga [new file with mode: 0644]
gfx/menu/xaw/colorpicker_selected.tga [new file with mode: 0644]
gfx/menu/xaw/icon_ipv4.tga [new file with mode: 0644]
gfx/menu/xaw/icon_ipv6.tga [new file with mode: 0644]
gfx/net.tga
hud_luminos.cfg
hud_nexuiz.cfg
physicsNoQWBunny-xpmbased.cfg
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/gibs.qc
qcsrc/client/hud.qc
qcsrc/client/hud.qh
qcsrc/client/scoreboard.qc
qcsrc/client/waypointsprites.qc
qcsrc/common/constants.qh
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/menu/mbuiltin.qh
qcsrc/menu/xonotic/colorpicker.c
qcsrc/menu/xonotic/colorpicker_string.c
qcsrc/menu/xonotic/crosshairbutton.c
qcsrc/menu/xonotic/dialog_hudpanel_ammo.c
qcsrc/menu/xonotic/dialog_hudpanel_chat.c
qcsrc/menu/xonotic/dialog_hudpanel_engineinfo.c
qcsrc/menu/xonotic/dialog_hudpanel_healtharmor.c
qcsrc/menu/xonotic/dialog_hudpanel_infomessages.c
qcsrc/menu/xonotic/dialog_hudpanel_modicons.c
qcsrc/menu/xonotic/dialog_hudpanel_notification.c
qcsrc/menu/xonotic/dialog_hudpanel_powerups.c
qcsrc/menu/xonotic/dialog_hudpanel_pressedkeys.c
qcsrc/menu/xonotic/dialog_hudpanel_racetimer.c
qcsrc/menu/xonotic/dialog_hudpanel_radar.c
qcsrc/menu/xonotic/dialog_hudpanel_score.c
qcsrc/menu/xonotic/dialog_hudpanel_timer.c
qcsrc/menu/xonotic/dialog_hudpanel_vote.c
qcsrc/menu/xonotic/dialog_hudpanel_weapons.c
qcsrc/menu/xonotic/dialog_hudsetup_exit.c
qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.c
qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c
qcsrc/menu/xonotic/serverlist.c
qcsrc/menu/xonotic/util.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_player.qc
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/clientcommands.qc
qcsrc/server/csqcprojectile.qc
qcsrc/server/defs.qh
qcsrc/server/g_damage.qc
qcsrc/server/g_world.qc
qcsrc/server/gamecommand.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_electro.qc
qcsrc/server/w_grenadelauncher.qc
qcsrc/server/w_minelayer.qc
qcsrc/server/w_minstanex.qc
qcsrc/server/w_nex.qc
qcsrc/server/w_rocketlauncher.qc
qcsrc/server/w_uzi.qc
quake.rc
sound/weapons/crylink_linkjoin.ogg [new file with mode: 0644]
tooltips.db
xonotic-credits.txt

index 09e987a5ecc24cb06d5385eb74650be53b05294e..9a0792012eede4d6804b8b1a9e1a9ffecc4dec63 100644 (file)
@@ -263,6 +263,17 @@ set g_balance_shotgun_secondary_refire 1.1
 set g_balance_shotgun_secondary_animtime 1
 // }}}
 // {{{ uzi
+set g_balance_uzi_mode 0                               // Activates varible spread for sustained & burst mode secondary
+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
+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
@@ -294,8 +305,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 +323,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,11 +404,17 @@ 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_joinexplode 0
+set g_balance_crylink_primary_joinexplode_damage 0
+set g_balance_crylink_primary_joinexplode_edgedamage 0
+set g_balance_crylink_primary_joinexplode_radius 0
+set g_balance_crylink_primary_joinexplode_force 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
-set g_balance_crylink_primary_star_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_star_fadetime 0.25
 set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2450
 set g_balance_crylink_primary_other_fadetime 0.25
 
@@ -415,6 +431,14 @@ 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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_joinexplode 0                  
+set g_balance_crylink_secondary_joinexplode_damage 0   
+set g_balance_crylink_secondary_joinexplode_edgedamage 0
+set g_balance_crylink_secondary_joinexplode_radius 0
+set g_balance_crylink_secondary_joinexplode_force 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
@@ -451,6 +475,7 @@ set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0
+set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
@@ -503,11 +528,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 0a24823c91ece2cb1668461a6528ced0983b8cc3..1e72552ae0d54d01d9c24cad2e2e9f01d08d4410 100644 (file)
@@ -274,6 +274,17 @@ set g_balance_shotgun_secondary_refire 1.1
 set g_balance_shotgun_secondary_animtime 1
 // }}}
 // {{{ uzi
+set g_balance_uzi_mode 0                               // Activates varible spread for sustained & burst mode secondary
+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
+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
@@ -305,8 +316,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 +334,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
@@ -405,11 +415,17 @@ 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_joinexplode 0
+set g_balance_crylink_primary_joinexplode_damage 0
+set g_balance_crylink_primary_joinexplode_edgedamage 0
+set g_balance_crylink_primary_joinexplode_radius 0
+set g_balance_crylink_primary_joinexplode_force 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
-set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_star_fadetime 0.25
 set g_balance_crylink_primary_other_lifetime 2 // range: 800 full, fades to 1300
 set g_balance_crylink_primary_other_fadetime 0.25
 
@@ -426,6 +442,14 @@ 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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_joinexplode 0                  
+set g_balance_crylink_secondary_joinexplode_damage 0   
+set g_balance_crylink_secondary_joinexplode_edgedamage 0
+set g_balance_crylink_secondary_joinexplode_radius 0
+set g_balance_crylink_secondary_joinexplode_force 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
@@ -462,6 +486,7 @@ set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0
+set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
@@ -514,11 +539,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 80049f339617f49a067af0065029d0ffbf32f4e5..b17358db78c33622da6105166687aea151d10e3d 100644 (file)
@@ -263,6 +263,17 @@ set g_balance_shotgun_secondary_refire 1.1
 set g_balance_shotgun_secondary_animtime 1
 // }}}
 // {{{ uzi
+set g_balance_uzi_mode 0                               // Activates varible spread for sustained & burst mode secondary
+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
+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
@@ -294,8 +305,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 +322,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
@@ -393,11 +403,17 @@ 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_joinexplode 0
+set g_balance_crylink_primary_joinexplode_damage 0
+set g_balance_crylink_primary_joinexplode_edgedamage 0
+set g_balance_crylink_primary_joinexplode_radius 0
+set g_balance_crylink_primary_joinexplode_force 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
-set g_balance_crylink_primary_star_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_star_fadetime 0.25
 set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2450
 set g_balance_crylink_primary_other_fadetime 0.25
 
@@ -414,6 +430,14 @@ 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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_joinexplode 0                  
+set g_balance_crylink_secondary_joinexplode_damage 0   
+set g_balance_crylink_secondary_joinexplode_edgedamage 0
+set g_balance_crylink_secondary_joinexplode_radius 0
+set g_balance_crylink_secondary_joinexplode_force 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
@@ -450,6 +474,7 @@ set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0
+set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
 set g_balance_nex_charge_shot_multiplier 0.5
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
@@ -502,11 +527,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 f9f04722cb8143c3656aedba56a1797661d98b35..5858ec21360f5e23c67acf8cecbb9f256140fe15 100644 (file)
@@ -12,14 +12,14 @@ set g_start_weapon_rocketlauncher -1 "0 = never provide the weapon, 1 = always p
 set g_start_weapon_minstanex -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_porto -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_hook -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_hlac 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_hlac -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_fireball 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
-set g_start_weapon_seeker 0 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
+set g_start_weapon_seeker -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default, -2 = provide the weapon in ca and lms"
 set g_balance_health_start 125
 set g_balance_armor_start 0
-set g_start_ammo_shells 30
+set g_start_ammo_shells 15
 set g_start_ammo_nails 0
 set g_start_ammo_rockets 0
 set g_start_ammo_cells 0
@@ -55,22 +55,22 @@ 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 30
-set g_pickup_shells_weapon 30
-set g_pickup_shells_max 120
-set g_pickup_nails 80
-set g_pickup_nails_weapon 80
-set g_pickup_nails_max 400
-set g_pickup_rockets 30
-set g_pickup_rockets_weapon 30
-set g_pickup_rockets_max 120
+set g_pickup_shells 15
+set g_pickup_shells_weapon 15
+set g_pickup_shells_max 100
+set g_pickup_nails 75
+set g_pickup_nails_weapon 75
+set g_pickup_nails_max 300
+set g_pickup_rockets 40
+set g_pickup_rockets_weapon 40
+set g_pickup_rockets_max 160
 set g_pickup_cells 50
 set g_pickup_cells_weapon 50
 set g_pickup_cells_max 200
 set g_pickup_fuel 25
 set g_pickup_fuel_weapon 25
 set g_pickup_fuel_jetpack 50
-set g_pickup_fuel_max 999
+set g_pickup_fuel_max 100
 set g_pickup_armorsmall 10
 set g_pickup_armorsmall_max 200
 set g_pickup_armorsmall_anyway 1
@@ -214,7 +214,7 @@ set g_balance_grapplehook_health 130
 // {{{ laser
 set g_balance_laser_primary_damage 25
 set g_balance_laser_primary_edgedamage 10
-set g_balance_laser_primary_force 400
+set g_balance_laser_primary_force 175
 set g_balance_laser_primary_radius 70
 set g_balance_laser_primary_speed 12000
 set g_balance_laser_primary_spread 0
@@ -224,8 +224,8 @@ set g_balance_laser_primary_lifetime 30
 set g_balance_laser_primary_shotangle 0
 set g_balance_laser_primary_delay 0.03
 set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1
-set g_balance_laser_primary_force_velocitybias 0
+set g_balance_laser_primary_force_zscale 2 // 350 upforce
+set g_balance_laser_primary_force_velocitybias 0.3
 set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
 set g_balance_laser_secondary_damage 25
 set g_balance_laser_secondary_edgedamage 10
@@ -239,12 +239,12 @@ set g_balance_laser_secondary_lifetime 30
 set g_balance_laser_secondary_shotangle -90
 set g_balance_laser_secondary_delay 0
 set g_balance_laser_secondary_gauntlet 0
-set g_balance_laser_secondary_force_zscale 1
+set g_balance_laser_secondary_force_zscale 1.25
 set g_balance_laser_secondary_force_velocitybias 0
 // }}}
 // {{{ shotgun
-set g_balance_shotgun_primary_bullets 6
-set g_balance_shotgun_primary_damage 8
+set g_balance_shotgun_primary_bullets 10
+set g_balance_shotgun_primary_damage 6
 set g_balance_shotgun_primary_force 15
 set g_balance_shotgun_primary_spread 0.11
 set g_balance_shotgun_primary_refire 0.5
@@ -263,16 +263,27 @@ set g_balance_shotgun_secondary_refire 1.1
 set g_balance_shotgun_secondary_animtime 1
 // }}}
 // {{{ uzi
+set g_balance_uzi_mode 0                               // Activates varible spread for sustained & burst mode secondary
+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
+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 12
-set g_balance_uzi_first_force 5
-set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.15
+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 7
-set g_balance_uzi_sustained_force 5
-set g_balance_uzi_sustained_spread 0.05
-set g_balance_uzi_sustained_refire 0.075
+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
@@ -283,7 +294,7 @@ set g_balance_grenadelauncher_primary_damage 50
 set g_balance_grenadelauncher_primary_edgedamage 38
 set g_balance_grenadelauncher_primary_force 400
 set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2200
+set g_balance_grenadelauncher_primary_speed 2000
 set g_balance_grenadelauncher_primary_speed_up 220
 set g_balance_grenadelauncher_primary_speed_z 0
 set g_balance_grenadelauncher_primary_spread 0
@@ -294,8 +305,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 +323,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_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
@@ -340,32 +350,32 @@ set g_balance_minelayer_remote_edgedamage 40
 set g_balance_minelayer_remote_radius 200
 set g_balance_minelayer_remote_force 300
 // }}}
-// {{{ electro
-set g_balance_electro_lightning 0
-set g_balance_electro_primary_damage 65
+// {{{ electro // TODO
+set g_balance_electro_lightning 1
+set g_balance_electro_primary_damage 90
 set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 200
-set g_balance_electro_primary_force_up 0
-set g_balance_electro_primary_radius 150
-set g_balance_electro_primary_comboradius 0
-set g_balance_electro_primary_speed 2000
+set g_balance_electro_primary_force 425
+set g_balance_electro_primary_force_up 125
+set g_balance_electro_primary_radius 850
+set g_balance_electro_primary_comboradius 75
+set g_balance_electro_primary_speed 0
 set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 30
+set g_balance_electro_primary_lifetime 0
 set g_balance_electro_primary_refire 0.6
-set g_balance_electro_primary_animtime 0.3
-set g_balance_electro_primary_ammo 2
-set g_balance_electro_primary_range 0
+set g_balance_electro_primary_animtime 0.03
+set g_balance_electro_primary_ammo 7
+set g_balance_electro_primary_range 800
 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 50
+set g_balance_electro_secondary_damage 25
 set g_balance_electro_secondary_edgedamage 0
-set g_balance_electro_secondary_force 200
-set g_balance_electro_secondary_radius 150
+set g_balance_electro_secondary_force 100
+set g_balance_electro_secondary_radius 100
 set g_balance_electro_secondary_speed 900
 set g_balance_electro_secondary_speed_up 200
 set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0
+set g_balance_electro_secondary_spread 0.08
 set g_balance_electro_secondary_lifetime 2.5
 set g_balance_electro_secondary_refire 0.2
 set g_balance_electro_secondary_refire2 1
@@ -379,51 +389,65 @@ set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 200
 set g_balance_electro_combo_radius 250
 set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 2000
+set g_balance_electro_combo_speed 400
 // }}}
-// {{{ crylink
-set g_balance_crylink_primary_damage 14
+// {{{ crylink 
+set g_balance_crylink_primary_damage 10
 set g_balance_crylink_primary_edgedamage 0
 set g_balance_crylink_primary_force -55
 set g_balance_crylink_primary_radius 50
-set g_balance_crylink_primary_speed 7000
-set g_balance_crylink_primary_spread 0.02
+set g_balance_crylink_primary_speed 3000
+set g_balance_crylink_primary_spread 0.05
 set g_balance_crylink_primary_shots 4
 set g_balance_crylink_primary_bounces 1
 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_joinspeed 0
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_joinexplode 0
+set g_balance_crylink_primary_joinexplode_damage 0
+set g_balance_crylink_primary_joinexplode_edgedamage 0
+set g_balance_crylink_primary_joinexplode_radius 0
+set g_balance_crylink_primary_joinexplode_force 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
-set g_balance_crylink_primary_star_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_star_fadetime 0.25
-set g_balance_crylink_primary_other_lifetime 0.1 // range: 700 full, fades to 2450
-set g_balance_crylink_primary_other_fadetime 0.25
+set g_balance_crylink_primary_other_lifetime 5 
+set g_balance_crylink_primary_other_fadetime 5
 
 set g_balance_crylink_secondary 1
-set g_balance_crylink_secondary_damage 10
+set g_balance_crylink_secondary_damage 8
 set g_balance_crylink_secondary_edgedamage 0
 set g_balance_crylink_secondary_force -40
 set g_balance_crylink_secondary_radius 10
-set g_balance_crylink_secondary_speed 4000
-set g_balance_crylink_secondary_spread 0.01
+set g_balance_crylink_secondary_speed 9000
+set g_balance_crylink_secondary_spread 0.03
 set g_balance_crylink_secondary_shots 3
 set g_balance_crylink_secondary_bounces 0
-set g_balance_crylink_secondary_refire 0.1
-set g_balance_crylink_secondary_animtime 0.1
+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_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_joinexplode 0                  
+set g_balance_crylink_secondary_joinexplode_damage 0   
+set g_balance_crylink_secondary_joinexplode_edgedamage 0
+set g_balance_crylink_secondary_joinexplode_radius 0
+set g_balance_crylink_secondary_joinexplode_force 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
-set g_balance_crylink_secondary_line_lifetime 2 // range: 35000 full, fades to 70000
-set g_balance_crylink_secondary_line_fadetime 2
+set g_balance_crylink_secondary_line_lifetime 
+set g_balance_crylink_secondary_line_fadetime 5
 // }}}
 // {{{ nex
 set g_balance_nex_primary_damage 90
-set g_balance_nex_primary_force 300
+set g_balance_nex_primary_force 400
 set g_balance_nex_primary_refire 1.5
 set g_balance_nex_primary_animtime 0.3
 set g_balance_nex_primary_ammo 5
@@ -435,23 +459,24 @@ set g_balance_nex_primary_damagefalloff_forcehalflife 1500
 set g_balance_nex_secondary 0
 set g_balance_nex_secondary_charge 0
 set g_balance_nex_secondary_charge_rate 0.1
-set g_balance_nex_secondary_damage 90
-set g_balance_nex_secondary_force 300
-set g_balance_nex_secondary_refire 1.5
-set g_balance_nex_secondary_animtime 0.3
-set g_balance_nex_secondary_ammo 5
-set g_balance_nex_secondary_damagefalloff_mindist 1000
-set g_balance_nex_secondary_damagefalloff_maxdist 3000
-set g_balance_nex_secondary_damagefalloff_halflife 1500
-set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
+set g_balance_nex_secondary_damage 0
+set g_balance_nex_secondary_force 0
+set g_balance_nex_secondary_refire 0
+set g_balance_nex_secondary_animtime 0
+set g_balance_nex_secondary_ammo 2
+set g_balance_nex_secondary_damagefalloff_mindist 0
+set g_balance_nex_secondary_damagefalloff_maxdist 0
+set g_balance_nex_secondary_damagefalloff_halflife 0
+set g_balance_nex_secondary_damagefalloff_forcehalflife 0
 
-set g_balance_nex_charge 0
+set g_balance_nex_charge 1
 set g_balance_nex_charge_mindmg 40
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.1
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0
-set g_balance_nex_charge_shot_multiplier 0.5
+set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
+set g_balance_nex_charge_shot_multiplier 0.25
 set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
 set g_balance_nex_charge_maxspeed 1000
@@ -466,22 +491,22 @@ set g_balance_hagar_primary_damage 30
 set g_balance_hagar_primary_edgedamage 0
 set g_balance_hagar_primary_force 50
 set g_balance_hagar_primary_radius 70
-set g_balance_hagar_primary_spread 0.05
-set g_balance_hagar_primary_speed 2400
-set g_balance_hagar_primary_lifetime 30
+set g_balance_hagar_primary_spread 0.08
+set g_balance_hagar_primary_speed 2000
+set g_balance_hagar_primary_lifetime 0.12
 set g_balance_hagar_primary_refire 0.15
 set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
-set g_balance_hagar_secondary_damage 20
-set g_balance_hagar_secondary_edgedamage 10
-set g_balance_hagar_secondary_force 50
-set g_balance_hagar_secondary_radius 90
-set g_balance_hagar_secondary_spread 0.05
+set g_balance_hagar_secondary_damage 37
+set g_balance_hagar_secondary_edgedamage 15
+set g_balance_hagar_secondary_force 100
+set g_balance_hagar_secondary_radius 65
+set g_balance_hagar_secondary_spread 0.015
 set g_balance_hagar_secondary_speed 2000
-set g_balance_hagar_secondary_lifetime_min 0.1
-set g_balance_hagar_secondary_lifetime_rand 0.05
-set g_balance_hagar_secondary_refire 0.1
-set g_balance_hagar_secondary_ammo 0.5
+set g_balance_hagar_secondary_lifetime_min 30
+set g_balance_hagar_secondary_lifetime_rand 0
+set g_balance_hagar_secondary_refire 0.15
+set g_balance_hagar_secondary_ammo 1
 // }}}
 // {{{ rocketlauncher
 set g_balance_rocketlauncher_damage 80
@@ -490,7 +515,7 @@ set g_balance_rocketlauncher_force 600
 set g_balance_rocketlauncher_radius 100
 set g_balance_rocketlauncher_speed 1600
 set g_balance_rocketlauncher_speedaccel 1600
-set g_balance_rocketlauncher_speedstart 1000
+set g_balance_rocketlauncher_speedstart 800
 set g_balance_rocketlauncher_lifetime 30
 set g_balance_rocketlauncher_refire 1.2
 set g_balance_rocketlauncher_animtime 0.3
@@ -503,37 +528,32 @@ 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_damage 70
+set g_balance_rocketlauncher_remote_edgedamage 30
 set g_balance_rocketlauncher_remote_radius 100
-set g_balance_rocketlauncher_remote_force 600
+set g_balance_rocketlauncher_remote_force 500
 // }}}
 // {{{ porto
 set g_balance_porto_primary_refire 1.5
 set g_balance_porto_primary_animtime 0.3
 set g_balance_porto_primary_speed 5000
-set g_balance_porto_primary_lifetime 30
+set g_balance_porto_primary_lifetime 5
 set g_balance_portal_health 200 // these get recharged whenever the portal is used
 set g_balance_portal_lifetime 15 // these get recharged whenever the portal is used
 // }}}
 // {{{ hook
-set g_balance_hook_primary_fuel 2 // hook monkeys set 0
+set g_balance_hook_primary_fuel 5 // hook monkeys set 0
 set g_balance_hook_primary_refire 0 // hook monkeys set 0
 set g_balance_hook_primary_animtime 0.3 // good shoot anim
 set g_balance_hook_primary_hooked_time_max 0 // infinite
 set g_balance_hook_primary_hooked_time_free 2 // 2s being hooked are free
-set g_balance_hook_primary_hooked_fuel 3 // fuel per second hooked
+set g_balance_hook_primary_hooked_fuel 5 // fuel per second hooked
 set g_balance_hook_secondary_damage 25 // not much
 set g_balance_hook_secondary_edgedamage 5 // not much
 set g_balance_hook_secondary_radius 500 // LOTS
 set g_balance_hook_secondary_force -2000 // LOTS
 set g_balance_hook_secondary_ammo 50 // a whole pack
-set g_balance_hook_secondary_lifetime 30 // infinite
+set g_balance_hook_secondary_lifetime 5 // infinite
 set g_balance_hook_secondary_speed 0 // not much throwing
 set g_balance_hook_secondary_gravity 5 // fast falling
 set g_balance_hook_secondary_refire 3 // don't drop too many bombs...
@@ -575,37 +595,37 @@ set g_balance_hlac_secondary_ammo 10
 set g_balance_hlac_secondary_shots 6
 // }}}
 // {{{ campingrifle
-set g_balance_campingrifle_magazinecapacity 0
+set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in close combat
 set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_after_changing_weapons 0
-set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_primary_tracer 0
-set g_balance_campingrifle_primary_damage 50
-set g_balance_campingrifle_primary_headshotaddeddamage 50
+set g_balance_campingrifle_bursttime 0
+set g_balance_campingrifle_primary_tracer 1
+set g_balance_campingrifle_primary_damage 65
+set g_balance_campingrifle_primary_headshotaddeddamage 75
 set g_balance_campingrifle_primary_spread 0
-set g_balance_campingrifle_primary_force 50
-set g_balance_campingrifle_primary_speed 35000
+set g_balance_campingrifle_primary_force 2
+set g_balance_campingrifle_primary_speed 40000
 set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 0.7
+set g_balance_campingrifle_primary_refire 0.75
 set g_balance_campingrifle_primary_animtime 0.3
 set g_balance_campingrifle_primary_ammo 10
-set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
-set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
-set g_balance_campingrifle_primary_bullethail 0
+set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
+set g_balance_campingrifle_primary_burstcost 0
+set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
 set g_balance_campingrifle_secondary 1
 set g_balance_campingrifle_secondary_tracer 0
-set g_balance_campingrifle_secondary_damage 15
-set g_balance_campingrifle_secondary_headshotaddeddamage 25
-set g_balance_campingrifle_secondary_spread 0.02
-set g_balance_campingrifle_secondary_force 30
+set g_balance_campingrifle_secondary_damage 50
+set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_campingrifle_secondary_spread 0
+set g_balance_campingrifle_secondary_force 2
 set g_balance_campingrifle_secondary_speed 20000
 set g_balance_campingrifle_secondary_lifetime 5
 set g_balance_campingrifle_secondary_refire 0.1
 set g_balance_campingrifle_secondary_animtime 0.1
-set g_balance_campingrifle_secondary_ammo 4
-set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
-set g_balance_campingrifle_secondary_burstcost 0.35
-set g_balance_campingrifle_secondary_bullethail 0
+set g_balance_campingrifle_secondary_ammo 10
+set g_balance_campingrifle_secondary_bulletconstant 110 // 15.5qu
+set g_balance_campingrifle_secondary_burstcost 0
+set g_balance_campingrifle_secondary_bullethail 0 // empty magazine on shot
 // }}}
 // {{{ tuba
 set g_balance_tuba_refire 0.05
index f312d32d89c6bdad0faa89fcdc89989a8eb45b44..3efe125a7367881af4cea58aa0e501498511fab5 100644 (file)
@@ -57,8 +57,8 @@ 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 45
-set g_pickup_nails 120
+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
@@ -66,7 +66,7 @@ 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 200
+set g_pickup_cells_max 300
 set g_pickup_fuel 25
 set g_pickup_fuel_weapon 15
 set g_pickup_fuel_jetpack 50
@@ -99,8 +99,8 @@ 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 5
-set g_pickup_respawntime_ammo 25
+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
@@ -144,7 +144,7 @@ set g_balance_fuel_limit 999
 // }}}
 
 // {{{ misc
-set g_balance_selfdamagepercent 0.65
+set g_balance_selfdamagepercent 0.6
 set g_balance_weaponswitchdelay 0.15
 set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
 set g_weaponratefactor 1 "weapon fire rate multiplier"
@@ -184,7 +184,7 @@ set g_balance_falldamage_maxdamage 75
 set g_balance_powerup_invincible_takedamage 0.3
 set g_balance_powerup_invincible_time 30
 set g_balance_powerup_strength_damage 3
-set g_balance_powerup_strength_force 4
+set g_balance_powerup_strength_force 3
 set g_balance_powerup_strength_time 30
 set g_balance_powerup_strength_selfdamage 1.5
 set g_balance_powerup_strength_selfforce 1.5
@@ -212,11 +212,11 @@ set g_balance_grapplehook_health 130
 
 // {{{ weapon properties
 // {{{ laser
-set g_balance_laser_primary_damage 20 // dps 33, hope that's not too high
-set g_balance_laser_primary_edgedamage 20
-set g_balance_laser_primary_force 200 // this looks insanely low, but actually isn't with zscale and velocitybias
+set g_balance_laser_primary_damage 20 
+set g_balance_laser_primary_edgedamage 10
+set g_balance_laser_primary_force 230
 set g_balance_laser_primary_radius 60
-set g_balance_laser_primary_speed 4000
+set g_balance_laser_primary_speed 9000
 set g_balance_laser_primary_spread 0
 set g_balance_laser_primary_refire 0.6
 set g_balance_laser_primary_animtime 0.6
@@ -224,8 +224,8 @@ set g_balance_laser_primary_lifetime 5
 set g_balance_laser_primary_shotangle 0
 set g_balance_laser_primary_delay 0
 set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1.35 // 270 upforce
-set g_balance_laser_primary_force_velocitybias 0.25
+set g_balance_laser_primary_force_zscale 1.2
+set g_balance_laser_primary_force_velocitybias 0.15
 set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
 set g_balance_laser_secondary_damage 35
 set g_balance_laser_secondary_edgedamage 10
@@ -240,12 +240,12 @@ set g_balance_laser_secondary_shotangle 0
 set g_balance_laser_secondary_delay 0
 set g_balance_laser_secondary_gauntlet 0
 set g_balance_laser_secondary_force_zscale 1
-set g_balance_laser_secondary_force_velocitybias 0.25
+set g_balance_laser_secondary_force_velocitybias 0
 // }}}
 // {{{ shotgun
 set g_balance_shotgun_primary_bullets 10
 set g_balance_shotgun_primary_damage 5
-set g_balance_shotgun_primary_force 60
+set g_balance_shotgun_primary_force 5
 set g_balance_shotgun_primary_spread 0.07
 set g_balance_shotgun_primary_refire 0.8
 set g_balance_shotgun_primary_animtime 0.2
@@ -263,15 +263,26 @@ 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
+set g_balance_uzi_spread_max 0.6
+set g_balance_uzi_spread_add 0.008
+set g_balance_uzi_burst 3                              // # 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.4    // refire after burst
+set g_balance_uzi_burst_spread 0.03
+set g_balance_uzi_burst_damage 18              // 90 dps (but 90 dmg deliverd in .25s)
+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.3
+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 10
-set g_balance_uzi_sustained_spread 0.08
+set g_balance_uzi_sustained_damage 14  // 120 dps
+set g_balance_uzi_sustained_force 12
+set g_balance_uzi_sustained_spread 0.02
 set g_balance_uzi_sustained_refire 0.1
 set g_balance_uzi_sustained_ammo 1
 set g_balance_uzi_speed 18000
@@ -279,9 +290,9 @@ set g_balance_uzi_bulletconstant 115 // 13.1qu
 // }}}
 // {{{ mortar
 set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 60
-set g_balance_grenadelauncher_primary_edgedamage 38
-set g_balance_grenadelauncher_primary_force 400
+set g_balance_grenadelauncher_primary_damage 50
+set g_balance_grenadelauncher_primary_edgedamage 30
+set g_balance_grenadelauncher_primary_force 250
 set g_balance_grenadelauncher_primary_radius 140
 set g_balance_grenadelauncher_primary_speed 2000
 set g_balance_grenadelauncher_primary_speed_up 200
@@ -294,14 +305,12 @@ 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
-set g_balance_grenadelauncher_secondary_edgedamage 38
-set g_balance_grenadelauncher_secondary_force 400
+set g_balance_grenadelauncher_secondary_damage 60
+set g_balance_grenadelauncher_secondary_edgedamage 35
+set g_balance_grenadelauncher_secondary_force 300
 set g_balance_grenadelauncher_secondary_radius 140
 set g_balance_grenadelauncher_secondary_speed 1400
 set g_balance_grenadelauncher_secondary_speed_up 200
@@ -314,9 +323,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
@@ -341,64 +351,70 @@ set g_balance_minelayer_remote_radius 200
 set g_balance_minelayer_remote_force 300
 // }}}
 // {{{ electro
-set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 110
+set g_balance_electro_lightning 0
+set g_balance_electro_primary_damage 35
 set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 425
-set g_balance_electro_primary_force_up 125
-set g_balance_electro_primary_radius 850
-set g_balance_electro_primary_comboradius 150
-set g_balance_electro_primary_speed 0
+set g_balance_electro_primary_force 150
+set g_balance_electro_primary_force_up 0
+set g_balance_electro_primary_radius 155
+set g_balance_electro_primary_comboradius 0
+set g_balance_electro_primary_speed 2000
 set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 0
-set g_balance_electro_primary_refire 0.4
-set g_balance_electro_primary_animtime 0.03333333
-set g_balance_electro_primary_ammo 7
-set g_balance_electro_primary_range 800
+set g_balance_electro_primary_lifetime 30
+set g_balance_electro_primary_refire 0.65
+set g_balance_electro_primary_animtime 0.3
+set g_balance_electro_primary_ammo 2
+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 100
-set g_balance_electro_secondary_radius 100
-set g_balance_electro_secondary_speed 500
+set g_balance_electro_secondary_force 50
+set g_balance_electro_secondary_radius 25
+set g_balance_electro_secondary_speed 750
 set g_balance_electro_secondary_speed_up 150
 set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0.08
-set g_balance_electro_secondary_lifetime 3.5
+set g_balance_electro_secondary_spread 0.025
+set g_balance_electro_secondary_lifetime 5
 set g_balance_electro_secondary_refire 0.1
 set g_balance_electro_secondary_refire2 2
-set g_balance_electro_secondary_animtime 0.2
+set g_balance_electro_secondary_animtime 0.15
 set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 10
-set g_balance_electro_secondary_damageforcescale 4
+set g_balance_electro_secondary_damageforcescale 2
 set g_balance_electro_secondary_count 3
-set g_balance_electro_combo_damage 60
-set g_balance_electro_combo_edgedamage 0
-set g_balance_electro_combo_force 80
+set g_balance_electro_combo_damage 80
+set g_balance_electro_combo_edgedamage 10
+set g_balance_electro_combo_force 150
 set g_balance_electro_combo_radius 250
 set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 400
+set g_balance_electro_combo_speed 1000
 // }}}
 // {{{ crylink
 set g_balance_crylink_primary_damage 5
-set g_balance_crylink_primary_edgedamage 2.5
-set g_balance_crylink_primary_force 25
-set g_balance_crylink_primary_radius 50
-set g_balance_crylink_primary_speed 2500
-set g_balance_crylink_primary_spread 0.04
-set g_balance_crylink_primary_shots 12
+set g_balance_crylink_primary_edgedamage 3
+set g_balance_crylink_primary_force 10
+set g_balance_crylink_primary_radius 15
+set g_balance_crylink_primary_speed 1500
+set g_balance_crylink_primary_spread 0.1
+set g_balance_crylink_primary_shots 8
 set g_balance_crylink_primary_bounces 1
 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 300
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_joinexplode 1                            //if != 0 do a extra damage pass when projectiles join
+set g_balance_crylink_primary_joinexplode_damage 100   //Max demage (Determined by % of _primary_shots that joins)
+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 // range: 10000 full, fades to 20000
-set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_star_fadetime 0.25
+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
 set g_balance_crylink_primary_other_fadetime 0.25
 
@@ -415,6 +431,14 @@ 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 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_joinexplode 0                  
+set g_balance_crylink_secondary_joinexplode_damage 0   
+set g_balance_crylink_secondary_joinexplode_edgedamage 0
+set g_balance_crylink_secondary_joinexplode_radius 0
+set g_balance_crylink_secondary_joinexplode_force 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
@@ -424,7 +448,7 @@ set g_balance_crylink_secondary_line_fadetime 2
 // {{{ nex
 set g_balance_nex_primary_damage 100
 set g_balance_nex_primary_force 600
-set g_balance_nex_primary_refire 0.75
+set g_balance_nex_primary_refire 1
 set g_balance_nex_primary_animtime 0.3
 set g_balance_nex_primary_ammo 5
 set g_balance_nex_primary_damagefalloff_mindist 0
@@ -434,7 +458,7 @@ set g_balance_nex_primary_damagefalloff_forcehalflife 0
 
 set g_balance_nex_secondary 1
 set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.7
+set g_balance_nex_secondary_charge_rate 0.55
 set g_balance_nex_secondary_damage 100
 set g_balance_nex_secondary_force 600
 set g_balance_nex_secondary_refire 1.5
@@ -450,7 +474,8 @@ set g_balance_nex_charge_mindmg 10
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.35
 set g_balance_nex_charge_limit 0.5
-set g_balance_nex_charge_rot_rate 0
+set g_balance_nex_charge_rot_rate 0.1
+set g_balance_nex_charge_rot_pause 1 // Dont rot down untill this long after release of charge button
 set g_balance_nex_charge_shot_multiplier 0
 set g_balance_nex_charge_velocity_rate 0
 set g_balance_nex_charge_minspeed 400
@@ -462,14 +487,14 @@ set g_balance_minstanex_animtime 0.3
 set g_balance_minstanex_ammo 10
 // }}}
 // {{{ hagar
-set g_balance_hagar_primary_damage 30
-set g_balance_hagar_primary_edgedamage 15
-set g_balance_hagar_primary_force 50
-set g_balance_hagar_primary_radius 65
+set g_balance_hagar_primary_damage 25
+set g_balance_hagar_primary_edgedamage 5
+set g_balance_hagar_primary_force 70
+set g_balance_hagar_primary_radius 60
 set g_balance_hagar_primary_spread 0.010
-set g_balance_hagar_primary_speed 3000
+set g_balance_hagar_primary_speed 2500
 set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.15
+set g_balance_hagar_primary_refire 0.2
 set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
 set g_balance_hagar_secondary_damage 30
@@ -484,30 +509,25 @@ set g_balance_hagar_secondary_refire 0.15
 set g_balance_hagar_secondary_ammo 1
 // }}}
 // {{{ rocketlauncher // TODO
-set g_balance_rocketlauncher_damage 110
+set g_balance_rocketlauncher_damage 120
 set g_balance_rocketlauncher_edgedamage 25
 set g_balance_rocketlauncher_force 350
-set g_balance_rocketlauncher_radius 125
-set g_balance_rocketlauncher_speed 1000
+set g_balance_rocketlauncher_radius 130
+set g_balance_rocketlauncher_speed 900
 set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 1000
-set g_balance_rocketlauncher_lifetime 5
-set g_balance_rocketlauncher_refire 1
+set g_balance_rocketlauncher_speedstart 900
+set g_balance_rocketlauncher_lifetime 9
+set g_balance_rocketlauncher_refire 1.2
 set g_balance_rocketlauncher_animtime 0.4
 set g_balance_rocketlauncher_ammo 3
 set g_balance_rocketlauncher_health 10
 set g_balance_rocketlauncher_damageforcescale 0
 set g_balance_rocketlauncher_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 45 // max degrees per second
+set g_balance_rocketlauncher_guiderate 25 // max degrees per second
 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
@@ -580,13 +600,13 @@ set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_bursttime 0
 set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 75
-set g_balance_campingrifle_primary_headshotaddeddamage 75
+set g_balance_campingrifle_primary_damage 40
+set g_balance_campingrifle_primary_headshotaddeddamage 100
 set g_balance_campingrifle_primary_spread 0
 set g_balance_campingrifle_primary_force 2
 set g_balance_campingrifle_primary_speed 40000
 set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 1.5
+set g_balance_campingrifle_primary_refire 0.65
 set g_balance_campingrifle_primary_animtime 0.6
 set g_balance_campingrifle_primary_ammo 10
 set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
@@ -621,7 +641,7 @@ set g_balance_tuba_force 40
 // {{{ fireball
 set g_balance_fireball_primary_ammo 40
 set g_balance_fireball_primary_animtime 0.15
-set g_balance_fireball_primary_bfgdamage 100
+set g_balance_fireball_primary_bfgdamage 150
 set g_balance_fireball_primary_bfgforce 0
 set g_balance_fireball_primary_bfgradius 1000
 set g_balance_fireball_primary_damage 200
@@ -674,8 +694,8 @@ set g_balance_seeker_missile_accel 1.05
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
 set g_balance_seeker_missile_count 4
-set g_balance_seeker_missile_damage 40
-set g_balance_seeker_missile_damageforcescale 4
+set g_balance_seeker_missile_damage 50
+set g_balance_seeker_missile_damageforcescale 2
 set g_balance_seeker_missile_decel 0.9
 set g_balance_seeker_missile_delay 0.25
 set g_balance_seeker_missile_edgedamage 10
@@ -703,7 +723,7 @@ set g_balance_seeker_tag_animtime 0.3
 set g_balance_seeker_tag_damageforcescale 4
 set g_balance_seeker_tag_health 5
 set g_balance_seeker_tag_lifetime 15
-set g_balance_seeker_tag_refire 0.7
+set g_balance_seeker_tag_refire 1
 set g_balance_seeker_tag_speed 9000
 set g_balance_seeker_tag_spread 0
 // End new seeker
index f0f4d856e959efa4449e8598a55af698dac252a5..2f0587dde0e9aa46fd4feab21643500784f4a9f2 100644 (file)
@@ -31,12 +31,12 @@ set g_warmup_start_ammo_nails 150 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_rockets 50 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_cells 50 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_fuel 0 "starting values when being in warmup-stage"
-set g_lms_start_health 250
-set g_lms_start_armor 250
+set g_lms_start_health 200
+set g_lms_start_armor 150
 set g_lms_start_ammo_shells 30
-set g_lms_start_ammo_nails 250
-set g_lms_start_ammo_rockets 100
-set g_lms_start_ammo_cells 200
+set g_lms_start_ammo_nails 200
+set g_lms_start_ammo_rockets 150
+set g_lms_start_ammo_cells 150
 set g_lms_start_ammo_fuel 0
 set g_balance_nix_roundtime 25
 set g_balance_nix_incrtime 1.6
@@ -263,13 +263,24 @@ set g_balance_shotgun_secondary_refire 1.1
 set g_balance_shotgun_secondary_animtime 1
 // }}}
 // {{{ uzi
+set g_balance_uzi_mode 0                               // Activates varible spread for sustained & burst mode secondary
+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
+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_damage 20
 set g_balance_uzi_first_force 35
 set g_balance_uzi_first_spread 0.03
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 2
-set g_balance_uzi_sustained_damage 10
+set g_balance_uzi_sustained_damage 12
 set g_balance_uzi_sustained_force 7.5
 set g_balance_uzi_sustained_spread 0.1
 set g_balance_uzi_sustained_refire 0.1
@@ -294,8 +305,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 +323,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
@@ -342,7 +352,7 @@ set g_balance_minelayer_remote_force 300
 // }}}
 // {{{ electro // TODO
 set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 90
+set g_balance_electro_primary_damage 100
 set g_balance_electro_primary_edgedamage 0
 set g_balance_electro_primary_force 425
 set g_balance_electro_primary_force_up 125
@@ -394,11 +404,17 @@ 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 250
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_joinexplode 0
+set g_balance_crylink_primary_joinexplode_damage 0
+set g_balance_crylink_primary_joinexplode_edgedamage 0
+set g_balance_crylink_primary_joinexplode_radius 0
+set g_balance_crylink_primary_joinexplode_force 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
-set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_star_fadetime 0.25
 set g_balance_crylink_primary_other_lifetime 2 // range: 800 full, fades to 1300
 set g_balance_crylink_primary_other_fadetime 0.25
 
@@ -415,6 +431,14 @@ 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 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_joinexplode 0                  
+set g_balance_crylink_secondary_joinexplode_damage 0   
+set g_balance_crylink_secondary_joinexplode_edgedamage 0
+set g_balance_crylink_secondary_joinexplode_radius 0
+set g_balance_crylink_secondary_joinexplode_force 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
@@ -434,7 +458,7 @@ set g_balance_nex_primary_damagefalloff_forcehalflife 2000
 
 set g_balance_nex_secondary 1
 set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.1
+set g_balance_nex_secondary_charge_rate 0.125
 set g_balance_nex_secondary_damage 0
 set g_balance_nex_secondary_force 0
 set g_balance_nex_secondary_refire 0
@@ -451,14 +475,15 @@ set g_balance_nex_charge_start 0.5
 set g_balance_nex_charge_rate 0.05
 set g_balance_nex_charge_limit 0.5
 set g_balance_nex_charge_rot_rate 0.01
+set g_balance_nex_charge_rot_pause 0 // Dont rot down untill this long after release of charge button
 set g_balance_nex_charge_shot_multiplier 0.675
-set g_balance_nex_charge_velocity_rate 0.15
+set g_balance_nex_charge_velocity_rate 0.2
 set g_balance_nex_charge_minspeed 400
 set g_balance_nex_charge_maxspeed 1000
 // }}}
 // {{{ minstanex
-set g_balance_minstanex_refire 1.25
-set g_balance_minstanex_animtime 1
+set g_balance_minstanex_refire 1
+set g_balance_minstanex_animtime 0.75
 set g_balance_minstanex_ammo 10
 // }}}
 // {{{ hagar
@@ -503,11 +528,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
@@ -581,7 +601,7 @@ set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_bursttime 0
 set g_balance_campingrifle_primary_tracer 1
 set g_balance_campingrifle_primary_damage 75
-set g_balance_campingrifle_primary_headshotaddeddamage 75
+set g_balance_campingrifle_primary_headshotaddeddamage 125
 set g_balance_campingrifle_primary_spread 0
 set g_balance_campingrifle_primary_force 2
 set g_balance_campingrifle_primary_speed 40000
@@ -595,7 +615,7 @@ set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
 set g_balance_campingrifle_secondary 1
 set g_balance_campingrifle_secondary_tracer 0
 set g_balance_campingrifle_secondary_damage 50
-set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_campingrifle_secondary_headshotaddeddamage 75
 set g_balance_campingrifle_secondary_spread 0
 set g_balance_campingrifle_secondary_force 2
 set g_balance_campingrifle_secondary_speed 20000
index 38b77306f2257e103d7fa7bc2fec6745c58bb8bd..3ba4264870a96ff28beed9370b75a8c696aa676a 100644 (file)
@@ -55,52 +55,67 @@ 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 45
-set g_pickup_nails 120
+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 200
+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 999
+set g_pickup_armormedium_max 100
 set g_pickup_armormedium_anyway 0
+
 set g_pickup_armorbig 50
-set g_pickup_armorbig_max 999
+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 999
+set g_pickup_healthmedium_max 100
 set g_pickup_healthmedium_anyway 0
+
 set g_pickup_healthlarge 50
-set g_pickup_healthlarge_max 999
+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 5
-set g_pickup_respawntime_ammo 25
+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
@@ -115,18 +130,18 @@ set g_balance_health_regenlinear 0
 set g_balance_pause_health_regen 5
 set g_balance_pause_health_regen_spawn 0
 set g_balance_health_rot 0.1
-set g_balance_health_rotlinear 0
-set g_balance_pause_health_rot 5
-set g_balance_pause_health_rot_spawn 10
+set g_balance_health_rotlinear 2.5
+set g_balance_pause_health_rot 4
+set g_balance_pause_health_rot_spawn 8
 set g_balance_health_regenstable 100
 set g_balance_health_rotstable 100
 set g_balance_health_limit 999
 set g_balance_armor_regen 0
 set g_balance_armor_regenlinear 0
 set g_balance_armor_rot 0.1
-set g_balance_armor_rotlinear 0
-set g_balance_pause_armor_rot 5
-set g_balance_pause_armor_rot_spawn 10
+set g_balance_armor_rotlinear 2.5
+set g_balance_pause_armor_rot 4
+set g_balance_pause_armor_rot_spawn 8
 set g_balance_armor_regenstable 100
 set g_balance_armor_rotstable 100
 set g_balance_armor_limit 999
@@ -136,15 +151,15 @@ set g_balance_fuel_regenlinear 0
 set g_balance_pause_fuel_regen 2 // other than this, fuel uses the health regen counter
 set g_balance_fuel_rot 0.05
 set g_balance_fuel_rotlinear 0
-set g_balance_pause_fuel_rot 5
-set g_balance_pause_fuel_rot_spawn 10
+set g_balance_pause_fuel_rot 4
+set g_balance_pause_fuel_rot_spawn 8
 set g_balance_fuel_regenstable 50
 set g_balance_fuel_rotstable 100
 set g_balance_fuel_limit 999
 // }}}
 
 // {{{ misc
-set g_balance_selfdamagepercent 0.65
+set g_balance_selfdamagepercent 0.6
 set g_balance_weaponswitchdelay 0.15
 set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
 set g_weaponratefactor 1 "weapon fire rate multiplier"
@@ -176,15 +191,15 @@ set g_projectiles_spread_style 7
 // 7: forward + circle with (1-r)(2-r) falloff
 set g_balance_falldamage_deadminspeed 150
 set g_balance_falldamage_minspeed 800
-set g_balance_falldamage_factor 0.20
-set g_balance_falldamage_maxdamage 15
+set g_balance_falldamage_factor 0.02 // maxspeed = minspeed + maxdamage / factor = 4550
+set g_balance_falldamage_maxdamage 75
 // }}}
 
 // {{{ powerups
 set g_balance_powerup_invincible_takedamage 0.3
 set g_balance_powerup_invincible_time 30
 set g_balance_powerup_strength_damage 3
-set g_balance_powerup_strength_force 4
+set g_balance_powerup_strength_force 3
 set g_balance_powerup_strength_time 30
 set g_balance_powerup_strength_selfdamage 1.5
 set g_balance_powerup_strength_selfforce 1.5
@@ -212,11 +227,11 @@ set g_balance_grapplehook_health 130
 
 // {{{ weapon properties
 // {{{ laser
-set g_balance_laser_primary_damage 20 // dps 33, hope that's not too high
-set g_balance_laser_primary_edgedamage 20
-set g_balance_laser_primary_force 270
+set g_balance_laser_primary_damage 20 
+set g_balance_laser_primary_edgedamage 10
+set g_balance_laser_primary_force 230
 set g_balance_laser_primary_radius 60
-set g_balance_laser_primary_speed 4000
+set g_balance_laser_primary_speed 9000
 set g_balance_laser_primary_spread 0
 set g_balance_laser_primary_refire 0.6
 set g_balance_laser_primary_animtime 0.6
@@ -224,7 +239,7 @@ set g_balance_laser_primary_lifetime 5
 set g_balance_laser_primary_shotangle 0
 set g_balance_laser_primary_delay 0
 set g_balance_laser_primary_gauntlet 0
-set g_balance_laser_primary_force_zscale 1
+set g_balance_laser_primary_force_zscale 1.2
 set g_balance_laser_primary_force_velocitybias 0
 set g_balance_laser_secondary 0 // when 1, a secondary laser mode exists
 set g_balance_laser_secondary_damage 35
@@ -245,7 +260,7 @@ set g_balance_laser_secondary_force_velocitybias 0
 // {{{ shotgun
 set g_balance_shotgun_primary_bullets 10
 set g_balance_shotgun_primary_damage 5
-set g_balance_shotgun_primary_force 60
+set g_balance_shotgun_primary_force 5
 set g_balance_shotgun_primary_spread 0.07
 set g_balance_shotgun_primary_refire 0.8
 set g_balance_shotgun_primary_animtime 0.2
@@ -262,26 +277,42 @@ 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
+set g_balance_uzi_spread_max 0.6
+set g_balance_uzi_spread_add 0.008
+
+set g_balance_uzi_burst 3                              // # 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.4    // refire after burst
+set g_balance_uzi_burst_spread 0.03
+set g_balance_uzi_burst_damage 18              // 90 dps (but 90 dmg deliverd in .25s)
+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.3
+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 10
-set g_balance_uzi_sustained_spread 0.08
+
+set g_balance_uzi_sustained_damage 14  // 120 dps
+set g_balance_uzi_sustained_force 12
+set g_balance_uzi_sustained_spread 0.02
 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
 // }}}
 // {{{ mortar
 set g_balance_grenadelauncher_primary_type 0
-set g_balance_grenadelauncher_primary_damage 60
-set g_balance_grenadelauncher_primary_edgedamage 38
-set g_balance_grenadelauncher_primary_force 400
+set g_balance_grenadelauncher_primary_damage 50
+set g_balance_grenadelauncher_primary_edgedamage 30
+set g_balance_grenadelauncher_primary_force 250
 set g_balance_grenadelauncher_primary_radius 140
 set g_balance_grenadelauncher_primary_speed 2000
 set g_balance_grenadelauncher_primary_speed_up 200
@@ -294,14 +325,12 @@ 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
-set g_balance_grenadelauncher_secondary_edgedamage 38
-set g_balance_grenadelauncher_secondary_force 400
+set g_balance_grenadelauncher_secondary_damage 60
+set g_balance_grenadelauncher_secondary_edgedamage 35
+set g_balance_grenadelauncher_secondary_force 300
 set g_balance_grenadelauncher_secondary_radius 140
 set g_balance_grenadelauncher_secondary_speed 1400
 set g_balance_grenadelauncher_secondary_speed_up 200
@@ -314,9 +343,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
@@ -341,65 +371,71 @@ set g_balance_minelayer_remote_radius 200
 set g_balance_minelayer_remote_force 300
 // }}}
 // {{{ electro
-set g_balance_electro_lightning 1
-set g_balance_electro_primary_damage 110
+set g_balance_electro_lightning 0
+set g_balance_electro_primary_damage 35
 set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 425
-set g_balance_electro_primary_force_up 125
-set g_balance_electro_primary_radius 850
-set g_balance_electro_primary_comboradius 150
-set g_balance_electro_primary_speed 0
+set g_balance_electro_primary_force 150
+set g_balance_electro_primary_force_up 0
+set g_balance_electro_primary_radius 155
+set g_balance_electro_primary_comboradius 0
+set g_balance_electro_primary_speed 2000
 set g_balance_electro_primary_spread 0
-set g_balance_electro_primary_lifetime 0
-set g_balance_electro_primary_refire 0.4
-set g_balance_electro_primary_animtime 0.03333333
-set g_balance_electro_primary_ammo 7
-set g_balance_electro_primary_range 800
+set g_balance_electro_primary_lifetime 30
+set g_balance_electro_primary_refire 0.65
+set g_balance_electro_primary_animtime 0.3
+set g_balance_electro_primary_ammo 2
+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 100
-set g_balance_electro_secondary_radius 100
-set g_balance_electro_secondary_speed 500
+set g_balance_electro_secondary_force 50
+set g_balance_electro_secondary_radius 25
+set g_balance_electro_secondary_speed 750
 set g_balance_electro_secondary_speed_up 150
 set g_balance_electro_secondary_speed_z 0
-set g_balance_electro_secondary_spread 0.08
-set g_balance_electro_secondary_lifetime 3.5
+set g_balance_electro_secondary_spread 0.025
+set g_balance_electro_secondary_lifetime 5
 set g_balance_electro_secondary_refire 0.1
 set g_balance_electro_secondary_refire2 2
-set g_balance_electro_secondary_animtime 0.2
+set g_balance_electro_secondary_animtime 0.15
 set g_balance_electro_secondary_ammo 2
 set g_balance_electro_secondary_health 10
-set g_balance_electro_secondary_damageforcescale 4
+set g_balance_electro_secondary_damageforcescale 2
 set g_balance_electro_secondary_count 3
-set g_balance_electro_combo_damage 60
-set g_balance_electro_combo_edgedamage 0
-set g_balance_electro_combo_force 80
+
+set g_balance_electro_combo_damage 80
+set g_balance_electro_combo_edgedamage 10
+set g_balance_electro_combo_force 150
 set g_balance_electro_combo_radius 250
 set g_balance_electro_combo_comboradius 0
-set g_balance_electro_combo_speed 400
+set g_balance_electro_combo_speed 1000
 // }}}
 // {{{ crylink
 set g_balance_crylink_primary_damage 5
-set g_balance_crylink_primary_edgedamage 2.5
-set g_balance_crylink_primary_force 25
-set g_balance_crylink_primary_radius 50
-set g_balance_crylink_primary_speed 2500
-set g_balance_crylink_primary_spread 0.04
-set g_balance_crylink_primary_shots 12
+set g_balance_crylink_primary_edgedamage 3
+set g_balance_crylink_primary_force 10
+set g_balance_crylink_primary_radius 15
+set g_balance_crylink_primary_speed 1500
+set g_balance_crylink_primary_spread 0.1
+set g_balance_crylink_primary_shots 8
 set g_balance_crylink_primary_bounces 1
 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_middle_lifetime 5 // range: 10000 full, fades to 20000
-set g_balance_crylink_primary_middle_fadetime 5
-set g_balance_crylink_primary_star_lifetime 2 // range: 800 full, fades to 1300
-set g_balance_crylink_primary_star_fadetime 0.25
+set g_balance_crylink_primary_joinspeed 150
+set g_balance_crylink_primary_jointime 0
+set g_balance_crylink_primary_joinexplode 1                            //if != 0 do a extra damage pass when projectiles join
+set g_balance_crylink_primary_joinexplode_damage 100   //Max demage (Determined by % of _primary_shots that joins)
+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
 set g_balance_crylink_primary_other_fadetime 0.25
 
@@ -416,6 +452,14 @@ 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 0
+set g_balance_crylink_secondary_jointime 0
+set g_balance_crylink_secondary_joinexplode 0                  
+set g_balance_crylink_secondary_joinexplode_damage 0   
+set g_balance_crylink_secondary_joinexplode_edgedamage 0
+set g_balance_crylink_secondary_joinexplode_radius 0
+set g_balance_crylink_secondary_joinexplode_force 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
@@ -425,7 +469,7 @@ set g_balance_crylink_secondary_line_fadetime 2
 // {{{ nex
 set g_balance_nex_primary_damage 100
 set g_balance_nex_primary_force 600
-set g_balance_nex_primary_refire 0.75
+set g_balance_nex_primary_refire 1
 set g_balance_nex_primary_animtime 0.3
 set g_balance_nex_primary_ammo 5
 set g_balance_nex_primary_damagefalloff_mindist 0
@@ -435,7 +479,7 @@ set g_balance_nex_primary_damagefalloff_forcehalflife 0
 
 set g_balance_nex_secondary 1
 set g_balance_nex_secondary_charge 1
-set g_balance_nex_secondary_charge_rate 0.7
+set g_balance_nex_secondary_charge_rate 0.55
 set g_balance_nex_secondary_damage 100
 set g_balance_nex_secondary_force 600
 set g_balance_nex_secondary_refire 1.5
@@ -451,7 +495,8 @@ set g_balance_nex_charge_mindmg 10
 set g_balance_nex_charge_start 0
 set g_balance_nex_charge_rate 0.35
 set g_balance_nex_charge_limit 0.5
-set g_balance_nex_charge_rot_rate 0
+set g_balance_nex_charge_rot_rate 0.1
+set g_balance_nex_charge_rot_pause 1 // Dont rot down untill this long after release of charge button
 set g_balance_nex_charge_shot_multiplier 0
 set g_balance_nex_charge_velocity_rate 0
 set g_balance_nex_charge_minspeed 400
@@ -463,14 +508,14 @@ set g_balance_minstanex_animtime 0.3
 set g_balance_minstanex_ammo 10
 // }}}
 // {{{ hagar
-set g_balance_hagar_primary_damage 30
-set g_balance_hagar_primary_edgedamage 15
-set g_balance_hagar_primary_force 50
-set g_balance_hagar_primary_radius 65
+set g_balance_hagar_primary_damage 25
+set g_balance_hagar_primary_edgedamage 5
+set g_balance_hagar_primary_force 70
+set g_balance_hagar_primary_radius 60
 set g_balance_hagar_primary_spread 0.010
-set g_balance_hagar_primary_speed 3000
+set g_balance_hagar_primary_speed 2500
 set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.15
+set g_balance_hagar_primary_refire 0.2
 set g_balance_hagar_primary_ammo 1
 set g_balance_hagar_secondary 1
 set g_balance_hagar_secondary_damage 30
@@ -485,30 +530,25 @@ set g_balance_hagar_secondary_refire 0.15
 set g_balance_hagar_secondary_ammo 1
 // }}}
 // {{{ rocketlauncher // TODO
-set g_balance_rocketlauncher_damage 110
+set g_balance_rocketlauncher_damage 120
 set g_balance_rocketlauncher_edgedamage 25
 set g_balance_rocketlauncher_force 350
-set g_balance_rocketlauncher_radius 125
-set g_balance_rocketlauncher_speed 1000
+set g_balance_rocketlauncher_radius 130
+set g_balance_rocketlauncher_speed 900
 set g_balance_rocketlauncher_speedaccel 0
-set g_balance_rocketlauncher_speedstart 1000
-set g_balance_rocketlauncher_lifetime 5
-set g_balance_rocketlauncher_refire 1
+set g_balance_rocketlauncher_speedstart 900
+set g_balance_rocketlauncher_lifetime 9
+set g_balance_rocketlauncher_refire 1.2
 set g_balance_rocketlauncher_animtime 0.4
 set g_balance_rocketlauncher_ammo 3
 set g_balance_rocketlauncher_health 10
 set g_balance_rocketlauncher_damageforcescale 0
 set g_balance_rocketlauncher_detonatedelay -1 // positive: timer till detonation is allowed, negative: "security device" that prevents ANY remote detonation if it could hurt its owner, zero: detonatable at any time
-set g_balance_rocketlauncher_guiderate 45 // max degrees per second
+set g_balance_rocketlauncher_guiderate 25 // max degrees per second
 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
@@ -580,13 +620,13 @@ set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_bursttime 0
 set g_balance_campingrifle_primary_tracer 1
-set g_balance_campingrifle_primary_damage 75
-set g_balance_campingrifle_primary_headshotaddeddamage 75
+set g_balance_campingrifle_primary_damage 40
+set g_balance_campingrifle_primary_headshotaddeddamage 100
 set g_balance_campingrifle_primary_spread 0
 set g_balance_campingrifle_primary_force 2
 set g_balance_campingrifle_primary_speed 40000
 set g_balance_campingrifle_primary_lifetime 5
-set g_balance_campingrifle_primary_refire 1.5
+set g_balance_campingrifle_primary_refire 0.65
 set g_balance_campingrifle_primary_animtime 0.6
 set g_balance_campingrifle_primary_ammo 10
 set g_balance_campingrifle_primary_bulletconstant 110 // 62.2qu
@@ -621,7 +661,7 @@ set g_balance_tuba_force 40
 // {{{ fireball
 set g_balance_fireball_primary_ammo 40
 set g_balance_fireball_primary_animtime 0.15
-set g_balance_fireball_primary_bfgdamage 100
+set g_balance_fireball_primary_bfgdamage 150
 set g_balance_fireball_primary_bfgforce 0
 set g_balance_fireball_primary_bfgradius 1000
 set g_balance_fireball_primary_damage 200
@@ -675,8 +715,8 @@ set g_balance_seeker_missile_accel 1.05
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
 set g_balance_seeker_missile_count 4
-set g_balance_seeker_missile_damage 40
-set g_balance_seeker_missile_damageforcescale 4
+set g_balance_seeker_missile_damage 50
+set g_balance_seeker_missile_damageforcescale 2
 set g_balance_seeker_missile_decel 0.9
 set g_balance_seeker_missile_delay 0.25
 set g_balance_seeker_missile_edgedamage 10
@@ -705,7 +745,7 @@ set g_balance_seeker_tag_animtime 0.3
 set g_balance_seeker_tag_damageforcescale 4
 set g_balance_seeker_tag_health 5
 set g_balance_seeker_tag_lifetime 15
-set g_balance_seeker_tag_refire 0.7
+set g_balance_seeker_tag_refire 1
 set g_balance_seeker_tag_speed 9000
 set g_balance_seeker_tag_spread 0
 // End new seeker
index 59c3be6e4a8e6d7832789d24ecd1911bdc2003fc..43280aba9174f84f6f6de6722378ee73b23173d5 100644 (file)
@@ -90,9 +90,7 @@ _cl_name Player
 _cl_playermodel models/player/umbra.iqm
 _cl_playerskin 0
 seta crosshair 3
-seta crosshair_color_red 0.6
-seta crosshair_color_green 0.8
-seta crosshair_color_blue 1
+seta crosshair_color "0.6 0.8 1"
 seta crosshair_alpha 1
 seta crosshair_size 0.35
 seta crosshair_dot 1
@@ -102,117 +100,82 @@ seta crosshair_pickup 0.25
 seta crosshair_pickup_speed 4
 seta crosshair_per_weapon 0    "when 1, each gun will display a different crosshair"
 seta crosshair_color_override 0        "when 1, crosshair_color_* overrides the per-weapon color"
+seta crosshair_color_per_weapon 1 "when 1, each gun will display a different colored crosshair"
 seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
 seta crosshair_effect_scalefade 1 "use scaling and fading for crosshair effects"
 seta crosshair_hittest 1 "do a crosshair hit evaluation; also, the crosshair is scaled by the given number when aiming at an enemy, and blurred when aiming at a team mate"
 seta crosshair_hittest_blur 1 "blur the crosshair if the shot is obstructed"
 seta crosshair_hittest_showimpact 0 "move the crosshair to the actual impact location if obstructed"
 seta crosshair_laser ""        "crosshair to display when wielding the laser"
-seta crosshair_laser_color_red 1       "crosshair color red component to display when wielding the laser"
-seta crosshair_laser_color_green 0.35  "crosshair color green component to display when wielding the laser"
-seta crosshair_laser_color_blue 0.2    "crosshair color blue component to display when wielding the laser"
+seta crosshair_laser_color "1 0.35 0.2"        "crosshair color to display when wielding the laser"
 seta crosshair_laser_alpha 0.75        "crosshair alpha value to display when wielding the laser"
 seta crosshair_laser_size 0.4  "crosshair size when wielding the laser"
 seta crosshair_shotgun ""      "crosshair to display when wielding the shotgun"
-seta crosshair_shotgun_color_red 0.7   "crosshair color red component to display when wielding the shotgun"
-seta crosshair_shotgun_color_green 0.7 "crosshair color green component to display when wielding the shotgun"
-seta crosshair_shotgun_color_blue 0.7  "crosshair color blue component to display when wielding the shotgun"
+seta crosshair_shotgun_color "0.7 0.7 0.7"     "crosshair color to display when wielding the shotgun"
 seta crosshair_shotgun_alpha 1.1       "crosshair alpha value to display when wielding the shotgun"
 seta crosshair_shotgun_size 0.65       "crosshair size when wielding the shotgun"
 seta crosshair_uzi ""  "crosshair to display when wielding the machinegun"
-seta crosshair_uzi_color_red 0.4       "crosshair color red component to display when wielding the machinegun"
-seta crosshair_uzi_color_green 0.9     "crosshair color green component to display when wielding the machinegun"
-seta crosshair_uzi_color_blue 0.35     "crosshair color blue component to display when wielding the machinegun"
+seta crosshair_uzi_color "0.4 0.9 0.35"        "crosshair color to display when wielding the machinegun"
 seta crosshair_uzi_alpha 0.9   "crosshair alpha value to display when wielding the machinegun"
 seta crosshair_uzi_size 0.6    "crosshair size when wielding the machinegun"
 seta crosshair_grenadelauncher ""      "crosshair to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_red 1     "crosshair color red component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_green 0.15        "crosshair color green component to display when wielding the mortar"
-seta crosshair_grenadelauncher_color_blue 0    "crosshair color blue component to display when wielding the mortar"
+seta crosshair_grenadelauncher_color "1 0.15 0"        "crosshair color to display when wielding the mortar"
 seta crosshair_grenadelauncher_alpha 1.15      "crosshair alpha value to display when wielding the mortar"
 seta crosshair_grenadelauncher_size 0.7        "crosshair size when wielding the mortar"
 seta crosshair_minelayer ""    "crosshair to display when wielding the mortar"
-seta crosshair_minelayer_color_red 0.75        "crosshair color red component to display when wielding the mortar"
-seta crosshair_minelayer_color_green 0.75      "crosshair color green component to display when wielding the mortar"
-seta crosshair_minelayer_color_blue 0  "crosshair color blue component to display when wielding the mortar"
+seta crosshair_minelayer_color "0.75 0.75 0"   "crosshair color to display when wielding the mortar"
 seta crosshair_minelayer_alpha 1.15    "crosshair alpha value to display when wielding the mortar"
 seta crosshair_minelayer_size 0.9      "crosshair size when wielding the mortar"
 seta crosshair_electro ""      "crosshair to display when wielding the electro"
-seta crosshair_electro_color_red 0.35  "crosshair color red component to display when wielding the electro"
-seta crosshair_electro_color_green 0.5 "crosshair color green component to display when wielding the electro"
-seta crosshair_electro_color_blue 1    "crosshair color blue component to display when wielding the electro"
+seta crosshair_electro_color "0.35 0.5 1"      "crosshair color to display when wielding the electro"
 seta crosshair_electro_alpha 1 "crosshair alpha value to display when wielding the electro"
 seta crosshair_electro_size 0.5        "crosshair size when wielding the electro"
 seta crosshair_crylink ""      "crosshair to display when wielding the crylink"
-seta crosshair_crylink_color_red 0.85  "crosshair color red component to display when wielding the crylink"
-seta crosshair_crylink_color_green 0.25        "crosshair color green component to display when wielding the crylink"
-seta crosshair_crylink_color_blue 1    "crosshair color blue component to display when wielding the crylink"
+seta crosshair_crylink_color "0.85 0.25 1"     "crosshair color to display when wielding the crylink"
 seta crosshair_crylink_alpha 0.85      "crosshair alpha value to display when wielding the crylink"
 seta crosshair_crylink_size 0.4        "crosshair size when wielding the crylink"
 seta crosshair_nex ""  "crosshair to display when wielding the nex gun"
-seta crosshair_nex_color_red 0 "crosshair color red component to display when wielding the nex gun"
-seta crosshair_nex_color_green 0.9     "crosshair color green component to display when wielding the nex gun"
-seta crosshair_nex_color_blue 1        "crosshair color blue component to display when wielding the nex gun"
+seta crosshair_nex_color "0 0.9 1"     "crosshair color to display when wielding the nex gun"
 seta crosshair_nex_alpha 0.85  "crosshair alpha value to display when wielding the nex gun"
 seta crosshair_nex_size 0.65   "crosshair size when wielding the nex gun"
 seta crosshair_hagar ""        "crosshair to display when wielding the hagar"
-seta crosshair_hagar_color_red 0.85    "crosshair color red component to display when wielding the hagar"
-seta crosshair_hagar_color_green 0.5   "crosshair color green component to display when wielding the hagar"
-seta crosshair_hagar_color_blue 0.35   "crosshair color blue component to display when wielding the hagar"
+seta crosshair_hagar_color "0.85 0.5 0.35"     "crosshair color to display when wielding the hagar"
 seta crosshair_hagar_alpha 1   "crosshair alpha value to display when wielding the hagar"
 seta crosshair_hagar_size 0.8  "crosshair size when wielding the hagar"
 seta crosshair_rocketlauncher ""       "crosshair to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_red 1      "crosshair color red component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_green 0.75 "crosshair color green component to display when wielding the rocketlauncher"
-seta crosshair_rocketlauncher_color_blue 0.2   "crosshair color blue component to display when wielding the rocketlauncher"
+seta crosshair_rocketlauncher_color "1 0.75 0.2"       "crosshair color to display when wielding the rocketlauncher"
 seta crosshair_rocketlauncher_alpha 1  "crosshair alpha value to display when wielding the rocketlauncher"
 seta crosshair_rocketlauncher_size 0.5875      "crosshair size when wielding the rocketlauncher"
 seta crosshair_porto ""        "crosshair to display when wielding the porto"
-seta crosshair_porto_color_red 0.5     "crosshair color red component to display when wielding the porto"
-seta crosshair_porto_color_green 1     "crosshair color green component to display when wielding the porto"
-seta crosshair_porto_color_blue 0.5    "crosshair color blue component to display when wielding the porto"
+seta crosshair_porto_color "0.5 1 0.5" "crosshair color to display when wielding the porto"
 seta crosshair_porto_alpha 0.85        "crosshair alpha value to display when wielding the porto"
 seta crosshair_porto_size 0.6  "crosshair size when wielding the porto"
 seta crosshair_minstanex ""    "crosshair to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_red 0.65        "crosshair color red component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_green 0.65      "crosshair color green component to display when wielding the minstanex gun"
-seta crosshair_minstanex_color_blue 1  "crosshair color blue component to display when wielding the minstanex gun"
+seta crosshair_minstanex_color "0.65 0.65 1"   "crosshair color to display when wielding the minstanex gun"
 seta crosshair_minstanex_alpha 1       "crosshair alpha value to display when wielding the minstanex gun"
 seta crosshair_minstanex_size 0.4      "crosshair size when wielding the minstanex gun"
 seta crosshair_hook "" "crosshair to display when wielding the hook"
-seta crosshair_hook_color_red 0.65     "crosshair color red component to display when wielding the hook"
-seta crosshair_hook_color_green 1      "crosshair color green component to display when wielding the hook"
-seta crosshair_hook_color_blue 0.85    "crosshair color blue component to display when wielding the hook"
+seta crosshair_hook_color "0.65 1 0.85"        "crosshair color to display when wielding the hook"
 seta crosshair_hook_alpha 0.85 "crosshair alpha value to display when wielding the hook"
 seta crosshair_hook_size 0.5   "crosshair size when wielding the hook"
 seta crosshair_hlac "" "crosshair to display when wielding the H.L.A.C"
-seta crosshair_hlac_color_red 1        "crosshair color red component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_green 0.65   "crosshair color green component to display when wielding the H.L.A.C."
-seta crosshair_hlac_color_blue 0.2     "crosshair color blue component to display when wielding the H.L.A.C."
+seta crosshair_hlac_color "1 0.65 0.2" "crosshair color to display when wielding the H.L.A.C."
 seta crosshair_hlac_alpha 1    "crosshair alpha value to display when wielding the H.L.A.C."
 seta crosshair_hlac_size 0.6   "crosshair size when wielding the H.L.A.C."
 seta crosshair_seeker ""       "crosshair to display when wielding the TAG Seeker"
-seta crosshair_seeker_color_red 1      "crosshair color red component to display when wielding the TAG seeker"
-seta crosshair_seeker_color_green 0.35 "crosshair color green component to display when wielding the TAG seeker"
-seta crosshair_seeker_color_blue 0.35  "crosshair color blue component to display when wielding the TAG seeker"
+seta crosshair_seeker_color "1 0.35 0.35"      "crosshair color to display when wielding the TAG seeker"
 seta crosshair_seeker_alpha 0.9        "crosshair alpha value to display when wielding the TAG seeker"
 seta crosshair_seeker_size 0.8 "crosshair size when wielding the TAG seeker"
 seta crosshair_campingrifle "" "crosshair to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_red 0.85     "crosshair color red component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_green 0.5    "crosshair color green component to display when wielding the campingrifle"
-seta crosshair_campingrifle_color_blue 0.25    "crosshair color blue component to display when wielding the campingrifle"
+seta crosshair_campingrifle_color "0.85 0.5 0.25"      "crosshair color to display when wielding the campingrifle"
 seta crosshair_campingrifle_alpha 1    "crosshair alpha value to display when wielding the campingrifle"
 seta crosshair_campingrifle_size 0.65  "crosshair size when wielding the campingrifle"
 seta crosshair_tuba "" "crosshair to display when wielding the tuba"
-seta crosshair_tuba_color_red 0.85     "crosshair color red component to display when wielding the tuba"
-seta crosshair_tuba_color_green 0.5    "crosshair color green component to display when wielding the tuba"
-seta crosshair_tuba_color_blue 0.25    "crosshair color blue component to display when wielding the tuba"
+seta crosshair_tuba_color "0.85 0.5 0.25"      "crosshair color to display when wielding the tuba"
 seta crosshair_tuba_alpha 1    "crosshair alpha value to display when wielding the tuba"
 seta crosshair_tuba_size 1     "crosshair size when wielding the tuba"
 seta crosshair_fireball ""     "crosshair to display when wielding the fireball"
-seta crosshair_fireball_color_red 0.2  "crosshair color red component to display when wielding the fireball"
-seta crosshair_fireball_color_green 1.0        "crosshair color green component to display when wielding the fireball"
-seta crosshair_fireball_color_blue 0.2 "crosshair color blue component to display when wielding the fireball"
+seta crosshair_fireball_color "0.2 1.0 0.2"    "crosshair color to display when wielding the fireball"
 seta crosshair_fireball_alpha 1        "crosshair alpha value to display when wielding the fireball"
 seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
 seta crosshair_ring_size 2     "bullet counter ring size for Rifle, velocity ring for Nex"
@@ -526,7 +489,7 @@ 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_weaponarena_random_with_laser "1"        "additionally, always provide the laser in random weapon arena games"
 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"
@@ -1376,11 +1339,7 @@ seta sbar_info_pos 0 "Y-axis distance from lower right corner for engine info pr
 seta hud_panel_weapons_label 1 "1 = show number of weapon, 2 = show bound key of weapon"
 seta hud_panel_weapons_complainbubble_time 1 "time that a new entry stays until it fades out"
 seta hud_panel_weapons_complainbubble_fadetime 0.25 "fade out time"
-seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background"
-seta hud_panel_weapons_accuracy_color0 "1 0 0"
-seta hud_panel_weapons_accuracy_color1 "1 1 0"
-seta hud_panel_weapons_accuracy_color2 "0 1 0"
-seta hud_panel_weapons_accuracy_color_levels "0 20 100" "accuracy values at which a specified color (hud_panel_weapons_accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
+seta hud_panel_weapons_accuracy 1 "show accuracy color as the weapon icon background; colors can be configured with accuracy_color* cvars"
 seta hud_panel_weapons_ammo 1 "show ammo as a status bar"
 seta hud_panel_weapons_ammo_full_shells 50 "show 100% of the status bar at this ammo count"
 seta hud_panel_weapons_ammo_full_nails 200 "show 100% of the status bar at this ammo count"
@@ -1414,7 +1373,7 @@ seta scoreboard_columns default
 seta scoreboard_border_thickness 1 "scoreboard border thickness"
 seta scoreboard_accuracy_border_thickness 1 "accuracy stats border thickness"
 seta scoreboard_accuracy_doublerows 0 "use two rows instead of one"
-seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard"
+seta scoreboard_accuracy 1 "show weapon accuracy stats panel on scoreboard; colors can be configured with accuracy_color* cvars"
 seta scoreboard_color_bg_r 0 "red color component of the scoreboard background"
 seta scoreboard_color_bg_g 0.4 "green color component of the scoreboard background"
 seta scoreboard_color_bg_b 0.6 "blue color component of the scoreboard background"
@@ -1432,6 +1391,11 @@ seta scoreboard_offset_left 0.04 "how many pixels the scoreboard is offset from
 seta scoreboard_offset_right 0.148 "how many pixels the scoreboard is offset from the right screen edge"
 seta scoreboard_bg_scale 0.25 "scale for the tiled scoreboard background"
 
+seta accuracy_color_levels "0 20 100" "accuracy values at which a specified color (accuracy_color<X>) will be used. If your accuracy is between 2 of these values then a mix of the Xth and X+1th colors will be used. You can specify up to 10 values, in increasing order"
+seta accuracy_color0 "1 0 0"
+seta accuracy_color1 "1 1 0"
+seta accuracy_color2 "0 1 0"
+
 // for menu server list (eventually make them have engine support?)
 seta menu_slist_showfull 1 "show servers even if they are full and have no slots to join"
 seta menu_slist_showempty 1 "show servers even if they are no empty and have no opponents to play against"
@@ -1440,7 +1404,7 @@ set menu_slist_modfilter "=" // set to either: !modname or modname. modname of =
 // for menu weapon arena
 set menu_weaponarena_with_laser 0 "also enable the Laser in this weapon arena"
 
-seta menu_maxplayers 8 "maxplayers value when the menu starts a game"
+seta menu_maxplayers 16 "maxplayers value when the menu starts a game"
 
 // command executed before loading a map by the menu
 // makes sure maxplayers is at least minplayers or bot_number + 1
@@ -2009,6 +1973,17 @@ 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"
+
+// auto-teams (team selection by player ID)
+// any player not listed is forced to spectate
+set g_forced_team_red "" "list of player IDs for red team"
+set g_forced_team_blue "" "list of player IDs for blue team"
+set g_forced_team_yellow "" "list of player IDs for yellow team"
+set g_forced_team_pink "" "list of player IDs for pink team"
+set g_forced_team_otherwise "default" "action if a non listed player joins (can be default for default action, spectate for forcing to spectate, or red, blue, yellow, pink)"
+
 // other config files
 exec balanceXonotic.cfg
 exec ctfscoring-ai.cfg
diff --git a/demos/the-big-keybench.dem b/demos/the-big-keybench.dem
new file mode 100644 (file)
index 0000000..6f6aced
Binary files /dev/null and b/demos/the-big-keybench.dem differ
index 3ad766d85ff714ded5623b3f1ef287583faa6dbb..1947d3f0611f9704394cfe59bb0f6016e84a9f9c 100644 (file)
@@ -5060,3 +5060,53 @@ velocitymultiplier 2.5
 airfriction 8
 gravity 1.3
 stretchfactor 0.1
+
+
+// crylink joinexplode effect
+// decal
+// used in qcsrc/client/damage.qc:                                     pointparticles(particleeffectnum("crylink_joinexplode"), org2, '0 0 0', 1)
+effect crylink_joinexplode
+countabsolute 1
+type decal
+tex 47 47
+size 24 24
+alpha 256 256 0
+originjitter 12 12 12
+//lightradius 200
+//lightradiusfade 800
+//lightcolor 3.2 0.4 4
+// purple flare effect
+effect crylink_joinexplode
+countabsolute 1
+type static
+tex 39 39
+color 0x504060 0x504060
+size 24 24
+alpha 256 256 512
+// purple sparks
+effect crylink_joinexplode
+count 40
+type spark
+tex 41 41
+color 0xA040C0 0xA040C0
+bounce 2
+size 6 6
+alpha 256 256 1024
+velocityjitter 512 512 512
+// purple splash
+effect crylink_joinexplode
+count 1.5
+type static
+color 0xE070FF 0xE070FF
+size 16 16
+alpha 256 256 512
+velocityjitter 32 32 32
+// purple splash
+effect crylink_joinexplode
+count 3
+type static
+color 0xE070FF 0xE070FF
+size 16 16
+alpha 256 256 1024
+velocityjitter 256 256 256
+
diff --git a/gfx/menu/default/icon_ipv4.tga b/gfx/menu/default/icon_ipv4.tga
new file mode 100644 (file)
index 0000000..a0484f4
Binary files /dev/null and b/gfx/menu/default/icon_ipv4.tga differ
diff --git a/gfx/menu/default/icon_ipv6.tga b/gfx/menu/default/icon_ipv6.tga
new file mode 100644 (file)
index 0000000..d3fdc03
Binary files /dev/null and b/gfx/menu/default/icon_ipv6.tga differ
index 4f0b00157df434b9582071b436ffed2ff68b2a96..f94884483987e7133d11eb4bfd06477248720fd0 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_d0.tga and b/gfx/menu/luminos/checkbox_d0.tga differ
index 5f19b3caa0019f45f45856e7ef992f3aaf4a582b..c04496827e11423beeb305a2cbf804eeb3d6a25f 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_f0.tga and b/gfx/menu/luminos/checkbox_f0.tga differ
index c062f31c0e77c0a0b0062b7a5d280d04cb624124..b0efdda8380af4a3917399988459bba8d24e6c5b 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_n0.tga and b/gfx/menu/luminos/checkbox_n0.tga differ
diff --git a/gfx/menu/luminos/icon_ipv4.tga b/gfx/menu/luminos/icon_ipv4.tga
new file mode 100644 (file)
index 0000000..a0484f4
Binary files /dev/null and b/gfx/menu/luminos/icon_ipv4.tga differ
diff --git a/gfx/menu/luminos/icon_ipv6.tga b/gfx/menu/luminos/icon_ipv6.tga
new file mode 100644 (file)
index 0000000..d3fdc03
Binary files /dev/null and b/gfx/menu/luminos/icon_ipv6.tga differ
diff --git a/gfx/menu/xaw/colorpicker_selected.tga b/gfx/menu/xaw/colorpicker_selected.tga
new file mode 100644 (file)
index 0000000..605e932
Binary files /dev/null and b/gfx/menu/xaw/colorpicker_selected.tga differ
diff --git a/gfx/menu/xaw/icon_ipv4.tga b/gfx/menu/xaw/icon_ipv4.tga
new file mode 100644 (file)
index 0000000..a0484f4
Binary files /dev/null and b/gfx/menu/xaw/icon_ipv4.tga differ
diff --git a/gfx/menu/xaw/icon_ipv6.tga b/gfx/menu/xaw/icon_ipv6.tga
new file mode 100644 (file)
index 0000000..d3fdc03
Binary files /dev/null and b/gfx/menu/xaw/icon_ipv6.tga differ
index ecfc84ec2ca710410a990a73eec1b56d2877d377..b47423748ea6d0358ec0df02e22c212d95aab492 100644 (file)
Binary files a/gfx/net.tga and b/gfx/net.tga differ
index 5660da4b77ec091272aa5069b822de6357af7f5b..0ded4194259305da97e3c1c1d9f7a6c6f773f725 100644 (file)
@@ -81,7 +81,7 @@ seta hud_panel_healtharmor_bg_color_team ""
 seta hud_panel_healtharmor_bg_alpha ""
 seta hud_panel_healtharmor_bg_border ""
 seta hud_panel_healtharmor_bg_padding ""
-seta hud_panel_healtharmor_flip "0
+seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "4"
 seta hud_panel_healtharmor_baralign "4"
 seta hud_panel_healtharmor_progressbar "1"
index 93e8c99591f6ddd6cae1ad6d64b832e35a7e2dfd..bdd7a97f2ab3c978b9a7d07eb7ede6d6e9b3d964 100644 (file)
@@ -81,7 +81,7 @@ seta hud_panel_healtharmor_bg_color_team ""
 seta hud_panel_healtharmor_bg_alpha ""
 seta hud_panel_healtharmor_bg_border ""
 seta hud_panel_healtharmor_bg_padding ""
-seta hud_panel_healtharmor_flip "0
+seta hud_panel_healtharmor_flip "0"
 seta hud_panel_healtharmor_iconalign "0"
 seta hud_panel_healtharmor_baralign "0"
 seta hud_panel_healtharmor_progressbar "0"
index 675c72722018d66eb1f7a28cee46d8335c37a55e..8a52aff2b07de40e38c286ff2975c7ff4cabf331 100644 (file)
@@ -1,6 +1,6 @@
 // "NoQWBunny" physics based on XPM
 sv_gravity 800
-sv_maxspeed 320
+sv_maxspeed 400
 sv_maxairspeed 400
 
 sv_stopspeed 100
index 959d593a393e49170882a4863a9e6b7ac7134ce9..8e47e6fa5bd880bc815444ae80c154985793ca6a 100644 (file)
@@ -269,3 +269,5 @@ string weaponorder_byimpulse;
 string weaponorder_bypriority;
 
 float nex_charge_movingavg;
+
+float serverflags;
index 4846a9fef572aab667fafb724778051d7c69f78c..d358a59a536db28ea46dd630f8c4e7b941264fe4 100644 (file)
@@ -1093,6 +1093,8 @@ void Ent_Init()
        nex_scope = !ReadByte();
        campingrifle_scope = !ReadByte();
 
+       serverflags = ReadByte();
+
        if(!postinit)
                PostInit();
 }
index 235b3aedf0a2eab8b1353e031756e07cc25a4334..119941ad2c017ace633f6089070b4bca09ffa093 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;
@@ -741,33 +742,30 @@ void CSQC_UpdateView(float w, float h)
                        string wcross_wep, wcross_name;
                        float wcross_scale, wcross_blur;
 
-                       wcross_color_x = cvar("crosshair_color_red");
-                       wcross_color_y = cvar("crosshair_color_green");
-                       wcross_color_z = cvar("crosshair_color_blue");
-                       if (cvar("crosshair_per_weapon")) {
+                       if (cvar("crosshair_per_weapon") || cvar("crosshair_color_per_weapon")) {
                                e = get_weaponinfo(activeweapon);
                                if (e && e.netname != "")
                                {
                                        wcross_wep = e.netname;
-                                       wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
-                                       if (wcross_resolution == 0)
-                                               return;
-                                       wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
-                                       if (wcross_alpha == 0)
-                                               return;
-
-                                       wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
-                                       if(wcross_style == "")
-                                               wcross_style = e.netname;
-
-                                       if(!cvar("crosshair_color_override"))
+                                       if(cvar("crosshair_per_weapon"))
                                        {
-                                               wcross_color_x = cvar(strcat("crosshair_", wcross_wep, "_color_red"));
-                                               wcross_color_y = cvar(strcat("crosshair_", wcross_wep, "_color_green"));
-                                               wcross_color_z = cvar(strcat("crosshair_", wcross_wep, "_color_blue"));
+                                               wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
+                                               if (wcross_resolution == 0)
+                                                       return;
+                                               wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_alpha"));
+                                               if (wcross_alpha == 0)
+                                                       return;
+
+                                               wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
+                                               if(wcross_style == "" || wcross_style == "0")
+                                                       wcross_style = wcross_wep;
                                        }
                                }
                        }
+                       if(wcross_wep != "" && cvar("crosshair_color_per_weapon"))
+                               wcross_color = stov(cvar_string(strcat("crosshair_", wcross_wep, "_color")));
+                       else
+                               wcross_color = stov(cvar_string("crosshair_color"));
 
                        wcross_name = strcat("gfx/crosshair", wcross_style);
 
@@ -1295,18 +1293,22 @@ void CSQC_common_hud(void)
                case HUD_NORMAL:
                        // do some accuracy var caching
                        float i;
-                       if(cvar_string("hud_panel_weapons_accuracy_color_levels") != acc_color_levels)
                        if(!(gametype == GAME_RACE || gametype == GAME_CTS))
                        {
-                               if(acc_color_levels)
-                                       strunzone(acc_color_levels);
-                               acc_color_levels = strzone(cvar_string("hud_panel_weapons_accuracy_color_levels"));
-                               acc_levels = tokenize(acc_color_levels);
-                               if (acc_levels > MAX_ACCURACY_LEVELS)
-                                       acc_levels = MAX_ACCURACY_LEVELS;
-
-                               for (i = 0; i < acc_levels; ++i)
-                                       acc_lev[i] = stof(argv(i));
+                               if(cvar_string("accuracy_color_levels") != acc_color_levels)
+                               {
+                                       if(acc_color_levels)
+                                               strunzone(acc_color_levels);
+                                       acc_color_levels = strzone(cvar_string("accuracy_color_levels"));
+                                       acc_levels = tokenize(acc_color_levels);
+                                       if (acc_levels > MAX_ACCURACY_LEVELS)
+                                               acc_levels = MAX_ACCURACY_LEVELS;
+
+                                       for (i = 0; i < acc_levels; ++i)
+                                               acc_lev[i] = stof(argv(i));
+                               }
+                               // let know that acc_col[] needs to be loaded
+                               acc_col_x[0] = -1;
                        }
 
                        HUD_Main(); // always run these functions for alpha checks
index ea0fcecedfa8ac2a716fe6c23f9012f07093571d..28340719323309f095a63751e6c9e423332151fa 100644 (file)
@@ -6,17 +6,12 @@ var float autocvar_cl_gibs_sloppy = 1;
 var float autocvar_cl_casings_ticrate = 0.1;
 var float autocvar_cl_casings_sloppy = 1;
 
-var float autocvar_cl_gentle;
-var float autocvar_cl_gentle_gibs;
-var float autocvar_cl_gentle_messages;
-
 var float autocvar_scoreboard_color_bg_team;
 
 var float autocvar__menu_alpha;
 
 var float autocvar__hud_configure;
 var float autocvar_hud_configure_teamcolorforced;
-var float autocvar_hud_configure_checkcollisions;
 var float autocvar_hud_configure_bg_minalpha;
 var float autocvar_hud_configure_grid;
 var float autocvar_hud_configure_grid_xsize;
@@ -26,19 +21,9 @@ var float autocvar_hud_configure_grid_alpha;
 var float autocvar__con_chat_maximized;
 var string autocvar__hud_panelorder;
 
-var string autocvar_hud_skin;
 var string autocvar_hud_dock;
-var string autocvar_hud_dock_color;
-var float autocvar_hud_dock_color_team;
-var float autocvar_hud_dock_alpha;
 
 var float autocvar_hud_progressbar_alpha;
-var vector autocvar_hud_progressbar_strength_color;
-var vector autocvar_hud_progressbar_shield_color;
-var vector autocvar_hud_progressbar_health_color;
-var vector autocvar_hud_progressbar_armor_color;
-var vector autocvar_hud_progressbar_fuel_color;
-var vector autocvar_hud_progressbar_nexball_color;
 
 var string autocvar_hud_panel_bg;
 var vector autocvar_hud_panel_bg_color;
@@ -49,189 +34,37 @@ var float autocvar_hud_panel_bg_padding;
 var float autocvar_hud_panel_fg_alpha;
 
 var float autocvar_hud_panel_weapons;
-var vector autocvar_hud_panel_weapons_pos;
-var vector autocvar_hud_panel_weapons_size;
-var string autocvar_hud_panel_weapons_bg;
-var string autocvar_hud_panel_weapons_bg_color;
-var string autocvar_hud_panel_weapons_bg_color_team;
-var string autocvar_hud_panel_weapons_bg_alpha;
-var string autocvar_hud_panel_weapons_bg_border;
-var string autocvar_hud_panel_weapons_bg_padding;
-var float autocvar_hud_panel_weapons_aspect;
-var float autocvar_hud_panel_weapons_accuracy;
-var float autocvar_hud_panel_weapons_ammo;
-var vector autocvar_hud_panel_weapons_ammo_color;
-var float autocvar_hud_panel_weapons_ammo_alpha;
-var float autocvar_hud_panel_weapons_ammo_full_shells;
-var float autocvar_hud_panel_weapons_ammo_full_nails;
-var float autocvar_hud_panel_weapons_ammo_full_rockets;
-var float autocvar_hud_panel_weapons_ammo_full_cells;
-var float autocvar_hud_panel_weapons_ammo_full_fuel;
-var float autocvar_hud_panel_weapons_label;
-var float autocvar_hud_panel_weapons_complainbubble;
-var float autocvar_hud_panel_weapons_complainbubble_padding;
-var float autocvar_hud_panel_weapons_complainbubble_time;
-var float autocvar_hud_panel_weapons_complainbubble_fadetime;
-var vector autocvar_hud_panel_weapons_complainbubble_color_outofammo;
-var vector autocvar_hud_panel_weapons_complainbubble_color_donthave;
-var vector autocvar_hud_panel_weapons_complainbubble_color_unavailable;
 
 var float autocvar_hud_panel_ammo;
-var vector autocvar_hud_panel_ammo_pos;
-var vector autocvar_hud_panel_ammo_size;
-var string autocvar_hud_panel_ammo_bg;
-var string autocvar_hud_panel_ammo_bg_color;
-var string autocvar_hud_panel_ammo_bg_color_team;
-var string autocvar_hud_panel_ammo_bg_alpha;
-var string autocvar_hud_panel_ammo_bg_border;
-var string autocvar_hud_panel_ammo_bg_padding;
 var float autocvar_hud_panel_ammo_onlycurrent;
 var float autocvar_hud_panel_ammo_iconalign;
 
 var float autocvar_hud_panel_powerups;
-var vector autocvar_hud_panel_powerups_pos;
-var vector autocvar_hud_panel_powerups_size;
-var string autocvar_hud_panel_powerups_bg;
-var string autocvar_hud_panel_powerups_bg_color;
-var string autocvar_hud_panel_powerups_bg_color_team;
-var string autocvar_hud_panel_powerups_bg_alpha;
-var string autocvar_hud_panel_powerups_bg_border;
-var string autocvar_hud_panel_powerups_bg_padding;
-var float autocvar_hud_panel_powerups_flip;
-var float autocvar_hud_panel_powerups_iconalign;
-var float autocvar_hud_panel_powerups_baralign;
-var float autocvar_hud_panel_powerups_progressbar;
 
 var float autocvar_hud_panel_healtharmor;
-var vector autocvar_hud_panel_healtharmor_pos;
-var vector autocvar_hud_panel_healtharmor_size;
-var string autocvar_hud_panel_healtharmor_bg;
-var string autocvar_hud_panel_healtharmor_bg_color;
-var string autocvar_hud_panel_healtharmor_bg_color_team;
-var string autocvar_hud_panel_healtharmor_bg_alpha;
-var string autocvar_hud_panel_healtharmor_bg_border;
-var string autocvar_hud_panel_healtharmor_bg_padding;
-var float autocvar_hud_panel_healtharmor_flip;
-var float autocvar_hud_panel_healtharmor_iconalign;
-var float autocvar_hud_panel_healtharmor_baralign;
-var float autocvar_hud_panel_healtharmor_progressbar;
 
 var float autocvar_hud_panel_notify;
-var vector autocvar_hud_panel_notify_pos;
-var vector autocvar_hud_panel_notify_size;
-var string autocvar_hud_panel_notify_bg;
-var string autocvar_hud_panel_notify_bg_color;
-var string autocvar_hud_panel_notify_bg_color_team;
-var string autocvar_hud_panel_notify_bg_alpha;
-var string autocvar_hud_panel_notify_bg_border;
-var string autocvar_hud_panel_notify_bg_padding;
-var float autocvar_hud_panel_notify_print;
-var float autocvar_hud_panel_notify_time;
-var float autocvar_hud_panel_notify_fadetime;
-var float autocvar_hud_panel_notify_flip;
 
 var float autocvar_hud_panel_timer;
-var vector autocvar_hud_panel_timer_pos;
-var vector autocvar_hud_panel_timer_size;
-var string autocvar_hud_panel_timer_bg;
-var string autocvar_hud_panel_timer_bg_color;
-var string autocvar_hud_panel_timer_bg_color_team;
-var string autocvar_hud_panel_timer_bg_alpha;
-var string autocvar_hud_panel_timer_bg_border;
-var string autocvar_hud_panel_timer_bg_padding;
 var float autocvar_hud_panel_timer_increment;
 
 var float autocvar_hud_panel_radar;
-var vector autocvar_hud_panel_radar_pos;
-var vector autocvar_hud_panel_radar_size;
-var string autocvar_hud_panel_radar_bg;
-var string autocvar_hud_panel_radar_bg_color;
-var string autocvar_hud_panel_radar_bg_color_team;
-var string autocvar_hud_panel_radar_bg_alpha;
-var string autocvar_hud_panel_radar_bg_border;
-var string autocvar_hud_panel_radar_bg_padding;
 
 var float autocvar_hud_panel_score;
-var vector autocvar_hud_panel_score_pos;
-var vector autocvar_hud_panel_score_size;
-var string autocvar_hud_panel_score_bg;
-var string autocvar_hud_panel_score_bg_color;
-var string autocvar_hud_panel_score_bg_color_team;
-var string autocvar_hud_panel_score_bg_alpha;
-var string autocvar_hud_panel_score_bg_border;
-var string autocvar_hud_panel_score_bg_padding;
 
 var float autocvar_hud_panel_racetimer;
-var vector autocvar_hud_panel_racetimer_pos;
-var vector autocvar_hud_panel_racetimer_size;
-var string autocvar_hud_panel_racetimer_bg;
-var string autocvar_hud_panel_racetimer_bg_color;
-var string autocvar_hud_panel_racetimer_bg_color_team;
-var string autocvar_hud_panel_racetimer_bg_alpha;
-var string autocvar_hud_panel_racetimer_bg_border;
-var string autocvar_hud_panel_racetimer_bg_padding;
 
 var float autocvar_hud_panel_vote;
-var vector autocvar_hud_panel_vote_pos;
-var vector autocvar_hud_panel_vote_size;
-var string autocvar_hud_panel_vote_bg;
-var string autocvar_hud_panel_vote_bg_color;
-var string autocvar_hud_panel_vote_bg_color_team;
-var string autocvar_hud_panel_vote_bg_alpha;
-var string autocvar_hud_panel_vote_bg_border;
-var string autocvar_hud_panel_vote_bg_padding;
-var float autocvar_hud_panel_vote_alreadyvoted_alpha;
 
 var float autocvar_hud_panel_modicons;
-var vector autocvar_hud_panel_modicons_pos;
-var vector autocvar_hud_panel_modicons_size;
-var string autocvar_hud_panel_modicons_bg;
-var string autocvar_hud_panel_modicons_bg_color;
-var string autocvar_hud_panel_modicons_bg_color_team;
-var string autocvar_hud_panel_modicons_bg_alpha;
-var string autocvar_hud_panel_modicons_bg_border;
-var string autocvar_hud_panel_modicons_bg_padding;
 
 var float autocvar_hud_panel_pressedkeys;
-var vector autocvar_hud_panel_pressedkeys_pos;
-var vector autocvar_hud_panel_pressedkeys_size;
-var string autocvar_hud_panel_pressedkeys_bg;
-var string autocvar_hud_panel_pressedkeys_bg_color;
-var string autocvar_hud_panel_pressedkeys_bg_color_team;
-var string autocvar_hud_panel_pressedkeys_bg_alpha;
-var string autocvar_hud_panel_pressedkeys_bg_border;
-var string autocvar_hud_panel_pressedkeys_bg_padding;
-var float autocvar_hud_panel_pressedkeys_aspect;
 
 var float autocvar_hud_panel_chat;
-var vector autocvar_hud_panel_chat_pos;
-var vector autocvar_hud_panel_chat_size;
-var string autocvar_hud_panel_chat_bg;
-var string autocvar_hud_panel_chat_bg_color;
-var string autocvar_hud_panel_chat_bg_color_team;
-var string autocvar_hud_panel_chat_bg_alpha;
-var string autocvar_hud_panel_chat_bg_border;
-var string autocvar_hud_panel_chat_bg_padding;
 
 var float autocvar_hud_panel_engineinfo;
-var vector autocvar_hud_panel_engineinfo_pos;
-var vector autocvar_hud_panel_engineinfo_size;
-var string autocvar_hud_panel_engineinfo_bg;
-var string autocvar_hud_panel_engineinfo_bg_color;
-var string autocvar_hud_panel_engineinfo_bg_color_team;
-var string autocvar_hud_panel_engineinfo_bg_alpha;
-var string autocvar_hud_panel_engineinfo_bg_border;
-var string autocvar_hud_panel_engineinfo_bg_padding;
 
 var float autocvar_hud_panel_infomessages;
-var vector autocvar_hud_panel_infomessages_pos;
-var vector autocvar_hud_panel_infomessages_size;
-var string autocvar_hud_panel_infomessages_bg;
-var string autocvar_hud_panel_infomessages_bg_color;
-var string autocvar_hud_panel_infomessages_bg_color_team;
-var string autocvar_hud_panel_infomessages_bg_alpha;
-var string autocvar_hud_panel_infomessages_bg_border;
-var string autocvar_hud_panel_infomessages_bg_padding;
 var float autocvar_hud_panel_infomessages_flip;
 
 var float autocvar_scoreboard_border_thickness;
index 86b970c1a1fa1cf8334b8134383e002d1416450d..6f6e143934e39897f721d562d9a7a2dc4e77fe3e 100644 (file)
@@ -153,14 +153,15 @@ void Ent_GibSplash(float isNew)
        org_z = ReadShort() * 4 + 2;
        vel = decompressShortVector(ReadShort());
 
-       if(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
+       float cl_gentle_gibs = cvar("cl_gentle_gibs");
+       if(cl_gentle_gibs || cvar("cl_gentle"))
                type |= 0x80; // set gentle bit
 
        if(type & 0x80)
        {
-               if(autocvar_cl_gentle_gibs == 2)
+               if(cl_gentle_gibs == 2)
                        gentle_prefix = "";
-               else if(autocvar_cl_gentle_gibs == 3) 
+               else if(cl_gentle_gibs == 3) 
                        gentle_prefix = "happy_";
                else
                        gentle_prefix = "morphed_";
@@ -171,7 +172,7 @@ void Ent_GibSplash(float isNew)
                gentle_prefix = "particlegibs_";
        }
 
-       if not(autocvar_cl_gentle_gibs || cvar("cl_gentle"))
+       if not(cl_gentle_gibs || cvar("cl_gentle"))
                amount *= 1 - cvar("cl_nogibs");
 
        if(cvar("ekg"))
index d6575102ab387e2db66032a1c861d8b622cc0ccc..f77f1c1c1af2b1009147f2f7a27978126c2fc580 100644 (file)
@@ -412,48 +412,55 @@ HUD panels
 ==================
 */
 
+#define HUD_Write(s) fputs(fh, s)
+// q: quoted, n: not quoted
+#define HUD_Write_Cvar_n(cvar) HUD_Write(strcat("seta ", cvar, " ", cvar_string(cvar), "\n"))
+#define HUD_Write_Cvar_q(cvar) HUD_Write(strcat("seta ", cvar, " \"", cvar_string(cvar), "\"\n"))
+#define HUD_Write_PanelCvar_n(cvar_suf) HUD_Write_Cvar_n(strcat("hud_panel_", panel_name, cvar_suf))
+#define HUD_Write_PanelCvar_q(cvar_suf) HUD_Write_Cvar_q(strcat("hud_panel_", panel_name, cvar_suf))
 // Save the config
 void HUD_Panel_ExportCfg(string cfgname)
 {
        float fh;
-       fh = fopen(strcat("hud_", autocvar_hud_skin, "_", cfgname, ".cfg"), FILE_WRITE);
+       string filename = strcat("hud_", cvar_string("hud_skin"), "_", cfgname, ".cfg");
+       fh = fopen(filename, FILE_WRITE);
        if(fh >= 0)
        {
-               fputs(fh, strcat("seta hud_skin \"", cvar_string("hud_skin"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_panel_bg \"", cvar_string("hud_panel_bg"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_panel_bg_color \"", cvar_string("hud_panel_bg_color"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_panel_bg_color_team \"", cvar_string("hud_panel_bg_color_team"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_panel_bg_alpha \"", cvar_string("hud_panel_bg_alpha"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_panel_bg_border \"", cvar_string("hud_panel_bg_border"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_panel_bg_padding \"", cvar_string("hud_panel_bg_padding"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_panel_fg_alpha \"", cvar_string("hud_panel_fg_alpha"), "\"", "\n"));
-               fputs(fh, "\n");
-
-               fputs(fh, strcat("seta hud_dock \"", cvar_string("hud_dock"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_dock_color \"", cvar_string("hud_dock_color"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_dock_color_team \"", cvar_string("hud_dock_color_team"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_dock_alpha \"", cvar_string("hud_dock_alpha"), "\"", "\n"));
-               fputs(fh, "\n");
-
-               fputs(fh, strcat("seta hud_progressbar_alpha \"", cvar_string("hud_progressbar_alpha"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_progressbar_strength_color \"", cvar_string("hud_progressbar_strength_color"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_progressbar_shield_color \"", cvar_string("hud_progressbar_shield_color"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_progressbar_health_color \"", cvar_string("hud_progressbar_health_color"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_progressbar_armor_color \"", cvar_string("hud_progressbar_armor_color"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_progressbar_fuel_color \"", cvar_string("hud_progressbar_fuel_color"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_progressbar_nexball_color \"", cvar_string("hud_progressbar_nexball_color"), "\"", "\n"));
-               fputs(fh, "\n");
-
-               fputs(fh, strcat("seta _hud_panelorder \"", cvar_string("_hud_panelorder"), "\"", "\n"));
-               fputs(fh, "\n");
-
-               fputs(fh, strcat("seta hud_configure_grid \"", cvar_string("hud_configure_grid"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_configure_grid_xsize \"", cvar_string("hud_configure_grid_xsize"), "\"", "\n"));
-               fputs(fh, strcat("seta hud_configure_grid_ysize \"", cvar_string("hud_configure_grid_ysize"), "\"", "\n"));
-               fputs(fh, "\n");
-
-               fputs(fh, strcat("seta scr_centerpos \"", cvar_string("scr_centerpos"), "\"", "\n"));
-               fputs(fh, "\n");
+               HUD_Write_Cvar_q("hud_skin");
+               HUD_Write_Cvar_q("hud_panel_bg");
+               HUD_Write_Cvar_q("hud_panel_bg_color");
+               HUD_Write_Cvar_q("hud_panel_bg_color_team");
+               HUD_Write_Cvar_q("hud_panel_bg_alpha");
+               HUD_Write_Cvar_q("hud_panel_bg_border");
+               HUD_Write_Cvar_q("hud_panel_bg_padding");
+               HUD_Write_Cvar_q("hud_panel_fg_alpha");
+               HUD_Write("\n");
+
+               HUD_Write_Cvar_q("hud_dock");
+               HUD_Write_Cvar_q("hud_dock_color");
+               HUD_Write_Cvar_q("hud_dock_color_team");
+               HUD_Write_Cvar_q("hud_dock_alpha");
+               HUD_Write("\n");
+
+               HUD_Write_Cvar_q("hud_progressbar_alpha");
+               HUD_Write_Cvar_q("hud_progressbar_strength_color");
+               HUD_Write_Cvar_q("hud_progressbar_shield_color");
+               HUD_Write_Cvar_q("hud_progressbar_health_color");
+               HUD_Write_Cvar_q("hud_progressbar_armor_color");
+               HUD_Write_Cvar_q("hud_progressbar_fuel_color");
+               HUD_Write_Cvar_q("hud_progressbar_nexball_color");
+               HUD_Write("\n");
+
+               HUD_Write_Cvar_q("_hud_panelorder");
+               HUD_Write("\n");
+
+               HUD_Write_Cvar_q("hud_configure_grid");
+               HUD_Write_Cvar_q("hud_configure_grid_xsize");
+               HUD_Write_Cvar_q("hud_configure_grid_ysize");
+               HUD_Write("\n");
+
+               HUD_Write_Cvar_q("scr_centerpos");
+               HUD_Write("\n");
 
                // common cvars for all panels
                float i;
@@ -461,66 +468,68 @@ void HUD_Panel_ExportCfg(string cfgname)
                {
                        HUD_Panel_GetName(i);
 
-                       fputs(fh, strcat("seta hud_panel_", panel_name, " ", cvar_string(strcat("hud_panel_", panel_name)), "\n"));
-                       fputs(fh, strcat("seta hud_panel_", panel_name, "_pos \"", cvar_string(strcat("hud_panel_", panel_name, "_pos")), "\"", "\n"));
-                       fputs(fh, strcat("seta hud_panel_", panel_name, "_size \"", cvar_string(strcat("hud_panel_", panel_name, "_size")), "\"", "\n"));
-                       fputs(fh, strcat("seta hud_panel_", panel_name, "_bg \"", cvar_string(strcat("hud_panel_", panel_name, "_bg")), "\"", "\n"));
-                       fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_color \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_color")), "\"", "\n"));
-                       fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_color_team \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_color_team")), "\"", "\n"));
-                       fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_alpha")), "\"", "\n"));
-                       fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_border \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_border")), "\"", "\n"));
-                       fputs(fh, strcat("seta hud_panel_", panel_name, "_bg_padding \"", cvar_string(strcat("hud_panel_", panel_name, "_bg_padding")), "\"", "\n"));
+                       HUD_Write_PanelCvar_n("");
+                       HUD_Write_PanelCvar_q("_pos");
+                       HUD_Write_PanelCvar_q("_size");
+                       HUD_Write_PanelCvar_q("_bg");
+                       HUD_Write_PanelCvar_q("_bg_color");
+                       HUD_Write_PanelCvar_q("_bg_color_team");
+                       HUD_Write_PanelCvar_q("_bg_alpha");
+                       HUD_Write_PanelCvar_q("_bg_border");
+                       HUD_Write_PanelCvar_q("_bg_padding");
                        switch(i) {
                                case HUD_PANEL_WEAPONS:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_padding \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_padding")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_outofammo \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_outofammo")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_donthave \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_donthave")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_complainbubble_color_unavailable \"", cvar_string(strcat("hud_panel_", panel_name, "_complainbubble_color_unavailable")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_ammo_color \"", cvar_string(strcat("hud_panel_", panel_name, "_ammo_color")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_ammo_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_ammo_alpha")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_aspect \"", cvar_string(strcat("hud_panel_", panel_name, "_aspect")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_complainbubble");
+                                       HUD_Write_PanelCvar_q("_complainbubble_padding");
+                                       HUD_Write_PanelCvar_q("_complainbubble_color_outofammo");
+                                       HUD_Write_PanelCvar_q("_complainbubble_color_donthave");
+                                       HUD_Write_PanelCvar_q("_complainbubble_color_unavailable");
+                                       HUD_Write_PanelCvar_q("_ammo_color");
+                                       HUD_Write_PanelCvar_q("_ammo_alpha");
+                                       HUD_Write_PanelCvar_q("_aspect");
                                        break;
                                case HUD_PANEL_AMMO:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_onlycurrent \"", cvar_string(strcat("hud_panel_", panel_name, "_onlycurrent")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_onlycurrent");
+                                       HUD_Write_PanelCvar_q("_iconalign");
                                        break;
                                case HUD_PANEL_POWERUPS:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_baralign \"", cvar_string(strcat("hud_panel_", panel_name, "_baralign")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_progressbar \"", cvar_string(strcat("hud_panel_", panel_name, "_progressbar")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_flip");
+                                       HUD_Write_PanelCvar_q("_iconalign");
+                                       HUD_Write_PanelCvar_q("_baralign");
+                                       HUD_Write_PanelCvar_q("_progressbar");
                                        break;
                                case HUD_PANEL_HEALTHARMOR:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_iconalign \"", cvar_string(strcat("hud_panel_", panel_name, "_iconalign")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_baralign \"", cvar_string(strcat("hud_panel_", panel_name, "_baralign")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_progressbar \"", cvar_string(strcat("hud_panel_", panel_name, "_progressbar")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_flip");
+                                       HUD_Write_PanelCvar_q("_iconalign");
+                                       HUD_Write_PanelCvar_q("_baralign");
+                                       HUD_Write_PanelCvar_q("_progressbar");
                                        break;
                                case HUD_PANEL_NOTIFY:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_print \"", cvar_string(strcat("hud_panel_", panel_name, "_print")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_flip");
+                                       HUD_Write_PanelCvar_q("_print");
                                        break;
                                case HUD_PANEL_RADAR:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_foreground_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_foreground_alpha")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_foreground_alpha");
                                        break;
                                case HUD_PANEL_VOTE:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_alreadyvoted_alpha \"", cvar_string(strcat("hud_panel_", panel_name, "_alreadyvoted_alpha")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_alreadyvoted_alpha");
                                        break;
                                case HUD_PANEL_PRESSEDKEYS:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_aspect \"", cvar_string(strcat("hud_panel_", panel_name, "_aspect")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_aspect");
                                        break;
                                case HUD_PANEL_INFOMESSAGES:
-                                       fputs(fh, strcat("seta hud_panel_", panel_name, "_flip \"", cvar_string(strcat("hud_panel_", panel_name, "_flip")), "\"", "\n"));
+                                       HUD_Write_PanelCvar_q("_flip");
                                        break;
                        }
-                       fputs(fh, "\n");
+                       HUD_Write("\n");
                }
-               fputs(fh, strcat("menu_sync", "\n")); // force the menu to reread the cvars, so that the dialogs are updated
+               HUD_Write("menu_sync\n"); // force the menu to reread the cvars, so that the dialogs are updated
 
-               print("^2Successfully exported to hud_", autocvar_hud_skin, "_", cfgname, ".cfg! (Note: It's saved in data/data/)\n");
+               print("^2Successfully exported to ", filename, "! (Note: It's saved in data/data/)\n");
+               fclose(fh);
        }
-       fclose(fh);
+       else
+               print("^1Couldn't write to ", filename, "\n");
 }
 
 const float hlBorderSize = 4;
@@ -656,8 +665,8 @@ vector HUD_Panel_CheckMove(vector myPos, vector mySize)
                        else // push it downwards
                                myTarget_y = panel_pos_y + panel_size_y;
                }
-               if(cvar("hud_configure_checkcollisions_debug"))
-                       drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
+               //if(cvar("hud_configure_checkcollisions_debug"))
+                       //drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
        }
 
        return myTarget;
@@ -669,8 +678,8 @@ void HUD_Panel_SetPos(vector pos)
        vector mySize;
        mySize = panel_size;
 
-       if(cvar("hud_configure_checkcollisions_debug"))
-               drawfill(pos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
+       //if(cvar("hud_configure_checkcollisions_debug"))
+               //drawfill(pos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
 
        if(autocvar_hud_configure_grid)
        {
@@ -795,8 +804,8 @@ vector HUD_Panel_CheckResize(vector mySize, vector resizeorigin) {
                        else
                                mySize_y = min(mySize_y, dist_y);
                }
-               if(cvar("hud_configure_checkcollisions_debug"))
-                       drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
+               //if(cvar("hud_configure_checkcollisions_debug"))
+                       //drawfill(panel_pos, panel_size, '1 1 0', .3, DRAWFLAG_NORMAL);
        }
 
        return mySize;
@@ -849,8 +858,8 @@ void HUD_Panel_SetPosSize(vector mySize)
        if(myPos_y + mySize_y > vid_conheight)
                mySize_y = vid_conheight - myPos_y;
 
-       if(cvar("hud_configure_checkcollisions_debug"))
-               drawfill(myPos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
+       //if(cvar("hud_configure_checkcollisions_debug"))
+               //drawfill(myPos, mySize, '1 1 1', .2, DRAWFLAG_NORMAL);
 
        // before checkresize, otherwise panel can be snapped partially inside another panel or panel aspect ratio can be broken
        if(autocvar_hud_configure_grid)
@@ -881,8 +890,8 @@ void HUD_Panel_SetPosSize(vector mySize)
                myPos_y = resizeorigin_y;
        }
 
-       if(cvar("hud_configure_checkcollisions_debug"))
-               drawfill(myPos, mySize, '0 1 0', .3, DRAWFLAG_NORMAL);
+       //if(cvar("hud_configure_checkcollisions_debug"))
+               //drawfill(myPos, mySize, '0 1 0', .3, DRAWFLAG_NORMAL);
 
        HUD_Panel_GetName(highlightedPanel);
        string s;
@@ -1356,7 +1365,7 @@ void HUD_Panel_Mouse()
 
                if (prev_pos != panel_pos || prev_size != panel_size)
                {
-                       hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && autocvar_hud_configure_checkcollisions);
+                       hud_configure_checkcollisions = (!(hudShiftState & S_CTRL) && cvar("hud_configure_checkcollisions"));
                        // backup!
                        panel_pos_backup = prev_pos;
                        panel_size_backup = prev_size;
@@ -1580,7 +1589,7 @@ void HUD_Weapons(void)
                }
        }
 
-       float i, weapid, fade, weapon_stats, weapon_number, weapon_cnt;
+       float i, weapid, wpnalpha, weapon_cnt;
        weapon_cnt = 0;
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
@@ -1623,57 +1632,96 @@ void HUD_Weapons(void)
                panel_size -= '2 2 0' * panel_bg_padding;
        }
 
-       // hits
-       weapon_stats = getstati(STAT_DAMAGE_HITS);
-       weapon_number = weapon_stats & 63;
-       weapon_hits[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
-       // fired
-       weapon_stats = getstati(STAT_DAMAGE_FIRED);
-       weapon_number = weapon_stats & 63;
-       weapon_fired[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
-
        if(cvar_or("hud_panel_weapons_fade", 1))
        {
-               fade = 3.2 - 2 * (time - weapontime);
-               fade = bound(0.7, fade, 1);
+               wpnalpha = 3.2 - 2 * (time - weapontime);
+               wpnalpha = bound(0.7, wpnalpha, 1) * panel_fg_alpha;
        }
        else
-               fade = 1;
+               wpnalpha = panel_fg_alpha;
 
        HUD_Weapons_Clear();
 
        float rows, columns;
+       float aspect = cvar("hud_panel_weapons_aspect");
        rows = panel_size_y/panel_size_x;
-       rows = bound(1, floor((sqrt(4 * autocvar_hud_panel_weapons_aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
+       rows = bound(1, floor((sqrt(4 * aspect * rows * WEP_COUNT + rows * rows) + rows + 0.5) / 2), WEP_COUNT);
 
        columns = ceil(WEP_COUNT/rows);
        float row, column;
 
        float a, type, fullammo;
        float when;
-       when = autocvar_hud_panel_weapons_complainbubble_time;
+       when = cvar("hud_panel_weapons_complainbubble_time");
        float fadetime;
-       fadetime = autocvar_hud_panel_weapons_complainbubble_fadetime;
+       fadetime = cvar("hud_panel_weapons_complainbubble_fadetime");
 
        vector color;
        vector wpnpos;
        vector wpnsize;
+       
+       float fullammo_shells, fullammo_nails, fullammo_rockets, fullammo_cells, fullammo_fuel;
+       vector ammo_color;
+       float ammo_alpha;
+       wpnsize = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
+       float barsize_x, barsize_y, baroffset_x, baroffset_y;
+       float show_ammo = cvar("hud_panel_weapons_ammo");
+       if (show_ammo)
+       {
+               fullammo_shells = cvar("hud_panel_weapons_ammo_full_shells");
+               fullammo_nails = cvar("hud_panel_weapons_ammo_full_nails");
+               fullammo_rockets = cvar("hud_panel_weapons_ammo_full_rockets");
+               fullammo_cells = cvar("hud_panel_weapons_ammo_full_cells");
+               fullammo_fuel = cvar("hud_panel_weapons_ammo_full_fuel");
+               ammo_color = stov(cvar_string("hud_panel_weapons_ammo_color"));
+               ammo_alpha = panel_fg_alpha * cvar("hud_panel_weapons_ammo_alpha");
+
+
+               if(wpnsize_x/wpnsize_y > aspect)
+               {
+                       barsize_x = aspect * wpnsize_y;
+                       barsize_y = wpnsize_y;
+                       baroffset_x = (wpnsize_x - barsize_x) / 2;
+               }
+               else
+               {
+                       barsize_y = 1/aspect * wpnsize_x;
+                       barsize_x = wpnsize_x;
+                       baroffset_y = (wpnsize_y - barsize_y) / 2;
+               }
+       }
 
        float show_accuracy;
-       if(autocvar_hud_panel_weapons_accuracy && acc_levels)
+       float weapon_stats, weapon_number;
+       if(cvar("hud_panel_weapons_accuracy") && acc_levels)
+       {
                show_accuracy = true;
+               // hits
+               weapon_stats = getstati(STAT_DAMAGE_HITS);
+               weapon_number = weapon_stats & 63;
+               weapon_hits[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
+               // fired
+               weapon_stats = getstati(STAT_DAMAGE_FIRED);
+               weapon_number = weapon_stats & 63;
+               weapon_fired[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
+               if (acc_col_x[0] == -1)
+                       for (i = 0; i < acc_levels; ++i)
+                               acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
+       }
+
+       float weapons_st = getstati(STAT_WEAPONS);
+       float label = cvar("hud_panel_weapons_label");
 
        for(i = 0; i < weapon_cnt; ++i)
        {
-               wpnpos = panel_pos + eX * column * panel_size_x*(1/columns) + eY * row * panel_size_y*(1/rows);
-               wpnsize = eX * panel_size_x*(1/columns) + eY * panel_size_y*(1/rows);
+               wpnpos = panel_pos + eX * column * wpnsize_x + eY * row * wpnsize_y;
 
                self = weaponorder[i];
                weapid = self.impulse;
 
                // draw background behind currently selected weapon
                if(self.weapon == activeweapon)
-                       drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawpic_aspect_skin(wpnpos, "weapon_current_bg", wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL);
 
                // draw the weapon accuracy
                if(show_accuracy)
@@ -1684,36 +1732,35 @@ void HUD_Weapons(void)
                        {
                                weapon_hit = weapon_hits[self.weapon-WEP_FIRST];
                                weapon_stats = floor(100 * weapon_hit / weapon_damage);
-                       }
 
-                       // find the max level lower than weapon_stats
-                       float j;
-                       j = acc_levels-1;
-                       while ( j && weapon_stats < acc_lev[j] )
-                               --j;
+                               // find the max level lower than weapon_stats
+                               float j;
+                               j = acc_levels-1;
+                               while ( j && weapon_stats < acc_lev[j] )
+                                       --j;
 
-                       // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
-                       float factor;
-                       factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
-                       color = acc_color(j);
-                       color = color + factor * (acc_color(j+1) - color);
+                               // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
+                               float factor;
+                               factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
+                               color = acc_col[j];
+                               color = color + factor * (acc_col[j+1] - color);
 
-                       if(weapon_damage)
                                drawpic_aspect_skin(wpnpos, "weapon_accuracy", wpnsize, color, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       }
                }
 
                // draw the weapon icon
-               if((self.impulse >= 0) && (getstati(STAT_WEAPONS) & self.weapons))
+               if((weapid >= 0) && (weapons_st & self.weapons))
                {
-                       drawpic_aspect_skin(wpnpos, strcat("weapon", self.netname), wpnsize, '1 1 1', fade * panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawpic_aspect_skin(wpnpos, strcat("weapon", self.netname), wpnsize, '1 1 1', wpnalpha, DRAWFLAG_NORMAL);
 
-                       if(autocvar_hud_panel_weapons_label == 1) // weapon number
-                               drawstring(wpnpos, ftos(weapid), '1 1 0' * 0.5 * panel_size_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
-                       else if(autocvar_hud_panel_weapons_label == 2) // bind
-                               drawstring(wpnpos, getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * panel_size_y*(1/rows), '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                       if(label == 1) // weapon number
+                               drawstring(wpnpos, ftos(weapid), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+                       else if(label == 2) // bind
+                               drawstring(wpnpos, getcommandkey(ftos(weapid), strcat("impulse ", ftos(weapid))), '1 1 0' * 0.5 * wpnsize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
                        // draw ammo status bar
-                       if(autocvar_hud_panel_weapons_ammo && weapid != WEP_TUBA && weapid != WEP_LASER && weapid != WEP_PORTO)
+                       if(show_ammo && weapid != WEP_TUBA && weapid != WEP_LASER && weapid != WEP_PORTO)
                        {
                                a = 0;
                                type = GetAmmoTypeForWep(weapid);
@@ -1723,38 +1770,20 @@ void HUD_Weapons(void)
                                if(a > 0)
                                {
                                        switch(type) {
-                                               case 0: fullammo = autocvar_hud_panel_weapons_ammo_full_shells; break;
-                                               case 1: fullammo = autocvar_hud_panel_weapons_ammo_full_nails; break;
-                                               case 2: fullammo = autocvar_hud_panel_weapons_ammo_full_rockets; break;
-                                               case 3: fullammo = autocvar_hud_panel_weapons_ammo_full_cells; break;
-                                               case 4: fullammo = autocvar_hud_panel_weapons_ammo_full_fuel; break;
+                                               case 0: fullammo = fullammo_shells; break;
+                                               case 1: fullammo = fullammo_nails; break;
+                                               case 2: fullammo = fullammo_rockets; break;
+                                               case 3: fullammo = fullammo_cells; break;
+                                               case 4: fullammo = fullammo_fuel; break;
                                                default: fullammo = 60;
                                        }
 
-                                       float barsize_x, barsize_y, barpos_x, barpos_y;
-                                       if(wpnsize_x/wpnsize_y > autocvar_hud_panel_weapons_aspect)
-                                       {
-                                               barsize_x = autocvar_hud_panel_weapons_aspect * wpnsize_y;
-                                               barsize_y = wpnsize_y;
-
-                                               barpos_x = wpnpos_x + (wpnsize_x - barsize_x) / 2;
-                                               barpos_y = wpnpos_y;
-                                       }
-                                       else
-                                       {
-                                               barsize_y = 1/autocvar_hud_panel_weapons_aspect * wpnsize_x;
-                                               barsize_x = wpnsize_x;
-
-                                               barpos_y = wpnpos_y + (wpnsize_y - barsize_y) / 2;
-                                               barpos_x = wpnpos_x;
-                                       }
-
                                        drawsetcliparea(
-                                               barpos_x,
-                                               barpos_y,
+                                               wpnpos_x + baroffset_x,
+                                               wpnpos_y + baroffset_y,
                                                barsize_x * bound(0, a/fullammo, 1),
                                                barsize_y);
-                                       drawpic_aspect_skin(wpnpos, "weapon_ammo", wpnsize, autocvar_hud_panel_weapons_ammo_color, panel_fg_alpha * autocvar_hud_panel_weapons_ammo_alpha, DRAWFLAG_NORMAL);
+                                       drawpic_aspect_skin(wpnpos, "weapon_ammo", wpnsize, ammo_color, ammo_alpha, DRAWFLAG_NORMAL);
                                        drawresetcliparea();
                                }
                        }
@@ -1767,7 +1796,7 @@ void HUD_Weapons(void)
                }
 
                // draw the complain message
-               if(time - complain_weapon_time < when + fadetime && self.weapon == complain_weapon && autocvar_hud_panel_weapons_complainbubble)
+               if(time - complain_weapon_time < when + fadetime && self.weapon == complain_weapon && cvar("hud_panel_weapons_complainbubble"))
                {
                        if(fadetime)
                        {
@@ -1787,18 +1816,19 @@ void HUD_Weapons(void)
                        string s;
                        if(complain_weapon_type == 0) {
                                s = "Out of ammo";
-                               color = autocvar_hud_panel_weapons_complainbubble_color_outofammo;
+                               color = stov(cvar_string("hud_panel_weapons_complainbubble_color_outofammo"));
                        }
                        else if(complain_weapon_type == 1) {
                                s = "Don't have";
-                               color = autocvar_hud_panel_weapons_complainbubble_color_donthave;
+                               color = stov(cvar_string("hud_panel_weapons_complainbubble_color_donthave"));
                        }
                        else {
                                s = "Unavailable";
-                               color = autocvar_hud_panel_weapons_complainbubble_color_unavailable;
+                               color = stov(cvar_string("hud_panel_weapons_complainbubble_color_unavailable"));
                        }
-                       drawpic_aspect_skin(wpnpos + '1 1 0' * autocvar_hud_panel_weapons_complainbubble_padding, "weapon_complainbubble", wpnsize - '2 2 0' * autocvar_hud_panel_weapons_complainbubble_padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
-                       drawstring_aspect(wpnpos + '1 1 0' * autocvar_hud_panel_weapons_complainbubble_padding, s, wpnsize - '2 2 0' * autocvar_hud_panel_weapons_complainbubble_padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
+                       float padding = cvar("hud_panel_weapons_complainbubble_padding");
+                       drawpic_aspect_skin(wpnpos + '1 1 0' * padding, "weapon_complainbubble", wpnsize - '2 2 0' * padding, color, a * panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawstring_aspect(wpnpos + '1 1 0' * padding, s, wpnsize - '2 2 0' * padding, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                }
 
                ++row;
@@ -1843,9 +1873,13 @@ string GetAmmoPicture(float i)
 void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_selected)
 {
        float a;
-       a = getstati(GetAmmoStat(itemcode)); // how much ammo do we have of type itemcode?
        if(autocvar__hud_configure)
+       {
+               currently_selected = (itemcode == 2); //rockets always selected
                a = 100;
+       }
+       else
+               a = getstati(GetAmmoStat(itemcode)); // how much ammo do we have of type itemcode?
 
        vector color;
        if(a < 10)
@@ -1859,49 +1893,29 @@ void DrawAmmoItem(vector myPos, vector mySize, float itemcode, float currently_s
        else
                alpha = 0.7;
 
-       vector newSize, newPos;
-       if(mySize_x/mySize_y > 3)
-       {
-               newSize_x = 3 * mySize_y;
-               newSize_y = mySize_y;
-
-               newPos_x = myPos_x + (mySize_x - newSize_x) / 2;
-               newPos_y = myPos_y;
-       }
-       else
-       {
-               newSize_y = 1/3 * mySize_x;
-               newSize_x = mySize_x;
-
-               newPos_y = myPos_y + (mySize_y - newSize_y) / 2;
-               newPos_x = myPos_x;
-       }
-
        vector picpos, numpos;
        if(autocvar_hud_panel_ammo_iconalign)
        {
-               numpos = newPos;
-               picpos = newPos + eX * 2 * newSize_y;
+               numpos = myPos;
+               picpos = myPos + eX * 2 * mySize_y;
        }
        else
        {
-               numpos = newPos + eX * newSize_y;
-               picpos = newPos;
+               numpos = myPos + eX * mySize_y;
+               picpos = myPos;
        }
 
        if (currently_selected)
-               drawpic_aspect_skin(newPos, "ammo_current_bg", newSize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(myPos, "ammo_current_bg", mySize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 
-       drawfont = hud_bigfont;
        if(a > 0)
-               drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+               drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, color, panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
        else // "ghost" ammo count
-               drawstring_aspect(numpos, ftos(a), eX * (2/3) * newSize_x + eY * newSize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
-       drawfont = hud_font;
+               drawstring_aspect(numpos, ftos(a), eX * (2/3) * mySize_x + eY * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
        if(a > 0)
-               drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * newSize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * mySize_y, '1 1 1', panel_fg_alpha * alpha, DRAWFLAG_NORMAL);
        else // "ghost" ammo icon
-               drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * newSize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
+               drawpic_aspect_skin(picpos, GetAmmoPicture(itemcode), '1 1 0' * mySize_y, '0 0 0', panel_fg_alpha * alpha * 0.5, DRAWFLAG_NORMAL);
 }
 
 void HUD_Ammo(void)
@@ -1911,8 +1925,6 @@ void HUD_Ammo(void)
 
        active_panel = HUD_PANEL_AMMO;
        HUD_Panel_UpdateCvars(ammo);
-       float i, currently_selected;
-
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -1924,35 +1936,71 @@ void HUD_Ammo(void)
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       float rows, columns;
-       rows = mySize_y/mySize_x;
-       rows = bound(1, floor((sqrt(4 * (3/1) * rows * AMMO_COUNT + rows * rows) + rows + 0.5) / 2), AMMO_COUNT);
-       //                               ^^^ ammo item aspect goes here
+       float rows, columns, row, column;
+       vector ammo_size;
+       if (autocvar_hud_panel_ammo_onlycurrent)
+               ammo_size = mySize;
+       else
+       {
+               rows = mySize_y/mySize_x;
+               rows = bound(1, floor((sqrt(4 * (3/1) * rows * AMMO_COUNT + rows * rows) + rows + 0.5) / 2), AMMO_COUNT);
+               //                               ^^^ ammo item aspect goes here
 
-       columns = ceil(AMMO_COUNT/rows);
+               columns = ceil(AMMO_COUNT/rows);
 
-       float row, column;
-       // ammo
-       for (i = 0; i < AMMO_COUNT; ++i) {
-               currently_selected = getstati(STAT_ITEMS) & GetAmmoItemCode(i);
-               if(autocvar_hud_panel_ammo_onlycurrent) {
-                       if(autocvar__hud_configure)
-                               i = 2;
-                       if (currently_selected || autocvar__hud_configure)
-                       {
-                               DrawAmmoItem(pos, mySize, i, currently_selected);
-                               break;
-                       }
-               } else {
-                       DrawAmmoItem(pos + eX * column * mySize_x*(1/columns) + eY * row * mySize_y*(1/rows), eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows), i, currently_selected);
-                       ++row;
-                       if(row >= rows)
+               ammo_size = eX * mySize_x*(1/columns) + eY * mySize_y*(1/rows);
+       }
+
+       vector offset;
+       float newSize;
+       if(ammo_size_x/ammo_size_y > 3)
+       {
+               newSize = 3 * ammo_size_y;
+               offset_x = ammo_size_x - newSize;
+               pos_x += offset_x/2;
+               ammo_size_x = newSize;
+       }
+       else
+       {
+               newSize = 1/3 * ammo_size_x;
+               offset_y = ammo_size_y - newSize;
+               pos_y += offset_y/2;
+               ammo_size_y = newSize;
+       }
+
+       drawfont = hud_bigfont;
+       float i, stat_items, currently_selected;
+       if (autocvar_hud_panel_ammo_onlycurrent)
+       {
+               if(autocvar__hud_configure)
+               {
+                       DrawAmmoItem(pos, ammo_size, 2, true); //show rockets
+                       return;
+               }
+               stat_items = getstati(STAT_ITEMS);
+               for (i = 0; i < AMMO_COUNT; ++i) {
+                       currently_selected = stat_items & GetAmmoItemCode(i);
+                       if (currently_selected)
                        {
-                               row = 0;
-                               column = column + 1;
+                               DrawAmmoItem(pos, ammo_size, i, true);
+                               return;
                        }
                }
+               return; // nothing to display
        }
+
+       stat_items = getstati(STAT_ITEMS);
+       for (i = 0; i < AMMO_COUNT; ++i) {
+               currently_selected = stat_items & GetAmmoItemCode(i);
+               DrawAmmoItem(pos + eX * column * (ammo_size_x + offset_x) + eY * row * (ammo_size_y + offset_y), ammo_size, i, currently_selected);
+               ++row;
+               if(row >= rows)
+               {
+                       row = 0;
+                       column = column + 1;
+               }
+       }
+       drawfont = hud_font;
 }
 
 void DrawNumIcon(float iconalign, vector myPos, vector mySize, float x, string icon, float left, vector color, float alpha)
@@ -2024,21 +2072,17 @@ void HUD_Powerups(void) {
        if(!autocvar_hud_panel_powerups && !autocvar__hud_configure)
                return;
 
-       active_panel = HUD_PANEL_POWERUPS;
-       HUD_Panel_UpdateCvars(powerups);
-       float stat_items;
-       stat_items = getstati(STAT_ITEMS);
-
        if(!autocvar__hud_configure)
        {
-               if not(stat_items & IT_STRENGTH)
-                       if not(stat_items & IT_INVINCIBLE)
-                               return;
+               if not(getstati(STAT_ITEMS) & (IT_STRENGTH | IT_INVINCIBLE))
+                       return;
 
                if (getstati(STAT_HEALTH) <= 0)
                        return;
        }
 
+       active_panel = HUD_PANEL_POWERUPS;
+       HUD_Panel_UpdateCvars(powerups);
        vector pos, mySize;
        pos = panel_pos;
        mySize = panel_size;
@@ -2069,7 +2113,8 @@ void HUD_Powerups(void) {
        string leftname, rightname;
        float leftcnt, rightcnt;
        float leftexact, rightexact;
-       if (autocvar_hud_panel_powerups_flip) {
+       float flip = cvar("hud_panel_powerups_flip");
+       if (flip) {
                leftname = "strength";
                leftcnt = ceil(strength_time);
                leftexact = strength_time;
@@ -2088,11 +2133,14 @@ void HUD_Powerups(void) {
        }
 
        drawfont = hud_bigfont;
+       float baralign = cvar("hud_panel_powerups_baralign");
+       float iconalign = cvar("hud_panel_powerups_iconalign");
+       float progressbar = cvar("hud_panel_powerups_progressbar");
        if (mySize_x/mySize_y > 4)
        {
                if(leftcnt)
                {
-                       if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // right align
+                       if(baralign == 1 || baralign == 3) { // right align
                                barpos = pos + eX * 0.5 * mySize_x - eX * 0.5 * mySize_x * min(1, leftcnt/30);
                                barsize = eX * 0.5 * mySize_x * min(1, leftcnt/30) + eY * mySize_y;
                        } else { // left align
@@ -2100,20 +2148,20 @@ void HUD_Powerups(void) {
                                barsize = eX * 0.5 * mySize_x * min(1, leftcnt/30) + eY * mySize_y;
                        }
 
-                       if(autocvar_hud_panel_powerups_progressbar)
+                       if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColorForString(leftname);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
                        if(leftcnt > 1)
-                               DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
+                               DrawNumIcon(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
                        if(leftcnt <= 5)
-                               DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
+                               DrawNumIcon_expanding(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
                }
 
                if(rightcnt)
                {
-                       if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // left align
+                       if(baralign == 0 || baralign == 3) { // left align
                                barpos = pos + eX * 0.5 * mySize_x;
                                barsize = eX * 0.5 * mySize_x * min(1, rightcnt/30) + eY * mySize_y;
                        } else { // right align
@@ -2121,22 +2169,22 @@ void HUD_Powerups(void) {
                                barsize = eX * 0.5 * mySize_x * min(1, rightcnt/30) + eY * mySize_y;
                        }
 
-                       if(autocvar_hud_panel_powerups_progressbar)
+                       if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColorForString(rightname);
-                               HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
                        if(rightcnt > 1)
-                               DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
+                               DrawNumIcon(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
                        if(rightcnt <= 5)
-                               DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
+                               DrawNumIcon_expanding(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
                }
        }
        else if (mySize_x/mySize_y > 1.5)
        {
                if(leftcnt)
                {
-                       if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // right align
+                       if(baralign == 1 || baralign == 3) { // right align
                                barpos = pos + eX * mySize_x - eX * mySize_x * min(1, leftcnt/30);
                                barsize = eX * mySize_x * min(1, leftcnt/30) + eY * 0.5 * mySize_y;
                        } else { // left align
@@ -2144,20 +2192,20 @@ void HUD_Powerups(void) {
                                barsize = eX * mySize_x * min(1, leftcnt/30) + eY * 0.5 * mySize_y;
                        }
 
-                       if(autocvar_hud_panel_powerups_progressbar)
+                       if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColorForString(leftname);
-                               HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
                        if(leftcnt > 1)
-                               DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
+                               DrawNumIcon(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', 1);
                        if(leftcnt <= 5)
-                               DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
+                               DrawNumIcon_expanding(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, '1 1 1', bound(0, (leftcnt - leftexact) / 0.5, 1));
                }
 
                if(rightcnt)
                {
-                       if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // left align
+                       if(baralign == 0 || baralign == 3) { // left align
                                barpos = pos + eY * 0.5 * mySize_y;
                                barsize = eX * mySize_x * min(1, rightcnt/30) + eY * 0.5 * mySize_y;
                        } else { // right align
@@ -2165,22 +2213,22 @@ void HUD_Powerups(void) {
                                barsize = eX * mySize_x * min(1, rightcnt/30) + eY * 0.5 * mySize_y;
                        }
 
-                       if(autocvar_hud_panel_powerups_progressbar)
+                       if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColorForString(rightname);
-                               HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
                        if(rightcnt > 1)
-                               DrawNumIcon(autocvar_hud_panel_powerups_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
+                               DrawNumIcon(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', 1);
                        if(rightcnt <= 5)
-                               DrawNumIcon_expanding(autocvar_hud_panel_powerups_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
+                               DrawNumIcon_expanding(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, '1 1 1', bound(0, (rightcnt - rightexact) / 0.5, 1));
                }
        }
        else
        {
                if(leftcnt)
                {
-                       if(autocvar_hud_panel_powerups_baralign == 1 || autocvar_hud_panel_powerups_baralign == 3) { // down align
+                       if(baralign == 1 || baralign == 3) { // down align
                                barpos = pos + eY * mySize_y - eY * mySize_y * min(1, leftcnt/30);
                                barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/30);
                        } else { // up align
@@ -2188,7 +2236,7 @@ void HUD_Powerups(void) {
                                barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/30);
                        }
 
-                       if(autocvar_hud_panel_powerups_iconalign == 1 || autocvar_hud_panel_powerups_iconalign == 3) { // down align
+                       if(iconalign == 1 || iconalign == 3) { // down align
                                picpos = pos + eX * 0.05 * mySize_x + eY * (mySize_y - 0.65 * mySize_x);
                                numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x;
                        } else { // up align
@@ -2196,10 +2244,10 @@ void HUD_Powerups(void) {
                                numpos = pos + eY * 0.4 * mySize_x;
                        }
 
-                       if(autocvar_hud_panel_powerups_progressbar)
+                       if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColorForString(leftname);
-                               HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
                        if(leftcnt <= 5)
                                drawpic_aspect_skin_expanding(picpos, leftname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (leftcnt - leftexact) / 0.5, 1));
@@ -2210,7 +2258,7 @@ void HUD_Powerups(void) {
 
                if(rightcnt)
                {
-                       if(autocvar_hud_panel_powerups_baralign == 0 || autocvar_hud_panel_powerups_baralign == 3) { // up align
+                       if(baralign == 0 || baralign == 3) { // up align
                                barpos = pos + eX * 0.5 * mySize_x;
                                barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/30);
                        } else { // down align
@@ -2218,7 +2266,7 @@ void HUD_Powerups(void) {
                                barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/30);
                        }
 
-                       if(autocvar_hud_panel_powerups_iconalign == 0 || autocvar_hud_panel_powerups_iconalign == 3) { // up align
+                       if(iconalign == 0 || iconalign == 3) { // up align
                                picpos = pos + eX * 0.05 * mySize_x + eX * 0.5 * mySize_x;
                                numpos = pos + eY * 0.4 * mySize_x + eX * 0.5 * mySize_x;
                        } else { // down align
@@ -2226,10 +2274,10 @@ void HUD_Powerups(void) {
                                numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x + eX * 0.5 * mySize_x;
                        }
 
-                       if(autocvar_hud_panel_powerups_progressbar)
+                       if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColorForString(rightname);
-                               HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1) * panel_fg_alpha, DRAWFLAG_NORMAL);
+                               HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha * bound(0, max(strength_time, shield_time), 1), DRAWFLAG_NORMAL);
                        }
                        if(rightcnt <= 5)
                                drawpic_aspect_skin_expanding(picpos, rightname, '0.4 0.4 0' * mySize_x, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL, bound(0, (rightcnt - rightexact) / 0.5, 1));
@@ -2281,6 +2329,9 @@ void HUD_HealthArmor(void)
        vector numpos;
 
        drawfont = hud_bigfont;
+       float baralign = cvar("hud_panel_healtharmor_baralign");
+       float iconalign = cvar("hud_panel_healtharmor_iconalign");
+       float progressbar = cvar("hud_panel_healtharmor_progressbar");
        if(autocvar_hud_panel_healtharmor == 2) // combined health and armor display
        {
                vector v;
@@ -2289,7 +2340,7 @@ void HUD_HealthArmor(void)
                float x;
                x = floor(v_x + 1);
 
-               if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
+               if(baralign == 1 || baralign == 3) { // right align
                        barpos = pos + eX * mySize_x - eX * mySize_x * min(1, x/400);
                        barsize = eX * mySize_x * min(1, x/400) + eY * mySize_y;
                } else { // left align
@@ -2301,7 +2352,7 @@ void HUD_HealthArmor(void)
                if(v_z) // NOT fully armored
                {
                        biggercount = "health";
-                       if(autocvar_hud_panel_healtharmor_progressbar)
+                       if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColor(health);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2312,7 +2363,7 @@ void HUD_HealthArmor(void)
                else
                {
                        biggercount = "armor";
-                       if(autocvar_hud_panel_healtharmor_progressbar)
+                       if(progressbar)
                        {
                                HUD_Panel_GetProgressBarColor(armor);
                                HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2320,12 +2371,12 @@ void HUD_HealthArmor(void)
                        if(health)
                                drawpic_aspect_skin(pos + eX * mySize_x - eX * 0.5 * mySize_y, "health", '0.5 0.5 0' * mySize_y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
                }
-               DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, mySize, x, biggercount, 1, HUD_Get_Num_Color(x, 2 * 200), 1);
+               DrawNumIcon(iconalign, pos, mySize, x, biggercount, 1, HUD_Get_Num_Color(x, 2 * 200), 1);
 
                // fuel
                if(fuel)
                {
-                       if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+                       if(baralign == 0 || baralign == 3) { // left align
                                barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
                                barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
                        } else {
@@ -2342,7 +2393,8 @@ void HUD_HealthArmor(void)
                float leftcnt, rightcnt;
                float leftactive, rightactive;
                float leftalpha, rightalpha;
-               if (autocvar_hud_panel_healtharmor_flip) { // old style layout with armor left/top of health
+               float flip = cvar("hud_panel_healtharmor_flip");
+               if (flip) { // old style layout with armor left/top of health
                        leftname = "armor";
                        leftcnt = armor;
                        if(leftcnt)
@@ -2370,7 +2422,7 @@ void HUD_HealthArmor(void)
                {
                        if(leftactive)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
+                               if(baralign == 1 || baralign == 3) { // right align
                                        barpos = pos + eX * 0.5 * mySize_x - eX * 0.5 * mySize_x * min(1, leftcnt/200);
                                        barsize = eX * 0.5 * mySize_x * min(1, leftcnt/200) + eY * mySize_y;
                                } else { // left align
@@ -2378,17 +2430,17 @@ void HUD_HealthArmor(void)
                                        barsize = eX * 0.5 * mySize_x * min(1, leftcnt/200) + eY * mySize_y;
                                }
 
-                               if(autocvar_hud_panel_healtharmor_progressbar)
+                               if(progressbar)
                                {
                                        HUD_Panel_GetProgressBarColorForString(leftname);
                                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                               DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
+                               DrawNumIcon(iconalign, pos, eX * 0.5 * mySize_x + eY * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
                        }
 
                        if(rightactive)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+                               if(baralign == 0 || baralign == 3) { // left align
                                        barpos = pos + eX * 0.5 * mySize_x;
                                        barsize = eX * 0.5 * mySize_x * min(1, rightcnt/200) + eY * mySize_y;
                                } else { // right align
@@ -2396,17 +2448,17 @@ void HUD_HealthArmor(void)
                                        barsize = eX * 0.5 * mySize_x * min(1, rightcnt/200) + eY * mySize_y;
                                }
 
-                               if(autocvar_hud_panel_healtharmor_progressbar)
+                               if(progressbar)
                                {
                                        HUD_Panel_GetProgressBarColorForString(rightname);
                                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                               DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
+                               DrawNumIcon(iconalign, pos + eX * 0.5 * mySize_x, eX * 0.5 * mySize_x + eY * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
                        }
 
                        if(fuel)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+                               if(baralign == 0 || baralign == 3) { // left align
                                        barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
                                        barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.2 * mySize_y;
                                } else {
@@ -2421,7 +2473,7 @@ void HUD_HealthArmor(void)
                {
                        if(leftactive)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // right align
+                               if(baralign == 1 || baralign == 3) { // right align
                                        barpos = pos + eX * mySize_x - eX * mySize_x * min(1, leftcnt/200);
                                        barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y;
                                } else { // left align
@@ -2429,17 +2481,17 @@ void HUD_HealthArmor(void)
                                        barsize = eX * mySize_x * min(1, leftcnt/200) + eY * 0.5 * mySize_y;
                                }
 
-                               if(autocvar_hud_panel_healtharmor_progressbar)
+                               if(progressbar)
                                {
                                        HUD_Panel_GetProgressBarColorForString(leftname);
                                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                               DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
+                               DrawNumIcon(iconalign, pos, eX * mySize_x + eY * 0.5 * mySize_y, leftcnt, leftname, 1, HUD_Get_Num_Color(leftcnt, 200), 1);
                        }
 
                        if(rightactive)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+                               if(baralign == 0 || baralign == 3) { // left align
                                        barpos = pos + eY * 0.5 * mySize_y;
                                        barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
                                } else { // right align
@@ -2447,17 +2499,17 @@ void HUD_HealthArmor(void)
                                        barsize = eX * mySize_x * min(1, rightcnt/200) + eY * 0.5 * mySize_y;
                                }
 
-                               if(autocvar_hud_panel_healtharmor_progressbar)
+                               if(progressbar)
                                {
                                        HUD_Panel_GetProgressBarColorForString(rightname);
                                        HUD_Panel_DrawProgressBar(barpos, 0, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
                                }
-                               DrawNumIcon(autocvar_hud_panel_healtharmor_iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
+                               DrawNumIcon(iconalign, pos + eY * 0.5 * mySize_y, eX * mySize_x + eY * 0.5 * mySize_y, rightcnt, rightname, 0, HUD_Get_Num_Color(rightcnt, 200), 1);
                        }
 
                        if(fuel)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+                               if(baralign == 0 || baralign == 3) { // left align
                                        barpos = pos + eX * mySize_x - eX * mySize_x * min(1, fuel/100);
                                        barsize = eX * mySize_x * min(1, fuel/100) + eY * 0.1 * mySize_y;
                                } else {
@@ -2472,7 +2524,7 @@ void HUD_HealthArmor(void)
                {
                        if(leftactive)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 1 || autocvar_hud_panel_healtharmor_baralign == 3) { // down align
+                               if(baralign == 1 || baralign == 3) { // down align
                                        barpos = pos + eY * mySize_y - eY * mySize_y * min(1, leftcnt/200);
                                        barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/200);
                                } else { // up align
@@ -2480,7 +2532,7 @@ void HUD_HealthArmor(void)
                                        barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, leftcnt/200);
                                }
 
-                               if(autocvar_hud_panel_healtharmor_iconalign == 1 || autocvar_hud_panel_healtharmor_iconalign == 3) { // down align
+                               if(iconalign == 1 || iconalign == 3) { // down align
                                        picpos = pos + eX * 0.05 * mySize_x + eY * (mySize_y - 0.65 * mySize_x);
                                        numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x;
                                } else { // up align
@@ -2488,7 +2540,7 @@ void HUD_HealthArmor(void)
                                        numpos = pos + eY * 0.4 * mySize_x;
                                }
 
-                               if(autocvar_hud_panel_healtharmor_progressbar)
+                               if(progressbar)
                                {
                                        HUD_Panel_GetProgressBarColorForString(leftname);
                                        HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2499,7 +2551,7 @@ void HUD_HealthArmor(void)
 
                        if(rightactive)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // up align
+                               if(baralign == 0 || baralign == 3) { // up align
                                        barpos = pos + eX * 0.5 * mySize_x;
                                        barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/200);
                                } else { // down align
@@ -2507,7 +2559,7 @@ void HUD_HealthArmor(void)
                                        barsize = eX * 0.5 * mySize_x + eY * mySize_y * min(1, rightcnt/200);
                                }
 
-                               if(autocvar_hud_panel_healtharmor_iconalign == 0 || autocvar_hud_panel_healtharmor_iconalign == 3) { // up align
+                               if(iconalign == 0 || iconalign == 3) { // up align
                                        picpos = pos + eX * 0.05 * mySize_x + eX * 0.5 * mySize_x;
                                        numpos = pos + eY * 0.4 * mySize_x + eX * 0.5 * mySize_x;
                                } else { // down align
@@ -2515,7 +2567,7 @@ void HUD_HealthArmor(void)
                                        numpos = pos + eY * mySize_y - eY * 0.25 * mySize_x + eX * 0.5 * mySize_x;
                                }
 
-                               if(autocvar_hud_panel_healtharmor_progressbar)
+                               if(progressbar)
                                {
                                        HUD_Panel_GetProgressBarColorForString(rightname);
                                        HUD_Panel_DrawProgressBar(barpos, 1, barsize, progressbar_color, autocvar_hud_progressbar_alpha * panel_fg_alpha, DRAWFLAG_NORMAL);
@@ -2526,7 +2578,7 @@ void HUD_HealthArmor(void)
 
                        if(fuel)
                        {
-                               if(autocvar_hud_panel_healtharmor_baralign == 0 || autocvar_hud_panel_healtharmor_baralign == 3) { // left align
+                               if(baralign == 0 || baralign == 3) { // left align
                                        barpos = pos;
                                        barsize = eX * 0.05 * mySize_x + eY * mySize_y * min(1, fuel/100);
                                } else {
@@ -2558,42 +2610,35 @@ string Weapon_KillMessage(float deathtype)
        return w_deathtypestring;
 }
 
-float killnotify_times[10];
-float killnotify_deathtype[10];
-float killnotify_actiontype[10]; // 0 = "Y [used by] X", 1 = "X [did action to] Y"
-string killnotify_attackers[10];
-string killnotify_victims[10];
+#define KN_MAX_ENTRIES 10
+float kn_index;
+float killnotify_times[KN_MAX_ENTRIES];
+float killnotify_deathtype[KN_MAX_ENTRIES];
+float killnotify_actiontype[KN_MAX_ENTRIES]; // 0 = "Y [used by] X", 1 = "X [did action to] Y"
+string killnotify_attackers[KN_MAX_ENTRIES];
+string killnotify_victims[KN_MAX_ENTRIES];
 void HUD_KillNotify_Push(string attacker, string victim, float actiontype, float wpn)
 {
-       float i;
-       for (i = 9; i > 0; --i) {
-               killnotify_times[i] = killnotify_times[i-1];
-               killnotify_deathtype[i] = killnotify_deathtype[i-1];
-               killnotify_actiontype[i] = killnotify_actiontype[i-1];
-               if(killnotify_attackers[i])
-                       strunzone(killnotify_attackers[i]);
-               killnotify_attackers[i] = strzone(killnotify_attackers[i-1]);
-               if(killnotify_victims[i])
-                       strunzone(killnotify_victims[i]);
-               killnotify_victims[i] = strzone(killnotify_victims[i-1]);
-       }
-       killnotify_times[0] = time;
-       killnotify_deathtype[0] = wpn;
-       killnotify_actiontype[0] = actiontype;
-       if(killnotify_attackers[0])
-               strunzone(killnotify_attackers[0]);
-       killnotify_attackers[0] = strzone(attacker);
-       if(killnotify_victims[0])
-               strunzone(killnotify_victims[0]);
-       killnotify_victims[0] = strzone(victim);
+       --kn_index;
+       if (kn_index == -1)
+               kn_index = KN_MAX_ENTRIES-1;
+       killnotify_times[kn_index] = time;
+       killnotify_deathtype[kn_index] = wpn;
+       killnotify_actiontype[kn_index] = actiontype;
+       if(killnotify_attackers[kn_index])
+               strunzone(killnotify_attackers[kn_index]);
+       killnotify_attackers[kn_index] = strzone(attacker);
+       if(killnotify_victims[kn_index])
+               strunzone(killnotify_victims[kn_index]);
+       killnotify_victims[kn_index] = strzone(victim);
 }
 
 void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s1 = attacker, s2 = victim
 {
        float w;
        float alsoprint, gentle;
-       alsoprint = (autocvar_hud_panel_notify_print || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
-       gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
+       alsoprint = (cvar("hud_panel_notify_print") || !panel_enabled); // print message to console if: notify panel disabled, or cvar to do so enabled
+       gentle = (cvar("cl_gentle") || cvar("cl_gentle_messages"));
        
        if ((msg == MSG_SUICIDE || msg == MSG_KILL || msg == MSG_KILL_ACTION) && gametype == GAME_CTS) // selfkill isn't interesting in CTS and only spams up the notify panel
                return;
@@ -2643,7 +2688,11 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
        } else if(msg == MSG_KILL) {
                w = DEATH_WEAPONOF(type);
                if(WEP_VALID(w)) {
-                       HUD_KillNotify_Push(s1, s2, 1, type);
+                       if((w == WEP_CAMPINGRIFLE || w == WEP_MINSTANEX) && type & HITTYPE_HEADSHOT) // all headshot weapons go here
+                               HUD_KillNotify_Push(s1, s2, 1, DEATH_HEADSHOT);
+                       else
+                               HUD_KillNotify_Push(s1, s2, 1, type);
+
                        if (alsoprint)
                                print("^1", sprintf(Weapon_KillMessage(type), strcat(s2, "^1"), strcat(s1, "^1")), "\n"); // default order: victim, killer
                }
@@ -2945,7 +2994,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
 void HUD_Centerprint(string s1, string s2, float type, float msg)
 {
        float gentle;
-       gentle = (autocvar_cl_gentle || autocvar_cl_gentle_messages);
+       gentle = (cvar("cl_gentle") || cvar("cl_gentle_messages"));
        if(msg == MSG_SUICIDE) {
                if (type == DEATH_TEAMCHANGE) {
                        centerprint(strcat(DAMAGE_CENTERPRINT_SPACER, "You are now on: ", s1));
@@ -3048,7 +3097,7 @@ void HUD_Notify (void)
        }
 
        float entries, height;
-       entries = bound(1, floor(10 * mySize_y/mySize_x), 10);
+       entries = bound(1, floor(KN_MAX_ENTRIES * mySize_y/mySize_x), KN_MAX_ENTRIES);
        height = mySize_y/entries;
        
        vector fontsize;
@@ -3056,9 +3105,9 @@ void HUD_Notify (void)
 
        float a;
        float when;
-       when = autocvar_hud_panel_notify_time;
+       when = cvar("hud_panel_notify_time");
        float fadetime;
-       fadetime = autocvar_hud_panel_notify_fadetime;
+       fadetime = cvar("hud_panel_notify_fadetime");
 
        string s;
 
@@ -3067,42 +3116,63 @@ void HUD_Notify (void)
        float width_attacker;
        string attacker, victim;
 
-       float i, j, w;
-       for(j = 0; j < entries; ++j)
+       float i, j, w, step, limit;
+       if(cvar("hud_panel_notify_flip")) //order items from the top down
        {
-               s = "";
-               if(autocvar_hud_panel_notify_flip)
-                       i = j;
-               else // rather nasty hack for ordering items from the bottom up
-                       i = entries - j - 1;
+               i = 0;
+               step = +1;
+               limit = entries;
+       }
+       else //order items from the bottom up
+       {
+               i = entries - 1;
+               step = -1;
+               limit = -1;
+       }
 
-               if(fadetime)
+       for(j = kn_index;  i != limit;  i += step, ++j)
+       {
+               if(autocvar__hud_configure)
                {
-                       if(killnotify_times[j] + when > time)
-                               a = 1;
-                       else
-                               a = bound(0, (killnotify_times[j] + when + fadetime - time) / fadetime, 1);
+                       if (step == +1)
+                               a = i;
+                       else // inverse order
+                               a = entries - 1 - i;
+                       attacker = textShortenToWidth(strcat("Player", ftos(a+1)), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+                       victim = textShortenToWidth(strcat("Player", ftos(a+2)), 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+                       s = strcat("weapon", get_weaponinfo(WEP_FIRST + mod(floor(a*2.4), WEP_LAST)).netname);
+                       a = bound(0, (when - a) / 4, 1);
+                       goto hud_config_notifyprint;
+               }
+
+               if (j == KN_MAX_ENTRIES)
+                       j = 0;
+
+               if(killnotify_times[j] + when > time)
+                       a = 1;
+               else if(fadetime)
+               {
+                       a = bound(0, (killnotify_times[j] + when + fadetime - time) / fadetime, 1);
+                       if(!a)
+                       {
+                               break;
+                       }
                }
                else
                {
-                       if(killnotify_times[j] + when > time)
-                               a = 1;
-                       else
-                               a = 0;
+                       break;
                }
 
+               s = "";
+
                w = -1;
                w = DEATH_WEAPONOF(killnotify_deathtype[j]);
 
                // TODO: maybe print in team colors?
                //
                // Y [used by] X
-               if(killnotify_actiontype[j] == 0 && !autocvar__hud_configure
+               if(killnotify_actiontype[j] == 0) 
                {
-                       attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                       pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
-                       weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
-
                        if(killnotify_deathtype[j] == DEATH_GENERIC)
                        {
                                s = "notify_death";
@@ -3195,7 +3265,11 @@ void HUD_Notify (void)
                                        s = "notify_blue_captured";
                                }
                        }
-                       if(s != "" && a)
+                       attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+                       pos_attacker = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+                       weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
+
+                       if(s != "")
                        {
                                drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                                drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
@@ -3204,27 +3278,7 @@ void HUD_Notify (void)
                // X [did action to] Y
                else
                {
-                       if(autocvar__hud_configure)
-                       {
-                               attacker = textShortenToWidth("Player1", 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                               victim = textShortenToWidth("Player2", 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                               a = bound(0, (when - j) / 4, 1);
-                       }
-                       else
-                       {
-                               attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                               victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
-                       }
-                       width_attacker = stringwidth(attacker, TRUE, fontsize);
-                       pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
-                       pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
-                       weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
-
-                       if(autocvar__hud_configure) // example actions for config mode
-                       {
-                               s = "weaponelectro";
-                       }
-                       else if(killnotify_deathtype[j] & HITTYPE_SECONDARY && w == WEP_LASER)
+                       if(killnotify_deathtype[j] & HITTYPE_SECONDARY && w == WEP_LASER)
                        {
                                s = "notify_melee_laser";
                        }
@@ -3273,6 +3327,10 @@ void HUD_Notify (void)
                        {
                                s = "notify_void";
                        }
+                       else if(killnotify_deathtype[j] == DEATH_HEADSHOT)
+                       {
+                               s = "notify_headshot";
+                       }
                        else if(killnotify_deathtype[j] == RACE_SERVER_RECORD)
                        {
                                s = "race_newrecordserver";
@@ -3289,7 +3347,16 @@ void HUD_Notify (void)
                        {
                                s = "race_newfail";
                        }
-                       if(s != "" && a)
+
+                       attacker = textShortenToWidth(killnotify_attackers[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+                       victim = textShortenToWidth(killnotify_victims[j], 0.48 * mySize_x - height, fontsize, stringwidth_colors);
+:hud_config_notifyprint
+                       width_attacker = stringwidth(attacker, TRUE, fontsize);
+                       pos_attacker = pos + eX * (0.48 * mySize_x - height - width_attacker) + eY * (0.5 * fontsize_y + i * height);
+                       pos_victim = pos + eX * (0.52 * mySize_x + height) + eY * (0.5 * fontsize_y + i * height);
+                       weap_pos = pos + eX * 0.5 * mySize_x - eX * height + eY * i * height;
+
+                       if(s != "")
                        {
                                drawpic_aspect_skin(weap_pos, s, '2 1 0' * height, '1 1 1', panel_fg_alpha * a, DRAWFLAG_NORMAL);
                                drawcolorcodedstring(pos_attacker, attacker, fontsize, panel_fg_alpha * a, DRAWFLAG_NORMAL);
@@ -3791,21 +3858,10 @@ void HUD_VoteWindow(void)
        if(!autocvar_hud_panel_vote && !autocvar__hud_configure)
                return;
 
-       active_panel = HUD_PANEL_VOTE;
-       HUD_Panel_UpdateCvars(vote);
-       if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
-       {
-               panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight;
-               panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight;
-       }
-       vector pos, mySize;
-       pos = panel_pos;
-       mySize = panel_size;
-
        if(!autocvar__hud_configure)
        {
                panel_fg_alpha = autocvar_hud_panel_fg_alpha;
-               panel_bg_alpha_str = autocvar_hud_panel_vote_bg_alpha;
+               panel_bg_alpha_str = cvar_string("hud_panel_vote_bg_alpha");
 
                if(panel_bg_alpha_str == "") {
                        panel_bg_alpha_str = ftos(autocvar_hud_panel_bg_alpha);
@@ -3835,9 +3891,22 @@ void HUD_VoteWindow(void)
        if(!vote_alpha)
                return;
 
-       a = panel_bg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
+       active_panel = HUD_PANEL_VOTE;
+       HUD_Panel_UpdateCvars(vote);
+       vector pos, mySize;
+       pos = panel_pos;
+       mySize = panel_size;
+
+       if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
+       {
+               panel_pos = eX * 0.3 * vid_conwidth + eY * 0.1 * vid_conheight;
+               panel_size = eX * 0.4 * vid_conwidth + eY * 0.3 * vid_conheight;
+       }
+
+       a = vote_alpha * bound(cvar("hud_panel_vote_alreadyvoted_alpha"), 1 - vote_highlighted, 1);
        HUD_Panel_DrawBg(a);
-       a = panel_fg_alpha * vote_alpha * bound(autocvar_hud_panel_vote_alreadyvoted_alpha, 1 - vote_highlighted, 1);
+       a = panel_fg_alpha * a;
+
        if(panel_bg_padding)
        {
                pos += '1 1 0' * panel_bg_padding;
@@ -4511,19 +4580,20 @@ void HUD_DrawPressedKeys(void)
        }
 
        // force custom aspect
-       if(autocvar_hud_panel_pressedkeys_aspect)
+       float aspect = cvar("hud_panel_pressedkeys_aspect");
+       if(aspect)
        {
                vector newSize;
-               if(mySize_x/mySize_y > autocvar_hud_panel_pressedkeys_aspect)
+               if(mySize_x/mySize_y > aspect)
                {
-                       newSize_x = autocvar_hud_panel_pressedkeys_aspect * mySize_y;
+                       newSize_x = aspect * mySize_y;
                        newSize_y = mySize_y;
 
                        pos_x = pos_x + (mySize_x - newSize_x) / 2;
                }
                else
                {
-                       newSize_y = 1/autocvar_hud_panel_pressedkeys_aspect * mySize_x;
+                       newSize_y = 1/aspect * mySize_x;
                        newSize_x = mySize_x;
 
                        pos_y = pos_y + (mySize_y - newSize_y) / 2;
@@ -5007,9 +5077,6 @@ switch (id) {\
 void HUD_Main (void)
 {
        float i;
-
-       hud_skin_path = strcat("gfx/hud/", autocvar_hud_skin);
-
        // global hud alpha fade
        if(menu_enabled == 1)
                hud_fade_alpha = 1;
@@ -5030,6 +5097,12 @@ void HUD_Main (void)
                return;
 
        // Drawing stuff
+       if (hud_skin_path != cvar_string("hud_skin"))
+       {
+               if (hud_skin_path)
+                       strunzone(hud_skin_path);
+               hud_skin_path = strzone(strcat("gfx/hud/", cvar_string("hud_skin")));
+       }
 
        // HUD configure visible grid
        if(autocvar__hud_configure && autocvar_hud_configure_grid && autocvar_hud_configure_grid_alpha)
@@ -5051,23 +5124,28 @@ void HUD_Main (void)
        {
                float f;
                vector color;
-               if((teamplay) && autocvar_hud_dock_color_team) {
-                       f = stof(getplayerkey(player_localentnum - 1, "colors"));
-                       color = colormapPaletteColor(mod(f, 16), 1) * autocvar_hud_dock_color_team;
-               }
-               else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && autocvar_hud_dock_color_team) {
-                       color = '1 0 0' * autocvar_hud_dock_color_team;
-               }
-               else if(autocvar_hud_dock_color == "shirt") {
+               float hud_dock_color_team = cvar("hud_dock_color_team");
+               if((teamplay) && hud_dock_color_team) {
                        f = stof(getplayerkey(player_localentnum - 1, "colors"));
-                       color = colormapPaletteColor(floor(f / 16), 0);
+                       color = colormapPaletteColor(mod(f, 16), 1) * hud_dock_color_team;
                }
-               else if(autocvar_hud_dock_color == "pants") {
-                       f = stof(getplayerkey(player_localentnum - 1, "colors"));
-                       color = colormapPaletteColor(mod(f, 16), 1);
+               else if(autocvar_hud_configure_teamcolorforced && autocvar__hud_configure && hud_dock_color_team) {
+                       color = '1 0 0' * hud_dock_color_team;
                }
                else
-                       color = stov(autocvar_hud_dock_color);
+               {
+                       string hud_dock_color = cvar_string("hud_dock_color");
+                       if(hud_dock_color == "shirt") {
+                               f = stof(getplayerkey(player_localentnum - 1, "colors"));
+                               color = colormapPaletteColor(floor(f / 16), 0);
+                       }
+                       else if(hud_dock_color == "pants") {
+                               f = stof(getplayerkey(player_localentnum - 1, "colors"));
+                               color = colormapPaletteColor(mod(f, 16), 1);
+                       }
+                       else
+                               color = stov(hud_dock_color);
+               }
 
                string pic;
                pic = strcat(hud_skin_path, "/", autocvar_hud_dock);
@@ -5077,7 +5155,7 @@ void HUD_Main (void)
                                pic = "gfx/hud/default/dock_medium";
                        }
                }
-               drawpic('0 0 0', pic, eX * vid_conwidth + eY * vid_conheight, color, autocvar_hud_dock_alpha * hud_fade_alpha, DRAWFLAG_NORMAL); // no aspect ratio forcing on dock...
+               drawpic('0 0 0', pic, eX * vid_conwidth + eY * vid_conheight, color, cvar("hud_dock_alpha") * hud_fade_alpha, DRAWFLAG_NORMAL); // no aspect ratio forcing on dock...
        }
 
        // cache the panel order into the panel_order array
index 7a61b515c80eb6ce87ad35efd1a449d2a73ded30..b661e30ff515dcd027ebdb75087f33289a6db0c1 100644 (file)
@@ -18,9 +18,9 @@ float scoreboard_bottom;
 float weapon_hits[WEP_MAXCOUNT];
 float weapon_fired[WEP_MAXCOUNT];
 
-#define acc_color(i) stov(cvar_string(strcat("hud_panel_weapons_accuracy_color", ftos(i))))
 #define MAX_ACCURACY_LEVELS 10
 float acc_lev[MAX_ACCURACY_LEVELS];
+vector acc_col[MAX_ACCURACY_LEVELS];
 float acc_levels;
 string acc_color_levels;
 
@@ -88,7 +88,7 @@ var string panel_bg_padding_str;
 // Little help for the poor people who have to make sense of this: Start from the bottom ;)
 
 #define HUD_Panel_GetProgressBarColor(item) \
-               progressbar_color = autocvar_hud_progressbar_##item##_color
+               progressbar_color = stov(cvar_string("hud_progressbar_" #item "_color"))
 #define HUD_Panel_GetProgressBarColorForString(item) \
 switch(item) {\
        case "strength": HUD_Panel_GetProgressBarColor(strength); break;\
@@ -251,14 +251,14 @@ else\
 // Update all common cvars of given panel name
 #define HUD_Panel_UpdateCvars(name) \
 panel_enabled = autocvar_hud_panel_##name; \
-panel_pos = autocvar_hud_panel_##name##_pos; \
-panel_size = autocvar_hud_panel_##name##_size; \
-panel_bg_str = autocvar_hud_panel_##name##_bg; \
-panel_bg_color_str = autocvar_hud_panel_##name##_bg_color; \
-panel_bg_color_team_str = autocvar_hud_panel_##name##_bg_color_team; \
-panel_bg_alpha_str = autocvar_hud_panel_##name##_bg_alpha; \
-panel_bg_border_str = autocvar_hud_panel_##name##_bg_border; \
-panel_bg_padding_str = autocvar_hud_panel_##name##_bg_padding; \
+panel_pos = stov(cvar_string("hud_panel_" #name "_pos")); \
+panel_size = stov(cvar_string("hud_panel_" #name "_size")); \
+panel_bg_str = cvar_string("hud_panel_" #name "_bg"); \
+panel_bg_color_str = cvar_string("hud_panel_" #name "_bg_color"); \
+panel_bg_color_team_str = cvar_string("hud_panel_" #name "_bg_color_team"); \
+panel_bg_alpha_str = cvar_string("hud_panel_" #name "_bg_alpha"); \
+panel_bg_border_str = cvar_string("hud_panel_" #name "_bg_border"); \
+panel_bg_padding_str = cvar_string("hud_panel_" #name "_bg_padding"); \
 HUD_Panel_StringVars()\
 if(menu_enabled == 2 && active_panel == highlightedPanel) {\
        HUD_Panel_GetMenuSize()\
@@ -286,14 +286,14 @@ switch(id) { \
 }
 
 #define HUD_Panel_UpdatePosSize(name) \
-panel_pos = autocvar_hud_panel_##name##_pos; \
-panel_size = autocvar_hud_panel_##name##_size; \
+panel_pos = stov(cvar_string("hud_panel_" #name "_pos")); \
+panel_size = stov(cvar_string("hud_panel_" #name "_size")); \
 HUD_Panel_GetScaledVectors()\
 if(menu_enabled == 2 && active_panel == highlightedPanel) {\
        HUD_Panel_GetMenuSize()\
        HUD_Panel_GetMenuPos()\
 }\
-panel_bg_border_str = autocvar_hud_panel_##name##_bg_border; \
+panel_bg_border_str = cvar_string("hud_panel_" #name "_bg_border"); \
 HUD_Panel_GetBorder()
 
 // Update pos and size of given panel id
index b61568a2aeeb9c18ae9f2a16fd14d1892c4be305..ec17dfca77efe473c73a5146513c1744f6820fe8 100644 (file)
@@ -895,7 +895,6 @@ float average_accuracy;
 vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
 {
        float i;
-       float weapon_hit, weapon_damage, weapon_stats;
        float weapon_cnt = WEP_COUNT - 3; // either minstanex/nex are hidden, no port-o-launch, no tuba
        float rows;
        if(cvar("scoreboard_accuracy_doublerows"))
@@ -942,8 +941,21 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
        if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
                g_minstagib = 1; // TODO: real detection for minstagib?
 
+       float weapon_hit, weapon_damage, weapon_stats, weapon_number;
+       // hits
+       weapon_stats = getstati(STAT_DAMAGE_HITS);
+       weapon_number = weapon_stats & 63;
+       weapon_hits[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
+       // fired
+       weapon_stats = getstati(STAT_DAMAGE_FIRED);
+       weapon_number = weapon_stats & 63;
+       weapon_fired[weapon_number-WEP_FIRST] = floor(weapon_stats / 64);
+
        if (!acc_levels)
                rgb = '1 1 1';
+       else if (acc_col_x[0] == -1)
+               for (i = 0; i < acc_levels; ++i)
+                       acc_col[i] = stov(cvar_string(strcat("accuracy_color", ftos(i))));
 
        for(i = WEP_FIRST; i <= WEP_LAST; ++i)
        {
@@ -954,12 +966,13 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                        continue;
                weapon_hit = weapon_hits[i-WEP_FIRST];
                weapon_damage = weapon_fired[i-WEP_FIRST];
-               if(weapon_damage)
-                       weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
-               float weapon_alpha;
 
+               float weapon_alpha;
                if(weapon_damage)
+               {
+                       weapon_stats = bound(0, floor(100 * weapon_hit / weapon_damage), 100);
                        weapon_alpha = scoreboard_alpha_fg;
+               }
                else
                        weapon_alpha = 0.2 * scoreboard_alpha_fg;
 
@@ -994,8 +1007,8 @@ vector HUD_DrawScoreboardAccuracyStats(vector pos, vector rgb, vector bg_size)
                                // inject color j+1 in color j, how much depending on how much weapon_stats is higher than level j
                                float factor;
                                factor = (weapon_stats - acc_lev[j]) / (acc_lev[j+1] - acc_lev[j]);
-                               rgb = acc_color(j);
-                               rgb = rgb + factor * (acc_color(j+1) - rgb);
+                               rgb = acc_col[j];
+                               rgb = rgb + factor * (acc_col[j+1] - rgb);
                        }
 
                        drawstring(pos + '1 0 0' * padding + '0 1 0' * weapon_height, s, '1 1 0' * fontsize, rgb, scoreboard_alpha_fg, DRAWFLAG_NORMAL);
@@ -1105,8 +1118,8 @@ void HUD_DrawScoreboard()
 
        HUD_UpdatePlayerTeams();
 
-       scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
-       scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - cvar("_menu_alpha"));
+       scoreboard_alpha_bg = cvar("scoreboard_alpha_bg") * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
+       scoreboard_alpha_fg = cvar_or("scoreboard_alpha_fg", 1.0) * scoreboard_fade_alpha * (1 - autocvar__menu_alpha);
        scoreboard_highlight = cvar("scoreboard_highlight");
        scoreboard_highlight_alpha = cvar_or("scoreboard_highlight_alpha", 0.10) * scoreboard_alpha_fg;
        scoreboard_highlight_alpha_self = cvar_or("scoreboard_highlight_alpha_self", 0.25) * scoreboard_alpha_fg;
index 07e9127827dc0131c43a9874c4e4bfca87f23e2c..816a2e4851eb8827eee5505e67e91f99b1e65844 100644 (file)
@@ -425,7 +425,7 @@ void WaypointSprite_Load()
        waypointsprite_distancefadealpha = cvar_or("g_waypointsprite_distancefadealpha", 1);
        waypointsprite_distancefadescale = cvar_or("g_waypointsprite_distancefadescale", 1);
        waypointsprite_distancefadedistance = vlen(mi_max - mi_min) * cvar_or("g_waypointsprite_distancefadedistancemultiplier", 1);
-       waypointsprite_alpha = cvar_or("g_waypointsprite_alpha", 1) * (1 - cvar("_menu_alpha"));
+       waypointsprite_alpha = cvar_or("g_waypointsprite_alpha", 1) * (1 - autocvar__menu_alpha);
 
        if(!waypointsprite_initialized)
        {
index 29029f6e457562aa1a6427d7ff131b5a8d229a98..4acf797b7dddfc7974315f23c4f5e506d2a7e500 100644 (file)
@@ -508,6 +508,7 @@ float DEATH_CHEAT = 10016;
 float DEATH_FIRE = 10017;
 float DEATH_TURRET = 10020;
 float DEATH_QUIET = 10021;
+float DEATH_HEADSHOT = 10022;
 
 float DEATH_SBMINIGUN = 10030;
 float DEATH_SBROCKET  = 10031;
@@ -645,3 +646,5 @@ string HUD_PANELNAME_ENGINEINFO             = "engineinfo";
 string HUD_PANELNAME_INFOMESSAGES      = "infomessages";
 
 float HUD_MENU_ENABLE          = 0;
+
+#define SERVERFLAG_ALLOW_FULLBRIGHT 1
index 42be955f0c48d0b851c56077442b4c3cfecb9f59..8c87b7fdad4f0e81a26e66633d9bb9032c7020a8 100644 (file)
@@ -1940,3 +1940,54 @@ vector NearestPointOnBox(entity box, vector org)
        return nearest;
 }
 #endif
+
+float vercmp_recursive(string v1, string v2)
+{
+       float dot1, dot2;
+       string s1, s2;
+       float r;
+
+       dot1 = strstrofs(v1, ".", 0);
+       dot2 = strstrofs(v2, ".", 0);
+       if(dot1 == -1)
+               s1 = v1;
+       else
+               s1 = substring(v1, 0, dot1);
+       if(dot2 == -1)
+               s2 = v2;
+       else
+               s2 = substring(v2, 0, dot2);
+
+       r = stof(s1) - stof(s2);
+       if(r != 0)
+               return r;
+
+       r = strcasecmp(s1, s2);
+       if(r != 0)
+               return r;
+
+       if(dot1 == -1)
+               if(dot2 == -1)
+                       return 0;
+               else
+                       return -1;
+       else
+               if(dot2 == -1)
+                       return 1;
+               else
+                       return vercmp_recursive(substring(v1, dot1 + 1, 999), substring(v2, dot2 + 1, 999));
+}
+
+float vercmp(string v1, string v2)
+{
+       if(strcasecmp(v1, v2) == 0) // early out check
+               return 0;
+
+       // "git" beats all
+       if(v1 == "git")
+               return 1;
+       if(v2 == "git")
+               return -1;
+
+       return vercmp_recursive(v1, v2);
+}
index 2de439ff2732a7775d9670b98e4ce3bd49d11fb2..cfb955e3566cb44d576ab6b09963eed1fe79c1b2 100644 (file)
@@ -245,3 +245,5 @@ vector vec2(vector v);
 #ifndef MENUQC
 vector NearestPointOnBox(entity box, vector org);
 #endif
+
+float vercmp(string v1, string v2);
index e325915c95e3791626f6c548f6b2383bbb9b0fee..ae1b02dfc330f48710fbb6e2abe1c2ec5a6b3c1d 100644 (file)
@@ -315,6 +315,21 @@ float CVAR_TYPEFLAG_READONLY = 32;
 string(string in) uri_escape = #510;
 string(string in) uri_unescape = #511;
 
+//DP_QC_URI_GET
+//idea: divVerent
+//darkplaces implementation: divVerent
+//loads text from an URL into a string
+//returns 1 on success of initiation, 0 if there are too many concurrent
+//connections already or if the URL is invalid
+//the following callback will receive the data and MUST exist!
+//  void(float id, float status, string data) URI_Get_Callback;
+//status is either
+//  negative for an internal error,
+//  0 for success, or
+//  the HTTP response code on server error (e.g. 404)
+//if 1 is returned by uri_get, the callback will be called in the future
+float(string url, float id) uri_get = #513;
+
 string(string, float) netaddress_resolve = #625;
 string(string search, string replace, string subject) strreplace = #484;
 
index b888358c3748fe6919a39da1a3f038f90702bc84..66f292a0369588ae675b237fc0580d1d8cf34a04 100644 (file)
@@ -51,6 +51,25 @@ vector hslimage_color(vector v, vector margin)
         return hsl_to_rgb(v_x * 6 * eX + eY + v_y / 0.875 * eZ);
 }
 
+vector color_hslimage(vector v, vector margin)
+{
+       vector pos;
+       v = rgb_to_hsl(v);
+       if (v_y)
+       {
+               pos_x = v_x / 6;
+               pos_y = v_z * 0.875;
+       }
+       else // grey scale
+       {
+               pos_x = v_z;
+               pos_y = 0.875 + 0.07;
+       }
+       pos_x = margin_x + pos_x * (1 - 2 * margin_x);
+       pos_y = margin_y + pos_y * (1 - 2 * margin_y);
+       return pos;
+}
+
 float XonoticColorpicker_mouseDrag(entity me, vector coords)
 {
        float i;
index 3633553044c314c4fbc7c846ad6ea7e0e53079ec..f57c768a5fcb3d80ce4da5bc16d65845fcb5164a 100644 (file)
@@ -1,6 +1,6 @@
 #ifdef INTERFACE
 CLASS(XonoticColorpickerString) EXTENDS(Image)
-       METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string))
+       METHOD(XonoticColorpickerString, configureXonoticColorpickerString, void(entity, string, string))
        METHOD(XonoticColorpickerString, mousePress, float(entity, vector))
        METHOD(XonoticColorpickerString, mouseRelease, float(entity, vector))
        METHOD(XonoticColorpickerString, mouseDrag, float(entity, vector))
@@ -12,23 +12,26 @@ CLASS(XonoticColorpickerString) EXTENDS(Image)
        METHOD(XonoticColorpickerString, draw, void(entity))
        ATTRIB(XonoticColorpickerString, disabledAlpha, float, 0.3)
 ENDCLASS(XonoticColorpickerString)
-entity makeXonoticColorpickerString(string theCvar);
+entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar);
 #endif
 
 #ifdef IMPLEMENTATION
-entity makeXonoticColorpickerString(string theCvar)
+entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar)
 {
        entity me;
        me = spawnXonoticColorpickerString();
-       me.configureXonoticColorpickerString(me, theCvar);
+       me.configureXonoticColorpickerString(me, theCvar, theDefaultCvar);
        return me;
 }
 
-void XonoticColorpickerString_configureXonoticColorpickerString(entity me, string theCvar)
+void XonoticColorpickerString_configureXonoticColorpickerString(entity me, string theCvar, string theDefaultCvar)
 {
        me.cvarName = theCvar;
        me.configureImage(me, me.image);
-       me.prevcoords = '1 1 0';
+       if(cvar_string(theCvar) != "")
+               me.prevcoords = color_hslimage(stov(cvar_string(theCvar)), me.imagemargin);
+       else // use default
+               me.prevcoords = color_hslimage(stov(cvar_string(theDefaultCvar)), me.imagemargin);
 }
 
 float XonoticColorpickerString_mousePress(entity me, vector coords)
@@ -48,7 +51,6 @@ float XonoticColorpickerString_mouseDrag(entity me, vector coords)
        if(coords_x <= 1 - margin_x)
        if(coords_y <= 1 - margin_y)
        {
-               cvar_set(me.cvarName, sprintf("%v", hslimage_color(coords, margin)));
                me.prevcoords = coords;
        }
 
@@ -74,10 +76,11 @@ void XonoticColorpickerString_draw(entity me)
        sz = draw_PictureSize(strcat(me.src, "_selected"));
        sz = globalToBoxSize(sz, draw_scale);
 
-       if(me.disabled)
-               me.prevcoords = '1 1 0';
-       else
+       if(!me.disabled)
+       {
+               cvar_set(me.cvarName, sprintf("%v", hslimage_color(me.prevcoords, me.imagemargin)));
                draw_Picture(me.imgOrigin + me.prevcoords - 0.5 * sz, strcat(me.src, "_selected"), sz, '1 1 1', 1);
+       }
        draw_alpha = save;
 }
 #endif
index 645b9320750fcedced0f2c6b7f0ec5947a7af888..26b9bcb8f52361d9a60b9ea794ec3de95a7be8a3 100644 (file)
@@ -33,11 +33,15 @@ void XonoticCrosshairButton_configureXonoticCrosshairButton(entity me, float the
        me.loadCvars(me);
        me.configureRadioButton(me, string_null, me.fontSize, me.image, theGroup, 0);
        me.srcMulti = 1;
-       me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat)));
+       if(me.cvarValueFloat == -1)
+               me.src3 = strzone(strcat("/gfx/crosshair", cvar("crosshair")));
+       else
+               me.src3 = strzone(strcat("/gfx/crosshair", ftos(me.cvarValueFloat)));
        me.src4 = "/gfx/crosshairdot";
 }
 void XonoticCrosshairButton_setChecked(entity me, float val)
 {
+       if(me.cvarValueFloat != -1) // preview shouldn't work as a button
        if(val != me.checked)
        {
                me.checked = val;
@@ -65,24 +69,38 @@ void XonoticCrosshairButton_draw(entity me)
        vector sz, rgb;
        float a;
 
-       rgb = eX * cvar("crosshair_color_red") + eY * cvar("crosshair_color_green") + eZ * cvar("crosshair_color_blue");
+       rgb = stov(cvar_string("crosshair_color"));
        a = cvar("crosshair_alpha");
 
-       if(!me.checked && !me.focused)
+       if(!me.checked && !me.focused && me.cvarValueFloat != -1)
        {
                a *= me.disabledAlpha;
                rgb = '1 1 1';
        }
 
+       if(me.cvarValueFloat == -1) // update the preview if this is the preview button
+       {
+               if(me.src3)
+                       strunzone(me.src3);
+               me.src3 = strzone(strcat("/gfx/crosshair", cvar_string("crosshair")));
+               me.focused = 1;
+               me.checked = 0;
+       }
+
        SUPER(XonoticCrosshairButton).draw(me);
 
        sz = draw_PictureSize(me.src3);
        sz = globalToBoxSize(sz, draw_scale);
-       sz = (10 * '1 1 0' + sz * cvar("crosshair_size")) * 0.05; // (10 * '1 1 0' + ...) * 0.05 here to make visible size changes happen also at bigger sizes
-       if(sz_x > 0.95)
-               sz = sz * (0.95 / sz_x);
-       if(sz_y > 0.95)
-               sz = sz * (0.95 / sz_y);
+       if(me.cvarValueFloat == -1)
+       {
+               sz = (6 * '1 1 0' + sz * cvar("crosshair_size")) * 0.08; // (6 * '1 1 0' + ...) * 0.08 here to make visible size changes happen also at bigger sizes
+               if(sz_x > 0.95)
+                       sz = sz * (0.95 / sz_x);
+               if(sz_y > 0.95)
+                       sz = sz * (0.95 / sz_y);
+       }
+       else // show the crosshair picker at full size
+               sz = '0.95 0.95 0';
 
        draw_Picture('0.5 0.5 0' - 0.5 * sz, me.src3, sz, rgb, a);
        if(cvar("crosshair_dot"))
index 1e0d4bf92d6a9d9b64d9d3816d5bc4c4a71b6da3..256dbe7df028ec0a93852b1dc0ae06123680a2df 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDAmmoDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 74fabe0518ac16fd7720e7f358001733555952b2..c9a4eae6e80734de20449611918a871a5734aad6 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDChatDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 8d359e9cf686e765750b03e5af9a437aaecc4443..03ef106c7decd260147dbae0a48d8c0f9ffc296a 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDEngineInfoDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index b276045b63183c6ba9412599affe4cbc970cf6ef..3e8a43aeb38520a386ca1ef25960587e6aae83b4 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDHealthArmorDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 56d4bf463649496243cf14c28cbfbb06150efffc..d8534a20e9974d34030cb4dce2da064fcb987d6e 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDInfoMessagesDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index ebd5f240bedf0603edcaa2689c23200cf935cf03..d60a72473f4999bf5bc96e2d105a5c2a00834130 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDModIconsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index c811cb62832530fd9d5ee71dab5bb0d06767b5bb..3eeaff284db99458439ea17e9cc052016e835919 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDNotificationDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 14f4a19268707a3100a0154bd34bb6b1ee3ae01e..5d4e14c08b62fc64876d7f22ae303c836a36d659 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDPowerupsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 7d32914ddae7b437774f767c0882c7dc59e66179..30f6bfc1f2da723a813477fa3b70e4c106ab9432 100644 (file)
@@ -33,7 +33,7 @@ void XonoticHUDPressedKeysDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index febbd544975720e6d295b365176c09e1d2c2fb68..35fdc55f3c8b5d9a8ae355dde2faa245fe11975d 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDRaceTimerDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 90de04795a9ee59a4f46ae36cc805cfcdaa64843..d1202846e26c140f0140c5f3ac67b7898b1e0c8a 100644 (file)
@@ -33,7 +33,7 @@ void XonoticHUDRadarDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 8c8561ea79b07aafd9867dbd0017e7ce4b3e226e..fc51921e23777a3b2980123ca42ba99e2f446cd1 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDScoreDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 748d2911ec71de5f631d062c4f6dc10f85ad1dca..96dc4aa6959f8fa8c18c4423cfc0c49afb913483 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDTimerDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 6c935d9e7f105d3131b3e8e344d9c0b9e51ec970..b5f5b6e27b965713d2cb0099a3457fd28fccd5a8 100644 (file)
@@ -29,7 +29,7 @@ void XonoticHUDVoteDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
index 538723bce1c945462614af9926f080266df22007..ad3d080415e6547af2452536ff50b8f8c4149321 100644 (file)
@@ -29,11 +29,11 @@ void XonoticHUDWeaponsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color"))));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString(strzone(strcat("hud_panel_", panelname, "_bg_color")), "hud_panel_bg_color"));
                        setDependentStringNotEqual(e, strzone(strcat("hud_panel_", panelname, "_bg_color")), "");
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", "1 1 1", strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
+               me.TD(me, 1, 1.2, e = makeXonoticCheckBoxString("", cvar_string("hud_panel_bg_color"), strzone(strcat("hud_panel_", panelname, "_bg_color")), "Use default"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Border size:"));
@@ -103,7 +103,7 @@ void XonoticHUDWeaponsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Ammo bar color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color"));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_weapons_ammo_color", "hud_panel_weapons_ammo_color"));
                        setDependent(e, "hud_panel_weapons_ammo", 1, 1);
                me.TR(me);
        me.TR(me);
index 3f8bcebd778877e07fedf9e9653930225876b69e..751b3cf95c73004f35b08ea92bb3ecc97e1150ec 100644 (file)
@@ -28,7 +28,7 @@ void XonoticHUDExitDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_bg_color"));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_panel_bg_color", "hud_panel_bg_color"));
        me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.2);
@@ -75,7 +75,7 @@ void XonoticHUDExitDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, "Color:"));
-               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_dock_color"));
+               me.TD(me, 2, 2.4, e = makeXonoticColorpickerString("hud_dock_color", "hud_dock_color"));
        me.TR(me);
        me.TR(me);      
                me.TDempty(me, 0.2);
index 37a4669c512e0174adf448a4e1c222bc3e3fbc20..984ae9b2655538c6f3be917f3560dec175143047 100644 (file)
@@ -7,7 +7,7 @@ CLASS(XonoticMutatorsDialog) EXTENDS(XonoticDialog)
        ATTRIB(XonoticMutatorsDialog, title, string, "Mutators")
        ATTRIB(XonoticMutatorsDialog, color, vector, SKINCOLOR_DIALOG_MUTATORS)
        ATTRIB(XonoticMutatorsDialog, intendedWidth, float, 0.9)
-       ATTRIB(XonoticMutatorsDialog, rows, float, 18)
+       ATTRIB(XonoticMutatorsDialog, rows, float, 17)
        ATTRIB(XonoticMutatorsDialog, columns, float, 6)
        ATTRIB(XonoticMutatorsDialog, refilterEntity, entity, NULL)
 ENDCLASS(XonoticMutatorsDialog)
@@ -82,8 +82,6 @@ string XonoticMutatorsDialog_toString(entity me)
                s = strcat(s, ", Cloaked");
        if(cvar("g_grappling_hook"))
                s = strcat(s, ", Hook");
-       if(cvar("g_laserguided_missile"))
-               s = strcat(s, ", LG missiles");
        if(cvar("g_midair"))
                s = strcat(s, ", Midair");
        if(cvar("g_vampire"))
@@ -202,9 +200,6 @@ void XonoticMutatorsDialog_fill(entity me)
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_jetpack", "Jet pack"));
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_laserguided_missile", "Laser guided missiles"));
        me.TR(me);
                me.TDempty(me, 0.2);
                me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "g_rocket_flying", "Rocket Flying"));
index 2a075f4c921e943a796e2483eedeace3b48d6e1e..02177fb6363dded55bc059e8b4510a7b1f2f95e7 100644 (file)
@@ -109,18 +109,20 @@ void XonoticPlayerSettingsTab_fill(entity me)
                        e0.textEntity = main.weaponsDialog;
                        e0.allowCut = 1;
        me.TR(me);
-               me.TD(me, 1, 0.75, e = makeXonoticTextLabel(0, "Crosshair:"));
-               me.TD(me, 1, 1.00, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
-               me.TD(me, 1, 1.25, e = makeXonoticCheckBox(1, "crosshair_color_override", "& Per weapon colors"));
-               setDependent(e, "crosshair_per_weapon", 1, 1);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair:"));
+               me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "crosshair_per_weapon", "Per weapon"));
        me.TR(me);
-               me.TDempty(me, 0.5);
+               me.TDempty(me, 0.2);
                for(i = 1; i <= 10; ++i) {
                        me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
                        setDependent(e, "crosshair_per_weapon", 0, 0);
                }
+               // show a larger preview of the selected crosshair
+               me.TDempty(me, 0.2);
+               me.TDNoMargin(me, 2, 2 / 5, e = makeXonoticCrosshairButton(4, -1), '1 1 0'); // crosshair -1 makes this a preview
+               setDependent(e, "crosshair_per_weapon", 0, 0);
        me.TR(me);
-               me.TDempty(me, 0.5);
+               me.TDempty(me, 0.2);
                for(i = 11; i <= 20; ++i) {
                        me.TDNoMargin(me, 1, 2 / 10, e = makeXonoticCrosshairButton(3, i), '1 1 0');
                        setDependent(e, "crosshair_per_weapon", 0, 0);
@@ -135,19 +137,12 @@ void XonoticPlayerSettingsTab_fill(entity me)
                me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha"));
        me.TR(me);
                me.TDempty(me, 0.2);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair red:"));
-               me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_red"));
-               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair color:"));
+               me.TD(me, 2, 1.8, e = makeXonoticColorpickerString("crosshair_color", "crosshair_color"));
+               setDependent(e, "crosshair_color_per_weapon", 0, 0);
        me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair green:"));
-               me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_green"));
-               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
-       me.TR(me);
-               me.TDempty(me, 0.2);
-               me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Crosshair blue:"));
-               me.TD(me, 1, 1.8, e = makeXonoticSlider(0, 1, 0.01, "crosshair_color_blue"));
-               setDependentOR(e, "crosshair_per_weapon", 0, 0, "crosshair_color_override", 1, 1);
+               me.TDempty(me, 0.3);
+               me.TD(me, 1, 0.7, e = makeXonoticCheckBox(0, "crosshair_color_per_weapon", "Per weapon"));
        me.TR(me);
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "crosshair_dot", "Enable centered dot"));
        me.TR(me);
@@ -160,9 +155,10 @@ void XonoticPlayerSettingsTab_fill(entity me)
                        setDependent(e, "crosshair_dot", 1, 1);
        me.TR(me);
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Hit test:"));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "0",    "None"));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1",    "TrueAim"));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(1, "crosshair_hittest", "1.25", "Enemies"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "0",    "None"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1",    "TrueAim"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(5, "crosshair_hittest", "1.25", "Enemies"));
+       me.TR(me);
        me.TR(me);
                me.TDempty(me, 0.4);
                me.TD(me, 1, 2.2, e = makeXonoticButton("Waypoints setup...", '0 0 0'));
@@ -178,9 +174,9 @@ void XonoticPlayerSettingsTab_fill(entity me)
        me.TR(me);
        #ifdef ALLOW_FORCEMODELS
                me.TD(me, 1, 1, e = makeXonoticTextLabel(0, "Force models:"));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, string_null, string_null, "None"));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
-               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(2, "cl_forceplayermodels", string_null, "All"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, string_null, string_null, "None"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodelsfromxonotic", string_null, "Custom"));
+               me.TD(me, 1, 2/3, e = makeXonoticRadioButton(6, "cl_forceplayermodels", string_null, "All"));
        #endif
                me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_gentle", "Disable gore effects"));
        me.TR(me);
index ce9676f3781dbafaf81d8f267917d4ebcbfdbbfa..3d5d3e843cecb59fbc2a94d4bbecbc47ff68d455 100644 (file)
@@ -8,6 +8,8 @@ CLASS(XonoticServerList) EXTENDS(XonoticListBox)
        METHOD(XonoticServerList, resizeNotify, void(entity, vector, vector, vector, vector))
        METHOD(XonoticServerList, keyDown, float(entity, float, float, float))
 
+       ATTRIB(XonoticServerList, iconsSizeFactor, float, 0.85)
+
        ATTRIB(XonoticServerList, realFontSize, vector, '0 0 0')
        ATTRIB(XonoticServerList, realUpperMargin, float, 0)
        ATTRIB(XonoticServerList, columnIconsOrigin, float, 0)
@@ -50,6 +52,9 @@ CLASS(XonoticServerList) EXTENDS(XonoticListBox)
        ATTRIB(XonoticServerList, lastClickedTime, float, 0)
 
        ATTRIB(XonoticServerList, ipAddressBoxFocused, float, -1)
+
+       ATTRIB(XonoticServerList, seenIPv4, float, 0)
+       ATTRIB(XonoticServerList, seenIPv6, float, 0)
 ENDCLASS(XonoticServerList)
 entity makeXonoticServerList();
 void ServerList_Connect_Click(entity btn, entity me);
@@ -493,11 +498,11 @@ void XonoticServerList_resizeNotify(entity me, vector relOrigin, vector relSize,
        me.realUpperMargin = 0.5 * (1 - me.realFontSize_y);
 
        me.columnIconsOrigin = 0;
-       me.columnIconsSize = me.realFontSize_x * 2;
-       me.columnPingSize = me.realFontSize_x * 4;
-       me.columnMapSize = me.realFontSize_x * 12;
+       me.columnIconsSize = me.realFontSize_x * 3 * me.iconsSizeFactor;
+       me.columnPingSize = me.realFontSize_x * 3;
+       me.columnMapSize = me.realFontSize_x * 10;
        me.columnTypeSize = me.realFontSize_x * 4;
-       me.columnPlayersSize = me.realFontSize_x * 6;
+       me.columnPlayersSize = me.realFontSize_x * 4;
        me.columnNameSize = 1 - me.columnPlayersSize - me.columnMapSize - me.columnPingSize - me.columnIconsSize - me.columnTypeSize - 5 * me.realFontSize_x;
        me.columnPingOrigin = me.columnIconsOrigin + me.columnIconsSize + me.realFontSize_x;
        me.columnNameOrigin = me.columnPingOrigin + me.columnPingSize + me.realFontSize_x;
@@ -557,6 +562,7 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        // layout: Ping, Server name, Map name, NP, TP, MP
        string s;
        float p, q;
+       float isv4, isv6;
        vector theColor;
        float theAlpha;
 
@@ -596,6 +602,19 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        }
 
        s = gethostcachestring(SLIST_FIELD_CNAME, i);
+
+       isv4 = isv6 = 0;
+       if(substring(s, 0, 1) == "[")
+       {
+               isv6 = 1;
+               me.seenIPv6 += 1;
+       }
+       else if(strstrofs("0123456789", substring(s, 0, 1), 0) >= 0)
+       {
+               isv4 = 1;
+               me.seenIPv4 += 1;
+       }
+
        q = stof(substring(crypto_getencryptlevel(s), 0, 1));
        if((q <= 0 && cvar("crypto_aeslevel") >= 3) || (q >= 3 && cvar("crypto_aeslevel") <= 0))
        {
@@ -628,21 +647,35 @@ void XonoticServerList_drawListBoxItem(entity me, float i, vector absSize, float
        s = gethostcachestring(SLIST_FIELD_QCSTATUS, i);
        {
                vector iconSize;
-               iconSize_y = 1;
-               iconSize_x = iconSize_y * (absSize_y / absSize_x);
+               iconSize_y = me.realFontSize_y * me.iconsSizeFactor;
+               iconSize_x = me.realFontSize_x * me.iconsSizeFactor;
 
                vector iconPos;
-               iconPos_x = (me.columnIconsSize - 2 * iconSize_x) * 0.5;
+               iconPos_x = (me.columnIconsSize - 3 * iconSize_x) * 0.5;
                iconPos_y = (1 - iconSize_y) * 0.5;
 
-               draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure", ftos(strstrofs(s, ":P0:", 0) >= 0)), iconSize, '1 1 1', 1);
+               if not(me.seenIPv4 && me.seenIPv6)
+               {
+                       iconPos_x += iconSize_x * 0.5;
+               }
+               else if(me.seenIPv4 && me.seenIPv6)
+               {
+                       if(isv6)
+                               draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_ipv6"), iconSize, '1 1 1', 1);
+                       else if(isv4)
+                               draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_ipv4"), iconSize, '1 1 1', 1);
+                       iconPos_x += iconSize_x;
+               }
 
-               iconPos_x += iconSize_x;
                draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_aeslevel", ftos(q)), iconSize, '1 1 1', 1);
+               iconPos_x += iconSize_x;
+
+               draw_Picture(iconPos, strcat(SKINGFX_SERVERLIST_ICON, "_pure", ftos(strstrofs(s, ":P0:", 0) >= 0)), iconSize, '1 1 1', 1);
+               iconPos_x += iconSize_x;
        }
 
        s = ftos(p);
-       draw_Text(me.realUpperMargin * eY + (me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0);
+       draw_Text(me.realUpperMargin * eY + (me.columnPingOrigin + me.columnPingSize - draw_TextWidth(s, 0, me.realFontSize)) * eX, s, me.realFontSize, theColor, theAlpha, 0);
        s = draw_TextShortenToWidth(gethostcachestring(SLIST_FIELD_NAME, i), me.columnNameSize, 0, me.realFontSize);
        draw_Text(me.realUpperMargin * eY + me.columnNameOrigin * eX, s, me.realFontSize, theColor, theAlpha, 0);
        s = draw_TextShortenToWidth(gethostcachestring(SLIST_FIELD_MAP, i), me.columnMapSize, 0, me.realFontSize);
index 9a40ba25be82174cce4fe4c25c1f01393aeafe15..6f5b037acff686485fba7aeef08c1b75ed2e118c 100644 (file)
@@ -229,66 +229,83 @@ void setDependentWeird(entity e, float(entity) func)
        setDependent_Check(e);
 }
 
-// EXTRESPONSE SYSTEM ////////////////////////////////////////////////////////
+// URI SYSTEM ////////////////////////////////////////////////////////
 
-float _Nex_ExtResponseSystem_RequestsSent;
-float _Nex_ExtResponseSystem_VersionHandled;
+float _Nex_ExtResponseSystem_Queried;
 string _Nex_ExtResponseSystem_UpdateTo;
-float _Nex_ExtResponseSystem_RetryTime;
-float _Nex_ExtResponseSystem_RetryTime_LastDelay;
 
-void() Item_Nex_ExtResponseSystem_SendQuery =
+float URI_GET_DISCARD = 0;
+
+float URI_GET_UPDATENOTIFICATION = 1;
+void UpdateNotification_URI_Get_Callback(float id, float status, string data);
+
+void URI_Get_Callback(float id, float status, string data)
 {
-       dprint("Sending extended response requests...\n");
-       localcmd(strcat("packet 64.22.107.122:27950 \"getExtResponse checkUpdates xonotic ", cvar_string("g_xonoticversion"), "\"\n"));
-       _Nex_ExtResponseSystem_RequestsSent = TRUE;
-       _Nex_ExtResponseSystem_RetryTime_LastDelay = _Nex_ExtResponseSystem_RetryTime_LastDelay * 2 + 1;
-       _Nex_ExtResponseSystem_RetryTime = time + _Nex_ExtResponseSystem_RetryTime_LastDelay;
+       if (id == URI_GET_DISCARD)
+       {
+               // discard
+       }
+       else if(id == URI_GET_UPDATENOTIFICATION)
+       {
+               // online ban list
+               UpdateNotification_URI_Get_Callback(id, status, data);
+       }
+       else
+       {
+               print("Received HTTP request data for an invalid id ", ftos(id), ".\n");
+       }
 }
 
-void(float argc) Item_Nex_ExtResponseSystem_Parse =
+void UpdateNotification_URI_Get_Callback(float id, float status, string data)
 {
-       dprint("Received extended response packet from ", argv(0), "\n");
-       if(!_Nex_ExtResponseSystem_RequestsSent)
+       float n;
+
+       if(_Nex_ExtResponseSystem_UpdateTo)
        {
-               dprint("  But I haven't sent a request yet! Ignoring.\n");
+               print("error: UpdateNotification_URI_Get_Callback has been called before\n");
                return;
        }
-       if(argv(1) == "noUpdateAvailable")
+       if(status != 0)
        {
-               if(_Nex_ExtResponseSystem_VersionHandled)
-               {
-                       dprint("  duplicated update notice, ignored\n");
-                       return;
-               }
-               _Nex_ExtResponseSystem_VersionHandled = 1;
+               print(sprintf("error receiving update notification: status is %d\n", status));
+               return;
        }
-       else if(argv(1) == "updateAvailable")
+       if(substring(data, 0, 1) == "<")
        {
-               if(_Nex_ExtResponseSystem_VersionHandled)
-               {
-                       dprint("  duplicated update notice, ignored\n");
-                       return;
-               }
-               _Nex_ExtResponseSystem_VersionHandled = 1;
-               _Nex_ExtResponseSystem_UpdateTo = strzone(argv(2)); // note: only one packet can be handled, so this can't be a leak
+               print("error: received HTML instead of an update notification\n");
+               return;
+       }
+       if(strstrofs(data, "\r", 0) != -1)
+       {
+               print("error: received carriage returns from update notification server\n");
+               return;
        }
-       else
-               dprint("  UNKNOWN RESPONSE TYPE: ", argv(1), "\n");
-}
 
-void() Item_Nex_ExtResponseSystem_CheckForResponse =
-{
-       local string s;
-       local float argc;
-       while(strlen((s = getextresponse())))
+       if(data == "")
+               n = 0;
+       else
+               n = tokenizebyseparator(data, "\n");
+       
+       if(n >= 1)
        {
-               argc = tokenize_console(s);
-               Item_Nex_ExtResponseSystem_Parse(argc);
+               _Nex_ExtResponseSystem_UpdateTo = argv(0);
+
+               if(vercmp(cvar_string("g_xonoticversion"), _Nex_ExtResponseSystem_UpdateTo) >= 0)
+               {
+                       _Nex_ExtResponseSystem_UpdateTo = ""; // no update needed
+               }
+               else
+               {
+                       // update needed
+                       if(n >= 2)
+                               print(sprintf("Update can be downloaded at:\n%s\n", argv(1)));
+               }
+
+               _Nex_ExtResponseSystem_UpdateTo = strzone(_Nex_ExtResponseSystem_UpdateTo);
        }
 }
 
-// END OF EXTRESPONSE SYSTEM /////////////////////////////////////////////////
+// END OF URI SYSTEM ////////////////////////////////////////////////////////
 
 float preMenuInit()
 {
@@ -341,26 +358,28 @@ void preMenuDraw()
 
        if(cvar("menu_updatecheck"))
        {
-               Item_Nex_ExtResponseSystem_CheckForResponse();
-               if(!_Nex_ExtResponseSystem_VersionHandled)
-                       if(time > _Nex_ExtResponseSystem_RetryTime)
-                               Item_Nex_ExtResponseSystem_SendQuery();
+               if(!_Nex_ExtResponseSystem_Queried)
+               {
+                       _Nex_ExtResponseSystem_Queried = 1;
+                       uri_get(sprintf("http://www.xonotic.org/dl/checkupdate.txt?version=%s", uri_escape(cvar_string("g_xonoticversion"))), URI_GET_UPDATENOTIFICATION);
+               }
        }
 
        if(_Nex_ExtResponseSystem_UpdateTo != "")
        {
+               // TODO rather turn this into a dialog
                fs = ((1/draw_scale_x) * eX + (1/draw_scale_y) * eY) * 12;
                line = eY * fs_y;
                sz_x = draw_TextWidth("  http://www.xonotic.com/  ", 0, fs);
                sz_y = 3 * fs_y;
 
-               draw_alpha = sin(time * 0.112 - 0.3) * 0.7;
+               draw_alpha = sin(time * 0.112 - 0.3) * 10;
                mid = eX * (0.5 + 0.5 * (1 - sz_x) * cos(time * 0.071))
                    + eY * (0.5 + 0.5 * (1 - sz_y) * sin(time * 0.071));
 
                draw_Fill(mid - 0.5 * sz, sz, '1 1 0', 1);
                draw_CenterText(mid - 1 * line, strcat("Update to ", _Nex_ExtResponseSystem_UpdateTo, " now!"), fs, '1 0 0', 1, 0);
-               draw_CenterText(mid - 0 * line, "http://www.xonotic.com/", fs, '0 0 1', 1, 0);
+               draw_CenterText(mid - 0 * line, "http://www.xonotic.org/", fs, '0 0 1', 1, 0);
        }
        if not(campaign_name_previous)
                campaign_name_previous = strzone(strcat(campaign_name, "x")); // force unequal
index 35eff19e6619e9ddcd6646918c0794616d139f63..2a79d6a4add237e2080e9fe345a3bee520dfc328 100644 (file)
@@ -916,7 +916,13 @@ void PutClientInServer (void)
                }
 
                if(g_weaponarena_random)
+               {
+                       if(g_weaponarena_random_with_laser)
+                               self.weapons &~= WEPBIT_LASER;
                        self.weapons = randombits(self.weapons, g_weaponarena_random, FALSE);
+                       if(g_weaponarena_random_with_laser)
+                               self.weapons |= WEPBIT_LASER;
+               }
 
                self.items = start_items;
                self.jump_interval = time;
@@ -1091,10 +1097,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 +1118,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;
        }
 }
@@ -1407,6 +1414,27 @@ void FixClientCvars(entity e)
         */
 }
 
+float PlayerInIDList(entity p, string idlist)
+{
+       float n, i;
+       string s;
+
+       // NOTE: we do NOT check crypto_keyfp here, an unsigned ID is fine too for this
+       if not(p.crypto_idfp)
+               return 0;
+
+       // this function allows abbreviated player IDs too!
+       n = tokenize_console(idlist);
+       for(i = 0; i < n; ++i)
+       {
+               s = argv(i);
+               if(s == substring(p.crypto_idfp, 0, strlen(s)))
+                       return 1;
+       }
+
+       return 0;
+}
+
 /*
 =============
 ClientConnect
@@ -1462,9 +1490,37 @@ void ClientConnect (void)
        //if(g_domination)
        //      dom_player_join_team(self);
 
+       // identify the right forced team
+       if(PlayerInIDList(self, cvar_string("g_forced_team_red")))
+               self.team_forced = COLOR_TEAM1;
+       else if(PlayerInIDList(self, cvar_string("g_forced_team_blue")))
+               self.team_forced = COLOR_TEAM2;
+       else if(PlayerInIDList(self, cvar_string("g_forced_team_yellow")))
+               self.team_forced = COLOR_TEAM3;
+       else if(PlayerInIDList(self, cvar_string("g_forced_team_pink")))
+               self.team_forced = COLOR_TEAM4;
+       else if(cvar_string("g_forced_team_otherwise") == "red")
+               self.team_forced = COLOR_TEAM1;
+       else if(cvar_string("g_forced_team_otherwise") == "blue")
+               self.team_forced = COLOR_TEAM2;
+       else if(cvar_string("g_forced_team_otherwise") == "yellow")
+               self.team_forced = COLOR_TEAM3;
+       else if(cvar_string("g_forced_team_otherwise") == "pink")
+               self.team_forced = COLOR_TEAM4;
+       else if(cvar_string("g_forced_team_otherwise") == "spectate")
+               self.team_forced = -1;
+       else if(cvar_string("g_forced_team_otherwise") == "spectator")
+               self.team_forced = -1;
+       else
+               self.team_forced = 0;
+
+       if(!teams_matter)
+               if(self.team_forced > 0)
+                       self.team_forced = 0;
+
        JoinBestTeam(self, FALSE, FALSE); // if the team number is valid, keep it
 
-       if((cvar("sv_spectate") == 1 && !g_lms) || cvar("g_campaign")) {
+       if((cvar("sv_spectate") == 1 && !g_lms) || cvar("g_campaign") || self.team_forced < 0) {
                self.classname = "observer";
        } else {
                if(teams_matter)
@@ -1694,11 +1750,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);
@@ -2337,7 +2388,7 @@ void ShowRespawnCountdown()
 void LeaveSpectatorMode()
 {
        if(isJoinAllowed()) {
-               if(!teams_matter || cvar("g_campaign") || cvar("g_balance_teams") || (self.wasplayer && cvar("g_changeteam_banned"))) {
+               if(!teams_matter || cvar("g_campaign") || cvar("g_balance_teams") || (self.wasplayer && cvar("g_changeteam_banned")) || self.team_forced > 0) {
                        self.classname = "player";
 
                        if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force"))
@@ -2378,6 +2429,9 @@ void LeaveSpectatorMode()
  * @return bool TRUE if the player is allowed to join, false otherwise
  */
 float isJoinAllowed() {
+       if(self.team_forced < 0)
+               return FALSE; // forced spectators can never join
+
        if (!cvar("g_maxplayers"))
                return TRUE;
 
@@ -2406,50 +2460,6 @@ void checkSpectatorBlock() {
        }
 }
 
-float vercmp_recursive(string v1, string v2)
-{
-       float dot1, dot2;
-       string s1, s2;
-       float r;
-
-       dot1 = strstrofs(v1, ".", 0);
-       dot2 = strstrofs(v2, ".", 0);
-       if(dot1 == -1)
-               s1 = v1;
-       else
-               s1 = substring(v1, 0, dot1);
-       if(dot2 == -1)
-               s2 = v2;
-       else
-               s2 = substring(v2, 0, dot2);
-
-       r = stof(s1) - stof(s2);
-       if(r != 0)
-               return r;
-
-       r = strcasecmp(s1, s2);
-       if(r != 0)
-               return r;
-
-       if(dot1 == -1)
-               if(dot2 == -1)
-                       return 0;
-               else
-                       return -1;
-       else
-               if(dot2 == -1)
-                       return 1;
-               else
-                       return vercmp_recursive(substring(v1, dot1 + 1, 999), substring(v2, dot2 + 1, 999));
-}
-
-float vercmp(string v1, string v2)
-{
-       if(strcasecmp(v1, v2) == 0) // early out check
-               return 0;
-       return vercmp_recursive(v1, v2);
-}
-
 void ObserverThink()
 {
        if (self.flags & FL_JUMPRELEASED) {
@@ -2810,7 +2820,7 @@ void PlayerPreThink (void)
                player_regen();
 
                // rot nex charge to the charge limit
-               if(cvar("g_balance_nex_charge_rot_rate") && self.nex_charge > cvar("g_balance_nex_charge_limit"))
+               if(cvar("g_balance_nex_charge_rot_rate") && self.nex_charge > cvar("g_balance_nex_charge_limit") && self.nex_charge_rottime < time)
                        self.nex_charge = bound(cvar("g_balance_nex_charge_limit"), self.nex_charge - cvar("g_balance_nex_charge_rot_rate") * frametime / W_TICSPERFRAME, 1);
 
                if(frametime)
index d890f5d591ad49bc4ef21d0a9a2456704f5a5752..a2943a76053e61e6e873e951594bfa7bd1898feb 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 4537573c5d57b28c6ed7757a4aea131bcd78d109..fc6edb265d1eba1b77831bb26fd269b8d0e4e6f5 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()
@@ -1106,6 +1042,7 @@ void W_SwitchToOtherWeapon(entity pl)
        if(ww)
                W_SwitchWeapon_Force(pl, ww);
 }
+.float prevdryfire;
 float weapon_prepareattack_checkammo(float secondary)
 {
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
@@ -1117,8 +1054,11 @@ float weapon_prepareattack_checkammo(float secondary)
                for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self)
                        return FALSE;
 
-               if(self.weapon == self.switchweapon) // only play once BEFORE starting to switch weapons
+               if(self.weapon == self.switchweapon && time - self.prevdryfire > 1) // only play once BEFORE starting to switch weapons
+               {
                        sound (self, CHAN_AUTO, "weapons/dryfire.wav", VOL_BASE, ATTN_NORM);
+                       self.prevdryfire = time;
+               }
 
                W_SwitchToOtherWeapon(self);
                return FALSE;
index df19ab592f4779beb94a38881992e37150a43ae0..0cbe3017eae1ef889844324e8649a1c6cf036d8b 100644 (file)
@@ -171,7 +171,7 @@ void SV_ParseClientCommand(string s) {
                        PutClientInServer();
                } else if(cvar("g_campaign") || cvar("g_balance_teams") || cvar("g_balance_teams_force")) {
                        //JoinBestTeam(self, FALSE, TRUE);
-               } else if(teams_matter && !cvar("sv_spectate")) {
+               } else if(teams_matter && !cvar("sv_spectate") && !(self.team_forced > 0)) {
                        self.classname = "observer";
                        stuffcmd(self,"menu_showteamselect\n");
                }
@@ -249,9 +249,11 @@ void SV_ParseClientCommand(string s) {
                if not(self.flags & FL_CLIENT)
                        return;
                if( !teams_matter ) {
-                       sprint( self, "selecteam can only be used in teamgames\n");
+                       sprint( self, "selectteam can only be used in teamgames\n");
                } else if(cvar("g_campaign")) {
                        //JoinBestTeam(self, 0);
+               } else if(self.team_forced > 0) {
+                       sprint( self, "selectteam can not be used as your team is forced\n");
                } else if(lockteams) {
                        sprint( self, "^7The game has already begun, you must wait until the next map to be able to join a team.\n");
                } else if( argv(1) == "red" ) {
index d250d39def5f523e1a57bb775731128aa04fb7e0..31e5b7788513b7eb180cd929c10d46bae871fc08 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 45394eb7925db2bf34fd5e10818131e5646af2dc..d369298a56cd5b679a7113934831a7878d2476ba 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
 
@@ -658,5 +654,10 @@ string deathmessage;
 .entity realowner;
 
 .float nex_charge;
+.float nex_charge_rottime;
 
 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;
+
+.float team_forced; // can be a team number to force a team, or 0 for default action, or -1 for forced spectator
index 809df9ecbd892b5d6037f4cb5b07670818a3ba27..460c608dcf357d944829978620b3e21247f61724 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 b351d77615732eb249be7c7c775c3bdbb017ceba..f381612c3f7843a427fa43724cc16e7919b0edec 100644 (file)
@@ -272,7 +272,21 @@ void cvar_changes_init()
                BADCVAR("bgmvolume");
 
                // private
+               BADCVAR("developer");
+               BADCVAR("g_banned_list");
+               BADCVAR("log_dest_udp");
+               BADCVAR("log_file");
+               BADCVAR("net_address");
+               BADCVAR("net_address_ipv6");
+               BADCVAR("port");
+               BADCVAR("savedgamecfg");
                BADCVAR("serverconfig");
+               BADCVAR("sv_heartbeatperiod");
+               BADCVAR("sv_vote_master_password");
+               BADCVAR("sys_colortranslation");
+               BADCVAR("sys_specialcharactertranslation");
+               BADCVAR("timestamps");
+               BADPREFIX("developer_");
                BADPREFIX("g_ban_");
                BADPREFIX("g_chat_flood_");
                BADPREFIX("g_voice_flood_");
@@ -284,22 +298,13 @@ void cvar_changes_init()
                BADPREFIX("sv_eventlog");
                BADPREFIX("sv_logscores_");
                BADPREFIX("sv_master");
-               BADCVAR("g_banned_list");
-               BADCVAR("log_dest_udp");
-               BADCVAR("log_file");
-               BADCVAR("net_address");
-               BADCVAR("port");
-               BADCVAR("savedgamecfg");
-               BADCVAR("sv_heartbeatperiod");
-               BADCVAR("sv_vote_master_password");
-               BADCVAR("sys_colortranslation");
-               BADCVAR("sys_specialcharactertranslation");
-               BADCVAR("timestamps");
-               BADCVAR("net_address");
-               BADCVAR("net_address_ipv6");
                BADPREFIX("sv_weaponstats_");
-               BADCVAR("developer");
-               BADPREFIX("developer_");
+
+               // these can contain player IDs, so better hide
+               BADCVAR("g_forced_team_red");
+               BADCVAR("g_forced_team_blue");
+               BADCVAR("g_forced_team_yellow");
+               BADCVAR("g_forced_team_pink");
 
                // mapinfo
                BADCVAR("timelimit");
@@ -363,6 +368,7 @@ void cvar_changes_init()
                BADCVAR("sv_checkforpacketsduringsleep");
                BADPREFIX("crypto_");
                BADPREFIX("g_chat_");
+               BADPREFIX("net_");
                BADPREFIX("prvm_");
                BADPREFIX("sv_fragmessage_");
                BADPREFIX("sv_vote_");
@@ -403,6 +409,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");
@@ -436,6 +443,12 @@ void cvar_changes_init()
                BADCVAR("sv_vote_master_password");
                BADCVAR("sv_vote_simple_majority_factor");
                BADCVAR("timelimit_override");
+
+               if(cvar("g_minstagib"))
+               {
+                       BADCVAR("g_grappling_hook");
+                       BADCVAR("g_jetpack");
+               }
 #undef BADPREFIX
 #undef BADCVAR
 
@@ -449,6 +462,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 +705,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 90b06a5a3d92a5950fa42d3213263c4f337db8e3..8e63beecc33793b7c3611434f609953b76988a98 100644 (file)
@@ -801,16 +801,15 @@ void GameCommand(string command)
                        bprint("That command can only be used in a team-based gamemode.\n");
                return;
        }
-       if(argv(0) == "movetoteam")
-       if(argc == 3 || argc == 4) {
-//     sv_cmd movetoteam  player_id  team_colour
-//     sv_cmd movetoteam  player_id  team_colour  type_of_move
+       if(argv(0) == "movetoteam") if(argc == 3 || argc == 4) {
+               //      sv_cmd movetoteam  player_id  team_colour
+               //      sv_cmd movetoteam  player_id  team_colour  type_of_move
 
-//     type of move
-//     0 (00) automove centerprint, admin message
-//     1 (01) automove centerprint, no admin message
-//     2 (10) no centerprint, admin message
-//     3 (11) no centerprint, no admin message
+               //      type of move
+               //      0 (00) automove centerprint, admin message
+               //      1 (01) automove centerprint, no admin message
+               //      2 (10) no centerprint, admin message
+               //      3 (11) no centerprint, no admin message
 
                if(!teams_matter) {  // death match
                        print("Currently not playing a team game\n");
@@ -825,7 +824,7 @@ void GameCommand(string command)
                        return;
                }
 
-                       client = edict_num(entno);
+               client = edict_num(entno);
 
                // player entity is not a client
                if not(client.flags & FL_CLIENT) {
@@ -835,43 +834,52 @@ void GameCommand(string command)
 
                // find the team to move the player to
                float team_colour;
+               float save;
+
+               save = client.team_forced;
+               client.team_forced = 0;
 
                team_colour = ColourToNumber(argv(2));
 
                if(team_colour == client.team) {  // player already on the team
                        print("Player ", argv(1), " (", client.netname, ") is already on the ", ColoredTeamName(client.team), "\n");
+                       // keep the forcing undone
                        return;
                } else if(team_colour == 0)  // auto team
                        team_colour = NumberToTeamNumber(FindSmallestTeam(client, FALSE));
+               else
+                       CheckAllowedTeams(client);
+
+               client.team_forced = save;
 
                switch(team_colour) {
                        case COLOR_TEAM1:
                                if(c1 == -1) {
                                        print("Sorry, there isn't a red team\n");
                                        return;
-               }
-                       break;
+                               }
+                               break;
 
                        case COLOR_TEAM2:
                                if(c2 == -1) {
                                        print("Sorry, there isn't a blue team\n");
-               return;
-       }
-                       break;
+                                       return;
+                               }
+                               break;
 
                        case COLOR_TEAM3:
                                if(c3 == -1) {
                                        print("Sorry, there isn't a yellow team\n");
                                        return;
                                }
-                       break;
+                               break;
 
                        case COLOR_TEAM4:
                                if(c4 == -1) {
                                        print("Sorry, there isn't a pink team\n");
                                        return;
                                }
-                       break;
+                               break;
 
                        default:
                                print("Sorry, team ", argv(2), " doesn't exist\n");
@@ -879,6 +887,7 @@ void GameCommand(string command)
                }
                print("Player ", argv(1), " (", client.netname, ") has been moved to the ", ColoredTeamName(team_colour), "\n");
 
+               client.team_forced = 0;
                MoveToTeam(client, team_colour, 6, stof(argv(3)));
 
                return;
index b074164a5f5dbd90d0750b56e1e78a214cc37ecf..5b8ec7127fd861a81b3dde4d32fa8e25ac5390c4 100644 (file)
@@ -855,6 +855,7 @@ float g_pickup_ammo_anyway;
 float g_pickup_weapons_anyway;
 float g_weaponarena;
 float g_weaponarena_random;
+float g_weaponarena_random_with_laser;
 string g_weaponarena_list;
 float g_weaponspeedfactor;
 float g_weaponratefactor;
@@ -995,6 +996,7 @@ void readplayerstartcvars()
                g_weaponarena_random = cvar("g_weaponarena_random");
        else
                g_weaponarena_random = 0;
+       g_weaponarena_random_with_laser = cvar("g_weaponarena_random_with_laser");
 
        if (g_weaponarena)
        {
@@ -1186,6 +1188,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 +1234,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 cdc28f76bf426a44a4acace7da91b2a6396a807c..fdfbdfb1223d2c3bfc9111b584c85ce2decc368d 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 91d2ea5be78c915997474f7fc24c851310bac36c..542014e8691275dfe11870f8d97118036f5f846e 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 1443317181bce327261646dc82f259619ae091f1..c2718d4e8642d69e006bc84400a4ff442d235b39 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 1232e3c8eb9262f180e8bb97279fdaf761f29181..b9064c783b852a515586ade5e0826b3323380bf9 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)
@@ -711,6 +707,16 @@ void CheckAllowedTeams (entity for_whom)
                                c1 = -1;
                }
        }
+
+       // if player has a forced team, ONLY allow that one
+       if(self.team_forced == COLOR_TEAM1 && c1 >= 0)
+               c2 = c3 = c4 = -1;
+       else if(self.team_forced == COLOR_TEAM2 && c2 >= 0)
+               c1 = c3 = c4 = -1;
+       else if(self.team_forced == COLOR_TEAM3 && c3 >= 0)
+               c1 = c2 = c4 = -1;
+       else if(self.team_forced == COLOR_TEAM4 && c4 >= 0)
+               c1 = c2 = c3 = -1;
 }
 
 float PlayerValue(entity p)
@@ -797,7 +803,7 @@ float FindSmallestTeam(entity pl, float ignore_pl)
        if(c4 >= 0)
                totalteams = totalteams + 1;
 
-       if(cvar("bot_vs_human") && totalteams == 1)
+       if((cvar("bot_vs_human") || pl.team_forced > 0) && totalteams == 1)
                totalteams += 1;
 
        if(totalteams <= 1)
index 1a05c8a4a2fc09c4bb7796299063fcf63812b85a..f17e075dd74c7a25df4127000afbe4d1a2521113 100644 (file)
@@ -3,20 +3,39 @@ REGISTER_WEAPON(CRYLINK, w_crylink, IT_CELLS, 6, WEP_FLAG_NORMAL | WEP_TYPE_SPLA
 #else
 #ifdef SVQC
 .float gravity;
+.float crylink_waitrelease;
+.entity crylink_lastgroup;
 
 .entity queuenext;
 .entity queueprev;
 
+void W_Crylink_Dequeue_Raw(entity own, entity prev, entity me, entity next)
+{
+       if(me == own.crylink_lastgroup)
+               own.crylink_lastgroup = ((me == next) ? world : next);
+       prev.queuenext = next;
+       next.queueprev = prev;
+}
+
+void W_Crylink_Dequeue(entity e)
+{
+       W_Crylink_Dequeue_Raw(e.realowner, e.queueprev, e, e.queuenext);
+}
+
 // force projectile to explode
 void W_Crylink_LinkExplode (entity e, entity e2)
 {
        float a;
        a = bound(0, 1 - (time - e.fade_time) * e.fade_rate, 1);
 
+       if(e == e.realowner.crylink_lastgroup)
+               e.realowner.crylink_lastgroup = world;
+
        RadiusDamage (e, e.realowner, cvar("g_balance_crylink_primary_damage") * a, cvar("g_balance_crylink_primary_edgedamage") * a, cvar("g_balance_crylink_primary_radius"), world, cvar("g_balance_crylink_primary_force") * a, e.projectiledeathtype, other);
 
        if(e.queuenext != e2)
                W_Crylink_LinkExplode(e.queuenext, e2);
+
        remove (e);
 }
 
@@ -25,69 +44,84 @@ 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;
        float avg_dist, n;
        entity p;
 
+       w_crylink_linkjoin_time = 0;
+
        avg_origin = e.origin;
        avg_velocity = e.velocity;
        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);
        avg_velocity *= (1.0 / n);
 
+       if(n < 2)
+               return avg_origin; // nothing to do
+
        // 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);
 
-       w_crylink_linkjoin_time = 0;
        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
@@ -96,22 +130,70 @@ vector W_Crylink_LinkJoin(entity e, float joinspeed)
        return targ_origin;
 }
 
+void W_Crylink_LinkJoinEffect_Think()
+{
+       // is there at least 2 projectiles very close?
+       entity e, p;
+       float n;
+       e = self.owner.crylink_lastgroup;
+       n = 0;
+       if(e)
+       {
+               if(vlen(e.origin - self.origin) < vlen(e.velocity) * frametime)
+                       ++n;
+               for(p = e; (p = p.queuenext) != e; )
+               {
+                       if(vlen(p.origin - self.origin) < vlen(p.velocity) * frametime)
+                               ++n;
+               }
+               if(n >= 2)
+               {
+                       if(e.projectiledeathtype & HITTYPE_SECONDARY)
+                       {
+                               if(cvar("g_balance_crylink_secondary_joinexplode"))
+                               {
+                                       n = n / cvar("g_balance_crylink_secondary_shots");
+                                       RadiusDamage (e, e.realowner, cvar("g_balance_crylink_secondary_joinexplode_damage") * n, 
+                                                                       cvar("g_balance_crylink_secondary_joinexplode_edgedamage") * n, 
+                                                                       cvar("g_balance_crylink_secondary_joinexplode_radius") * n, world, 
+                                                                       cvar("g_balance_crylink_secondary_joinexplode_force") * n, e.projectiledeathtype, other);
+
+                                       pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
+                               }                               
+                       }
+                       else
+                       {
+                               if(cvar("g_balance_crylink_primary_joinexplode"))
+                               {
+                                       n = n / cvar("g_balance_crylink_primary_shots");
+                                       RadiusDamage (e, e.realowner, cvar("g_balance_crylink_primary_joinexplode_damage") * n, 
+                                                                       cvar("g_balance_crylink_primary_joinexplode_edgedamage") * n, 
+                                                                       cvar("g_balance_crylink_primary_joinexplode_radius") * n, world, 
+                                                                       cvar("g_balance_crylink_primary_joinexplode_force") * n, e.projectiledeathtype, other);
+
+                                       pointparticles(particleeffectnum("crylink_joinexplode"), self.origin, '0 0 0', n);
+                               }                               
+                       }                       
+               }
+       }
+       remove(self);
+}
+
+
 // NO bounce protection, as bounces are limited!
 void W_Crylink_Touch (void)
 {
        float finalhit;
        float f;
        //PROJECTILE_TOUCH;
-       local entity savenext, saveprev;
+       local entity savenext, saveprev, saveown;
+       saveown = self.realowner;
        savenext = self.queuenext;
        saveprev = self.queueprev;
        if(WarpZone_Projectile_Touch())
        {
                if(wasfreed(self))
-               {
-                       savenext.queueprev = saveprev;
-                       saveprev.queuenext = savenext;
-               }
+                       W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
                return;
        }
 
@@ -125,12 +207,19 @@ 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) || finalhit)
+       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);
                return;
        }
+       else if(finalhit)
+       {
+               // just unlink
+               W_Crylink_Dequeue(self);
+               remove(self);
+               return;
+       }
        self.cnt = self.cnt - 1;
        self.angles = vectoangles(self.velocity);
        self.owner = world;
@@ -145,16 +234,14 @@ void W_Crylink_Touch2 (void)
        float finalhit;
        float f;
        //PROJECTILE_TOUCH;
-       local entity savenext, saveprev;
+       local entity savenext, saveprev, saveown;
        savenext = self.queuenext;
        saveprev = self.queueprev;
+       saveown = self.realowner;
        if(WarpZone_Projectile_Touch())
        {
                if(wasfreed(self))
-               {
-                       savenext.queueprev = saveprev;
-                       saveprev.queuenext = savenext;
-               }
+                       W_Crylink_Dequeue_Raw(saveown, saveprev, self, savenext);
                return;
        }
 
@@ -168,7 +255,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);
@@ -177,8 +264,7 @@ void W_Crylink_Touch2 (void)
        else if(finalhit)
        {
                // just unlink
-               self.queuenext.queueprev = self.queueprev;
-               self.queueprev.queuenext = self.queuenext;
+               W_Crylink_Dequeue(self);
                remove(self);
                return;
        }
@@ -193,8 +279,7 @@ void W_Crylink_Touch2 (void)
 
 void W_Crylink_Fadethink (void)
 {
-       self.queuenext.queueprev = self.queueprev;
-       self.queueprev.queuenext = self.queuenext;
+       W_Crylink_Dequeue(self);
        remove(self);
 }
 
@@ -215,6 +300,7 @@ void W_Crylink_Attack (void)
 
        shots = cvar("g_balance_crylink_primary_shots");
        pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
+       proj = world;
        while (counter < shots)
        {
                proj = spawn ();
@@ -222,7 +308,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
@@ -264,19 +354,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 if(counter <= 3)
-               {
-                       proj.fade_time = time + cvar("g_balance_crylink_primary_star_lifetime");
-                       self.fade_rate = 1 / cvar("g_balance_crylink_primary_star_fadetime");
-                       proj.nextthink = time + cvar("g_balance_crylink_primary_star_lifetime") + cvar("g_balance_crylink_primary_star_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");
@@ -294,6 +378,7 @@ void W_Crylink_Attack (void)
 
                counter = counter + 1;
        }
+       self.crylink_lastgroup = proj;
 }
 
 void W_Crylink_Attack2 (void)
@@ -308,6 +393,7 @@ void W_Crylink_Attack2 (void)
 
        shots = cvar("g_balance_crylink_secondary_shots");
        pointparticles(particleeffectnum("crylink_muzzleflash"), w_shotorg, w_shotdir * 1000, shots);
+       proj = world;
        while (counter < shots)
        {
                proj = spawn ();
@@ -315,7 +401,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
@@ -345,13 +435,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");
@@ -369,6 +459,7 @@ void W_Crylink_Attack2 (void)
 
                counter = counter + 1;
        }
+       self.crylink_lastgroup = proj;
 }
 
 void spawnfunc_weapon_crylink (void)
@@ -388,16 +479,65 @@ float w_crylink(float req)
        else if (req == WR_THINK)
        {
                if (self.BUTTON_ATCK)
-               if (weapon_prepareattack(0, cvar("g_balance_crylink_primary_refire")))
                {
-                       W_Crylink_Attack();
-                       weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_crylink_primary_animtime"), w_ready);
+                       if (!self.crylink_waitrelease)
+                       if (weapon_prepareattack(0, cvar("g_balance_crylink_primary_refire")))
+                       {
+                               W_Crylink_Attack();
+                               weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_crylink_primary_animtime"), w_ready);
+                               if(cvar("g_balance_crylink_primary_joinspeed") != 0 || cvar("g_balance_crylink_primary_jointime") != 0)
+                                       self.crylink_waitrelease = 1;
+                       }
+               }
+               else if(self.BUTTON_ATCK2 && cvar("g_balance_crylink_secondary"))
+               {
+                       if (!self.crylink_waitrelease)
+                       if (weapon_prepareattack(1, cvar("g_balance_crylink_secondary_refire")))
+                       {
+                               W_Crylink_Attack2();
+                               weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_crylink_secondary_animtime"), w_ready);
+                               if(cvar("g_balance_crylink_secondary_joinspeed") != 0 || cvar("g_balance_crylink_secondary_jointime") != 0)
+                                       self.crylink_waitrelease = 2;
+                       }
                }
-               if (self.BUTTON_ATCK2 && cvar("g_balance_crylink_secondary"))
-               if (weapon_prepareattack(1, cvar("g_balance_crylink_secondary_refire")))
+               else
                {
-                       W_Crylink_Attack2();
-                       weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_crylink_secondary_animtime"), w_ready);
+                       if (self.crylink_waitrelease)
+                       {
+                               // fired and released now!
+                               if(self.crylink_lastgroup)
+                               {
+                                       vector pos;
+                                       entity linkjoineffect;
+                                       
+                                       
+                                       if(self.crylink_waitrelease == 1)
+                                       {
+                                               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"), cvar("g_balance_crylink_secondary_jointime"));
+                                       }
+                                       
+                                       linkjoineffect = spawn();
+                                       linkjoineffect.think = W_Crylink_LinkJoinEffect_Think;
+                                       linkjoineffect.classname = "linkjoineffect";                                    
+                                       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))
+                               {
+                                       // ran out of ammo!
+                                       self.cnt = WEP_CRYLINK;
+                                       self.switchweapon = w_getbestweapon(self);
+                               }
+                       }
                }
        }
        else if (req == WR_PRECACHE)
@@ -407,13 +547,24 @@ float w_crylink(float req)
                precache_model ("models/weapons/h_crylink.iqm");
                precache_sound ("weapons/crylink_fire.wav");
                precache_sound ("weapons/crylink_fire2.wav");
+               precache_sound ("weapons/crylink_linkjoin.wav");
        }
        else if (req == WR_SETUP)
                weapon_setup(WEP_CRYLINK);
        else if (req == WR_CHECKAMMO1)
+       {
+               // don't "run out of ammo" and switch weapons while waiting for release
+               if(self.crylink_lastgroup && self.crylink_waitrelease)
+                       return TRUE;
                return self.ammo_cells >= cvar("g_balance_crylink_primary_ammo");
+       }
        else if (req == WR_CHECKAMMO2)
+       {
+               // don't "run out of ammo" and switch weapons while waiting for release
+               if(self.crylink_lastgroup && self.crylink_waitrelease)
+                       return TRUE;
                return self.ammo_cells >= cvar("g_balance_crylink_secondary_ammo");
+       }
        return TRUE;
 };
 #endif
index 6634837db6131f9da80daf588a54b53ceae2c008..014fc34e51d15a4a176b793d7f34f35378ea24bc 100644 (file)
@@ -61,10 +61,13 @@ void W_Plasma_Explode_Combo (void)
 
 void W_Plasma_Touch (void)
 {
+       //self.velocity = self.velocity  * 0.1;
+       
        PROJECTILE_TOUCH;
        if (other.takedamage == DAMAGE_AIM) {
                W_Plasma_Explode ();
        } else {
+               //UpdateCSQCProjectile(self);
                spamsound (self, CHAN_PROJECTILE, "weapons/electro_bounce.wav", VOL_BASE, ATTN_NORM);
                self.projectiledeathtype |= HITTYPE_BOUNCE;
        }
@@ -174,7 +177,10 @@ void W_Electro_Attack2()
        proj.health = cvar("g_balance_electro_secondary_health");
        proj.event_damage = W_Plasma_Damage;
        proj.flags = FL_PROJECTILE;
-
+       
+       //proj.bouncefactor = cvar("g_balance_electro_secondary_bouncefactor");
+       //proj.bouncestop = cvar("g_balance_electro_secondary_bouncestop");
+       
 #if 0
        entity p2;
        p2 = spawn();
@@ -186,7 +192,7 @@ void W_Electro_Attack2()
        CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO, FALSE); // no culling, it has sound
 
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
-}
+       }
 
 .vector hook_start, hook_end;
 float lgbeam_send(entity to, float sf)
index e92b2b26062bdae5bddfbe1b7ddb1b18785608b8..75d3d7e7bb8925c55d36ce8f114e26e25cda6dba 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 3b9c94006c854aa58e0cdb28d27145c935241649..aeefbcd0b7dac1a6162726367a65fe2a52b4bf48 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 352aa2b25c6edfee928e7b3541eb51f9b9a58ad5..1c9f0bd70b46ad386c1865bf21c86fa1a7dc947f 100644 (file)
@@ -28,7 +28,6 @@ void W_MinstaNex_Attack (void)
                if(headshot)
                {
                        AnnounceTo(self, "headshot");
-                       print("h\n");
                }
                if(damage_goodhits && self.minstanex_lasthit)
                {
@@ -195,7 +194,7 @@ float w_minstanex(float req)
                {
                        if (self.jump_interval <= time)
                        {
-                               self.jump_interval = time + 0.9 * W_WeaponRateFactor();
+                               self.jump_interval = time + cvar("g_balance_laser_primary_refire") * W_WeaponRateFactor();
 
                                // ugly minstagib hack to reuse the fire mode of the laser
                                float w;
index 493fd005bea62bfd546c6b66949c7b0bd5a3ed94..d152a6e083949b56586aa4179f46556090841b84 100644 (file)
@@ -100,6 +100,7 @@ float w_nex(float req)
                {
                        if(cvar("g_balance_nex_secondary_charge"))
                        {
+                               self.nex_charge_rottime = time + cvar("g_balance_nex_charge_rot_pause");
                                dt = frametime / W_TICSPERFRAME;
                                if(self.nex_charge < 1)
                                {
index a57da6a67d049cff12aa3b9121d76dbb1c335f10..c29fda3a2af78575b5d18b9acfbe5db1ce57a425 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)
        {
index 788c9880fe7c4f57df428a9ccc17afbbdc2e7138..676f64f780d1fd42bfd09d4afbc80bda75bf9a7c 100644 (file)
@@ -38,8 +38,6 @@ void UziFlash()
        self.muzzle_flash.angles_z = random() * 180;
        self.muzzle_flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION;
        self.muzzle_flash.owner = self;
-       
-       
 }
 
 .float uzi_bulletcounter;
@@ -100,7 +98,86 @@ void uzi_fire1_02()
        }
        else
                weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), w_ready);
-};
+}
+
+
+void uzi_mode1_fire_auto()
+{
+       float uzi_spread;
+       
+       if (self.BUTTON_ATCK)
+               weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), uzi_mode1_fire_auto);
+       else
+       {
+               ATTACK_FINISHED(self) = time + cvar("g_balance_uzi_first_refire") * W_WeaponRateFactor();
+               weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), w_ready);
+               return;
+       }
+
+       if (!weapon_action(self.weapon, WR_CHECKAMMO1))
+       {
+               W_SwitchWeapon_Force(self, w_getbestweapon(self));
+               w_ready();
+               return;
+       }
+       
+       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_first_damage"));
+       if (!g_norecoil)
+       {
+               self.punchangle_x = random () - 0.5;
+               self.punchangle_y = random () - 0.5;
+       }
+       
+       uzi_spread = bound(cvar("g_balance_uzi_spread_min"), cvar("g_balance_uzi_spread_min") + (cvar("g_balance_uzi_spread_add") * self.uzi_bulletcounter), cvar("g_balance_uzi_spread_max"));
+       fireBallisticBullet(w_shotorg, w_shotdir, uzi_spread, cvar("g_balance_uzi_speed"), 5, cvar("g_balance_uzi_sustained_damage"), 0, cvar("g_balance_uzi_sustained_force"), WEP_UZI, 0, 1, cvar("g_balance_uzi_bulletconstant"));
+       endFireBallisticBullet();
+       
+       self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+       
+       pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+
+       UziFlash();
+       W_AttachToShotorg(self.muzzle_flash, '5 0 0');
+       
+       if (cvar("g_casings") >= 2) // casing code
+               SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);
+       
+       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)   
+               self.ammo_nails = self.ammo_nails - cvar("g_balance_uzi_sustained_ammo");
+       
+}
+
+void uzi_mode1_fire_burst()
+{
+       W_SetupShot (self, cvar("g_antilag_bullets") && cvar("g_balance_uzi_speed") >= cvar("g_antilag_bullets"), 0, "weapons/uzi_fire.wav", cvar("g_balance_uzi_first_damage"));
+       if (!g_norecoil)
+       {
+               self.punchangle_x = random () - 0.5;
+               self.punchangle_y = random () - 0.5;
+       }
+       
+       fireBallisticBullet(w_shotorg, w_shotdir, cvar("g_balance_uzi_burst_spread"), cvar("g_balance_uzi_speed"), 5, cvar("g_balance_uzi_sustained_damage"), 0, cvar("g_balance_uzi_sustained_force"), WEP_UZI, 0, 1, cvar("g_balance_uzi_bulletconstant"));
+       endFireBallisticBullet();
+       
+       
+       pointparticles(particleeffectnum("uzi_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
+
+       UziFlash();
+       W_AttachToShotorg(self.muzzle_flash, '5 0 0');
+       
+       if (cvar("g_casings") >= 2) // casing code
+               SpawnCasing (((random () * 50 + 50) * v_right) - (v_forward * (random () * 25 + 25)) - ((random () * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, self);
+
+       self.uzi_bulletcounter = self.uzi_bulletcounter + 1;
+       if (self.uzi_bulletcounter == 0)
+               weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_uzi_burst_refire2"), w_ready);
+       else
+       {
+               weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_uzi_burst_refire"), uzi_mode1_fire_burst);
+               dprint("bullets:", ftos(self.uzi_bulletcounter),"\n");
+       }
+               
+}
 
 void spawnfunc_weapon_machinegun(); // defined in t_items.qc
 
@@ -115,19 +192,50 @@ float w_uzi(float req)
                }
        else if (req == WR_THINK)
        {
-               if (self.BUTTON_ATCK)
-               if (weapon_prepareattack(0, 0))
+               if(cvar("g_balance_uzi_mode") == 1)
                {
-                       self.uzi_bulletcounter = 1;
-                       W_Uzi_Attack(WEP_UZI); // sets attack_finished
-                       weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), uzi_fire1_02);
+                       if (self.BUTTON_ATCK)
+                       if (weapon_prepareattack(0, 0))
+                       {                               
+                               self.uzi_bulletcounter = 0;
+                               uzi_mode1_fire_auto();
+                       }
+                       
+                       if(self.BUTTON_ATCK2)
+                       if(weapon_prepareattack(1, 0))
+                       {
+                               if (!weapon_action(self.weapon, WR_CHECKAMMO2))
+                               {
+                                       W_SwitchWeapon_Force(self, w_getbestweapon(self));
+                                       w_ready();
+                                       return FALSE;
+                               }
+                               
+                               if not(self.items & IT_UNLIMITED_WEAPON_AMMO)   
+                                       self.ammo_nails = self.ammo_nails - cvar("g_balance_uzi_burst_ammo");
+
+                               self.uzi_bulletcounter = cvar("g_balance_uzi_burst") * -1;
+                               uzi_mode1_fire_burst();
+                       }
                }
-               if (self.BUTTON_ATCK2 && cvar("g_balance_uzi_first"))
-               if (weapon_prepareattack(1, 0))
+               else
                {
-                       self.uzi_bulletcounter = 1;
-                       W_Uzi_Attack(WEP_UZI | HITTYPE_SECONDARY); // sets attack_finished
-                       weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_uzi_first_refire"), w_ready);
+                       
+                       if (self.BUTTON_ATCK)
+                       if (weapon_prepareattack(0, 0))
+                       {
+                               self.uzi_bulletcounter = 1;
+                               W_Uzi_Attack(WEP_UZI); // sets attack_finished
+                               weapon_thinkf(WFRAME_FIRE1, cvar("g_balance_uzi_sustained_refire"), uzi_fire1_02);
+                       }
+
+                       if (self.BUTTON_ATCK2 && cvar("g_balance_uzi_first"))
+                       if (weapon_prepareattack(1, 0))
+                       {
+                               self.uzi_bulletcounter = 1;
+                               W_Uzi_Attack(WEP_UZI | HITTYPE_SECONDARY); // sets attack_finished
+                               weapon_thinkf(WFRAME_FIRE2, cvar("g_balance_uzi_first_refire"), w_ready);
+                       }
                }
        }
        else if (req == WR_PRECACHE)
@@ -141,9 +249,15 @@ float w_uzi(float req)
        else if (req == WR_SETUP)
                weapon_setup(WEP_UZI);
        else if (req == WR_CHECKAMMO1)
-               return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
+               if(cvar("g_balance_uzi_mode") == 1)
+                       return self.ammo_nails >= cvar("g_balance_uzi_sustained_ammo");
+               else
+                       return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
        else if (req == WR_CHECKAMMO2)
-               return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
+               if(cvar("g_balance_uzi_mode") == 1)
+                       return self.ammo_nails >= cvar("g_balance_uzi_burst_ammo");
+               else
+                       return self.ammo_nails >= cvar("g_balance_uzi_first_ammo");
        return TRUE;
 };
 #endif
index 1ae46d1d4068f53d9e6362330d7c30064afd9cf1..994a1c566ea261be3c9ba87a6b372fe53f4bff2e 100644 (file)
--- a/quake.rc
+++ b/quake.rc
@@ -1,5 +1,6 @@
 exec default.cfg
 exec config.cfg
+maxplayers $menu_maxplayers
 exec data/campaign.cfg
 exec config_update.cfg
 exec autoexec.cfg
diff --git a/sound/weapons/crylink_linkjoin.ogg b/sound/weapons/crylink_linkjoin.ogg
new file mode 100644 (file)
index 0000000..26c7af5
Binary files /dev/null and b/sound/weapons/crylink_linkjoin.ogg differ
index 58fc76c3890088b57f62b8722beb18d920cee786..e8aa0f6cd1ee6ee2817a7b3098b5ee394e9b21ef 100644 (file)
@@ -37,7 +37,6 @@
 \sv_gravity\Make things fall to the ground slower, lower value means lower gravity
 \g_grappling_hook\Players spawn with the grappling hook
 \g_jetpack\Players spawn with the jetpack
-\g_laserguided_missile\Rockets can be steered using a laser pointer
 \g_pinata\Players will drop all weapons they possessed when they are killed
 \g_weapon_stay\Weapons stay after they are picked up
 \g_weaponarena\Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups.
index 368b64b42051a078fce4369497616de234b67eee..ab9da492294e52898d5fdcd8c5b417fbe89496dc 100644 (file)
@@ -22,6 +22,7 @@ morphed
 
 *Level Design
 FruitieX
+MirceaKitsune
 
 *Music / Sound FX
 mand1nga
@@ -56,6 +57,7 @@ Kristian "morfar" Johansson
 kojn
 Maik "SavageX" Merten
 MrBougo
+Samual Lenks
 Stephan "esteel" Stahl
 Wolfgang "Blub\0" Bumiller
 
@@ -104,7 +106,6 @@ MauveBib
 Mephisto
 michaelb
 Michael "Tenshihan" Quinn
-MirceaKitsune
 Munyul
 Netzwerg
 NoelCower
@@ -117,7 +118,6 @@ Rick "Rat" Kelley
 Robert "ai" Kuroto
 Ronan
 Sajt
-Samual Lenks
 Severin "sev" Meyer
 Shaggy
 Shank