[nexuiz-commits] r8149 - in branches/nexuiz-2.0: . data data/qcsrc/client data/qcsrc/common data/qcsrc/menu data/qcsrc/menu/nexuiz data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sat Oct 17 14:05:48 EDT 2009


Author: div0
Date: 2009-10-17 14:05:47 -0400 (Sat, 17 Oct 2009)
New Revision: 8149

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/balance.cfg
   branches/nexuiz-2.0/data/balance25.cfg
   branches/nexuiz-2.0/data/balanceHavoc.cfg
   branches/nexuiz-2.0/data/balanceNexrun.cfg
   branches/nexuiz-2.0/data/balanceSamual.cfg
   branches/nexuiz-2.0/data/defaultNexuiz.cfg
   branches/nexuiz-2.0/data/effects-high.cfg
   branches/nexuiz-2.0/data/effects-low.cfg
   branches/nexuiz-2.0/data/effects-med.cfg
   branches/nexuiz-2.0/data/effects-normal.cfg
   branches/nexuiz-2.0/data/effects-omg.cfg
   branches/nexuiz-2.0/data/effects-ultimate.cfg
   branches/nexuiz-2.0/data/effects-ultra.cfg
   branches/nexuiz-2.0/data/qcsrc/client/Defs.qc
   branches/nexuiz-2.0/data/qcsrc/client/Main.qc
   branches/nexuiz-2.0/data/qcsrc/client/View.qc
   branches/nexuiz-2.0/data/qcsrc/client/main.qh
   branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
   branches/nexuiz-2.0/data/qcsrc/common/constants.qh
   branches/nexuiz-2.0/data/qcsrc/common/util.qh
   branches/nexuiz-2.0/data/qcsrc/menu/draw.qc
   branches/nexuiz-2.0/data/qcsrc/menu/menu.qh
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_effects.c
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_resolution.c
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/util.qc
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/util.qh
   branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
   branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
   branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
   branches/nexuiz-2.0/data/qcsrc/server/constants.qh
   branches/nexuiz-2.0/data/qcsrc/server/ctf.qc
   branches/nexuiz-2.0/data/qcsrc/server/defs.qh
   branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc
   branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
   branches/nexuiz-2.0/data/qcsrc/server/gamecommand.qc
   branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc
   branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
   branches/nexuiz-2.0/data/qcsrc/server/nexball.qc
   branches/nexuiz-2.0/data/qcsrc/server/race.qc
   branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc
   branches/nexuiz-2.0/data/qcsrc/server/vote.qc
   branches/nexuiz-2.0/data/qcsrc/server/w_campingrifle.qc
   branches/nexuiz-2.0/data/qcsrc/server/w_crylink.qc
   branches/nexuiz-2.0/data/qcsrc/server/w_electro.qc
   branches/nexuiz-2.0/data/qcsrc/server/w_laser.qc
Log:
r8087 | fruitiex | 2009-10-10 14:12:12 -0400 (Sat, 10 Oct 2009) | 2 lines
clientside personal records system for race/cts
r8088 | fruitiex | 2009-10-10 16:27:13 -0400 (Sat, 10 Oct 2009) | 2 lines
fix overlapping personal records timer, remove useless variable that accidentally was committed :P
r8090 | fruitiex | 2009-10-11 04:26:05 -0400 (Sun, 11 Oct 2009) | 2 lines
ctf icon-style ping when a new personal record is set
r8091 | fruitiex | 2009-10-11 06:27:17 -0400 (Sun, 11 Oct 2009) | 2 lines
show server record on the hud (race/cts)
r8092 | fruitiex | 2009-10-11 06:47:37 -0400 (Sun, 11 Oct 2009) | 2 lines
fix a stupid bug
r8104 | div0 | 2009-10-11 11:59:58 -0400 (Sun, 11 Oct 2009) | 2 lines
do not show personal records in the actual race
r8112 | fruitiex | 2009-10-12 06:05:41 -0400 (Mon, 12 Oct 2009) | 2 lines
patch by merlijn: add eventlog message when g_start_delay ends
r8113 | fruitiex | 2009-10-12 16:20:06 -0400 (Mon, 12 Oct 2009) | 2 lines
yet more balanceNexrun.cfg changes
r8114 | fruitiex | 2009-10-12 17:59:51 -0400 (Mon, 12 Oct 2009) | 2 lines
grenadelauncher tweaks, damage was way too high. balanceNexrun.cfg still needs rebalancing with proper stats! (matches should be played with physicsNexrun_defrag.cfg)
r8115 | samual | 2009-10-12 19:26:18 -0400 (Mon, 12 Oct 2009) | 1 line
Use gender-neutral kill/suicide messages
r8116 | div0 | 2009-10-13 04:20:42 -0400 (Tue, 13 Oct 2009) | 2 lines
fix menu resolution slider for older fteqcc
r8117 | fruitiex | 2009-10-13 06:52:34 -0400 (Tue, 13 Oct 2009) | 2 lines
more cleanups and bugfixes to the race hud code
r8118 | fruitiex | 2009-10-13 08:02:14 -0400 (Tue, 13 Oct 2009) | 2 lines
add more information to the record bprints (eg. previous record if broken, difference from server record)
r8119 | fruitiex | 2009-10-13 14:41:37 -0400 (Tue, 13 Oct 2009) | 2 lines
smooth crosshair effects by Taoki
r8120 | fruitiex | 2009-10-13 14:43:02 -0400 (Tue, 13 Oct 2009) | 2 lines
speed awards for CTS!
r8121 | fruitiex | 2009-10-13 14:58:22 -0400 (Tue, 13 Oct 2009) | 2 lines
NADZ vote exploit fix
r8122 | samual | 2009-10-13 22:59:07 -0400 (Tue, 13 Oct 2009) | 1 line
Make highlighted rows better by using sbar_color_bg_* when not spectating or in a team match. 
r8123 | samual | 2009-10-13 23:48:31 -0400 (Tue, 13 Oct 2009) | 1 line
Show a slight mix (0.5) of the team color in the table headers. 
r8124 | div0 | 2009-10-14 02:55:18 -0400 (Wed, 14 Oct 2009) | 2 lines
reindent View.qc before I do changes
r8125 | div0 | 2009-10-14 03:03:36 -0400 (Wed, 14 Oct 2009) | 2 lines
fix crosshair scaling fps dependency
r8126 | div0 | 2009-10-14 03:16:56 -0400 (Wed, 14 Oct 2009) | 2 lines
fix crosshair effects
r8127 | div0 | 2009-10-14 03:20:38 -0400 (Wed, 14 Oct 2009) | 2 lines
disable crosshair effects for now, they are annoying (need to be made match weapon switch delay)
r8128 | fruitiex | 2009-10-14 06:40:08 -0400 (Wed, 14 Oct 2009) | 2 lines
Fix the race server best and speed award by sending to all clients when neccessary, and add a all time fastest speed award
r8129 | fruitiex | 2009-10-14 09:33:56 -0400 (Wed, 14 Oct 2009) | 2 lines
change electro to DIY lightningun that is able to set off electro blobs, do some changes to the health system plus some other minor tweaks
r8130 | fruitiex | 2009-10-14 10:54:42 -0400 (Wed, 14 Oct 2009) | 2 lines
fix the hagar in CTS (balanceNexrun.cfg)
r8131 | fruitiex | 2009-10-14 17:37:23 -0400 (Wed, 14 Oct 2009) | 2 lines
use weaponreplace instead of sv_q3acompat_machineshotgunswap, make the uzi a bit more powerful
r8132 | div0 | 2009-10-15 01:17:43 -0400 (Thu, 15 Oct 2009) | 2 lines
sorry, FruitieX, I had to rename the database fields for top speed so they are separate for race and CTS (as maps that support both ought to use gametypefilter'd func_walls to clearly separate the modes, and thus can have different possible top speeds)
r8133 | div0 | 2009-10-15 01:34:38 -0400 (Thu, 15 Oct 2009) | 2 lines
sync crosshair effects to weapon switch delay
r8134 | div0 | 2009-10-15 02:02:44 -0400 (Thu, 15 Oct 2009) | 2 lines
sync crosshair effects to switch delay, now with fading
r8135 | div0 | 2009-10-15 03:20:21 -0400 (Thu, 15 Oct 2009) | 2 lines
force the out-of-ammo weapon switch even if the other mode still has ammo
r8136 | div0 | 2009-10-15 03:21:53 -0400 (Thu, 15 Oct 2009) | 2 lines
unless we have no other gun
r8137 | div0 | 2009-10-15 03:22:31 -0400 (Thu, 15 Oct 2009) | 2 lines
and make it work :P
r8138 | fruitiex | 2009-10-15 10:16:35 -0400 (Thu, 15 Oct 2009) | 2 lines
patch by Spaceman: use sv_adminnick in admin messages and make some whitespace changes
r8139 | fruitiex | 2009-10-15 10:17:54 -0400 (Thu, 15 Oct 2009) | 2 lines
keyhunt code cleanup patch by Spaceman
r8140 | fruitiex | 2009-10-15 17:01:52 -0400 (Thu, 15 Oct 2009) | 2 lines
weaken mortar dmg, give mortar secondary a higher radius, give rl a higher radius and a slightly higher refire rate, set weaponswitchdelay back to 0.1
r8141 | fruitiex | 2009-10-15 20:07:42 -0400 (Thu, 15 Oct 2009) | 2 lines
weaken mortar, stronger nex, settings should be rather stable now :)
r8142 | samual | 2009-10-15 21:01:19 -0400 (Thu, 15 Oct 2009) | 1 line
balanceSamual.cfg: Rebalance: Change a few small things #5
r8143 | div0 | 2009-10-16 04:32:20 -0400 (Fri, 16 Oct 2009) | 2 lines
magic ear. check deadflag too
r8144 | div0 | 2009-10-16 04:34:05 -0400 (Fri, 16 Oct 2009) | 2 lines
comment :P
r8145 | fruitiex | 2009-10-17 03:52:24 -0400 (Sat, 17 Oct 2009) | 2 lines
ammo usage completely revamped, do some rebalancing changes as well (electro mostly restored to normal, bunch of weapon damage tweaks)
r8146 | div0 | 2009-10-17 09:52:27 -0400 (Sat, 17 Oct 2009) | 2 lines
take over more stuff from balanceHavoc
r8147 | div0 | 2009-10-17 10:41:10 -0400 (Sat, 17 Oct 2009) | 2 lines
moar crosshair effect stuff: cvar crosshair_effect_scalefade, and also fade the color
r8148 | div0 | 2009-10-17 13:41:40 -0400 (Sat, 17 Oct 2009) | 2 lines
shadowmapping menu option


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/.patchsets	2009-10-17 18:05:47 UTC (rev 8149)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7945,7948-7948,7951-7990,7993-8086,8089-8089,8093-8102,8105-8110
+revisions_applied = 1-7945,7948-7948,7951-7990,7993-8148

Modified: branches/nexuiz-2.0/data/balance.cfg
===================================================================
--- branches/nexuiz-2.0/data/balance.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/balance.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -3,7 +3,7 @@
 //
 // And... don't forget to edit the other balance*.cfg too.
 
-set cvar_check_balance 1e423b95c67bac7998289473abe8feb1
+set cvar_check_balance 7f0cddd65617fa39bd3efb7942dceea9
 
 // {{{ weapon replacement
 // NOTE: this only replaces weapons on the map
@@ -53,14 +53,14 @@
 set g_start_ammo_rockets 0
 set g_start_ammo_cells 0
 set g_start_ammo_fuel 0
-set g_warmup_start_health 150 "starting values when being in warmup-stage"
+set g_warmup_start_health 250	"starting values when being in warmup-stage"
 set g_warmup_start_armor 100 "starting values when being in warmup-stage"
 set g_warmup_start_ammo_shells 50 "starting values when being in warmup-stage"
 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 150
+set g_lms_start_health 250
 set g_lms_start_armor 100
 set g_lms_start_ammo_shells 50
 set g_lms_start_ammo_nails 150
@@ -129,11 +129,11 @@
 set g_balance_pause_health_regen 5
 set g_balance_pause_health_regen_spawn 0
 set g_balance_health_rot 0
-set g_balance_health_rotlinear 5
+set g_balance_health_rotlinear 0
 set g_balance_pause_health_rot 1
 set g_balance_pause_health_rot_spawn 1
 set g_balance_health_regenstable 100
-set g_balance_health_rotstable 150
+set g_balance_health_rotstable 100
 set g_balance_health_limit 999
 set g_balance_armor_regen 0
 set g_balance_armor_regenlinear 0
@@ -256,14 +256,14 @@
 set g_balance_shotgun_secondary_bulletconstant 75 // 3.8qu
 //   }}}
 //   {{{ uzi
-set g_balance_uzi_first_damage 12
+set g_balance_uzi_first_damage 25
 set g_balance_uzi_first_force 0
 set g_balance_uzi_first_spread 0.015
-set g_balance_uzi_first_refire 0.15
+set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 6
+set g_balance_uzi_sustained_damage 7
 set g_balance_uzi_sustained_force 0
-set g_balance_uzi_sustained_spread 0.05
+set g_balance_uzi_sustained_spread 0.07
 set g_balance_uzi_sustained_refire 0.075
 set g_balance_uzi_sustained_ammo 1
 set g_balance_uzi_speed 18000
@@ -382,7 +382,7 @@
 set g_balance_minstanex_ammo 10
 //   }}}
 //   {{{ hagar
-set g_balance_hagar_primary_damage 30
+set g_balance_hagar_primary_damage 25
 set g_balance_hagar_primary_edgedamage 0
 set g_balance_hagar_primary_force 50
 set g_balance_hagar_primary_radius 90
@@ -391,7 +391,7 @@
 set g_balance_hagar_primary_lifetime 30
 set g_balance_hagar_primary_refire 0.15
 set g_balance_hagar_primary_ammo 1
-set g_balance_hagar_secondary_damage 30
+set g_balance_hagar_secondary_damage 25
 set g_balance_hagar_secondary_edgedamage 0
 set g_balance_hagar_secondary_force 50
 set g_balance_hagar_secondary_radius 90
@@ -403,7 +403,7 @@
 set g_balance_hagar_secondary_ammo 1
 //   }}}
 //   {{{ rocketlauncher
-set g_balance_rocketlauncher_damage 80
+set g_balance_rocketlauncher_damage 75
 set g_balance_rocketlauncher_edgedamage 0
 set g_balance_rocketlauncher_force 400
 set g_balance_rocketlauncher_radius 100

Modified: branches/nexuiz-2.0/data/balance25.cfg
===================================================================
--- branches/nexuiz-2.0/data/balance25.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/balance25.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -3,7 +3,7 @@
 //
 // And... don't forget to edit the other balance*.cfg too.
 
-set cvar_check_balance 1e423b95c67bac7998289473abe8feb1
+set cvar_check_balance 7f0cddd65617fa39bd3efb7942dceea9
 
 // {{{ weapon replacement
 // NOTE: this only replaces weapons on the map

Modified: branches/nexuiz-2.0/data/balanceHavoc.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceHavoc.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/balanceHavoc.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -3,7 +3,7 @@
 //
 // And... don't forget to edit the other balance*.cfg too.
 
-set cvar_check_balance 1e423b95c67bac7998289473abe8feb1
+set cvar_check_balance 7f0cddd65617fa39bd3efb7942dceea9
 
 // {{{ weapon replacement
 // NOTE: this only replaces weapons on the map

Modified: branches/nexuiz-2.0/data/balanceNexrun.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceNexrun.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/balanceNexrun.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -11,8 +11,8 @@
 // example: g_weaponreplace_nex "nex minstanex", then Nexes become MinstaNexes 50% of the times
 // set the cvars to "0" to totally disable a weapon
 set g_weaponreplace_laser ""
-set g_weaponreplace_shotgun ""
-set g_weaponreplace_uzi ""
+set g_weaponreplace_shotgun "uzi"
+set g_weaponreplace_uzi "shotgun"
 set g_weaponreplace_grenadelauncher ""
 set g_weaponreplace_electro ""
 set g_weaponreplace_crylink ""
@@ -26,7 +26,7 @@
 set g_weaponreplace_campingrifle ""
 set g_weaponreplace_tuba ""
 set g_weaponreplace_fireball 0 // Don't kill me div0, just for now until I figure out a good balance for it.
-set sv_q3acompat_machineshotgunswap 1
+set sv_q3acompat_machineshotgunswap 0
 // }}}
 
 // {{{ starting gear
@@ -46,10 +46,10 @@
 set g_start_weapon_campingrifle -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
 set g_start_weapon_tuba -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
 set g_start_weapon_fireball -1 "0 = never provide the weapon, 1 = always provide the weapon, -1 = game mode default"
-set g_balance_health_start 100
+set g_balance_health_start 125
 set g_balance_armor_start 0
 set g_start_ammo_shells 0
-set g_start_ammo_nails 80
+set g_start_ammo_nails 120
 set g_start_ammo_rockets 0
 set g_start_ammo_cells 0
 set g_start_ammo_fuel 0
@@ -82,19 +82,19 @@
 // }}}
 
 // {{{ pickup items
-set g_pickup_shells 30
-set g_pickup_shells_max 120
-set g_pickup_nails 80
-set g_pickup_nails_max 360
-set g_pickup_rockets 30
-set g_pickup_rockets_max 120
-set g_pickup_cells 50
-set g_pickup_cells_max 200
+set g_pickup_shells 10
+set g_pickup_shells_max 30
+set g_pickup_nails 30
+set g_pickup_nails_max 180
+set g_pickup_rockets 12
+set g_pickup_rockets_max 50
+set g_pickup_cells 15
+set g_pickup_cells_max 50
 set g_pickup_fuel 25
 set g_pickup_fuel_jetpack 50
 set g_pickup_fuel_max 999
 set g_pickup_armorsmall 5
-set g_pickup_armorsmall_max 100
+set g_pickup_armorsmall_max 200
 set g_pickup_armormedium 20
 set g_pickup_armormedium_max 100
 set g_pickup_armorbig 50
@@ -102,7 +102,7 @@
 set g_pickup_armorlarge 100
 set g_pickup_armorlarge_max 200
 set g_pickup_healthsmall 5
-set g_pickup_healthsmall_max 100
+set g_pickup_healthsmall_max 200
 set g_pickup_healthmedium 20
 set g_pickup_healthmedium_max 100
 set g_pickup_healthlarge 50
@@ -125,26 +125,27 @@
 
 // {{{ regen/rot
 set g_balance_health_regen 0
-set g_balance_health_regenlinear 2
-set g_balance_pause_health_regen 5
+set g_balance_health_regenlinear 0
+set g_balance_pause_health_regen 0
 set g_balance_pause_health_regen_spawn 0
 set g_balance_health_rot 0
-set g_balance_health_rotlinear 5
-set g_balance_pause_health_rot 3
-set g_balance_pause_health_rot_spawn 1
+set g_balance_health_rotlinear 1
+set g_balance_pause_health_rot 0
+set g_balance_pause_health_rot_spawn 0
 set g_balance_health_regenstable 100
 set g_balance_health_rotstable 100
-set g_balance_health_limit 200
+set g_balance_health_limit 999
 set g_balance_armor_regen 0
 set g_balance_armor_regenlinear 0
 set g_balance_armor_rot 0
-set g_balance_armor_rotlinear 0
-set g_balance_pause_armor_rot 1
-set g_balance_pause_armor_rot_spawn 1
+set g_balance_armor_rotlinear 1
+set g_balance_pause_armor_rot 0
+set g_balance_pause_armor_rot_spawn 0
 set g_balance_armor_regenstable 100
 set g_balance_armor_rotstable 100
-set g_balance_armor_limit 200
-set g_balance_armor_blockpercent 0.6
+set g_balance_armor_limit 999
+set g_balance_armor_blockpercent 0.66
+
 set g_balance_fuel_regen 0.1 "fuel regeneration (only applies if the player owns IT_FUEL_REGEN)"
 set g_balance_fuel_regenlinear 0
 set g_balance_pause_fuel_regen 2 // other than this, fuel uses the health regen counter
@@ -158,8 +159,8 @@
 // }}}
 
 // {{{ misc
-set g_balance_selfdamagepercent 0.6
-set g_balance_weaponswitchdelay 0
+set g_balance_selfdamagepercent 0.5
+set g_balance_weaponswitchdelay 0.1
 set g_weaponspeedfactor 1 "weapon projectile speed multiplier"
 set g_weaponratefactor 1 "weapon fire rate multiplier"
 set g_weapondamagefactor 1 "weapon damage multiplier"
@@ -178,9 +179,9 @@
 set g_projectiles_newton_style_2_minfactor 0.7
 set g_projectiles_newton_style_2_maxfactor 5
 set g_balance_falldamage_deadminspeed 150
-set g_balance_falldamage_minspeed 600
-set g_balance_falldamage_factor 0.15
-set g_balance_falldamage_maxdamage 25
+set g_balance_falldamage_minspeed 675
+set g_balance_falldamage_factor 0.25
+set g_balance_falldamage_maxdamage 10
 // }}}
 
 // {{{ powerups
@@ -218,8 +219,8 @@
 set g_balance_laser_primary_damage 35
 set g_balance_laser_primary_edgedamage 10
 set g_balance_laser_primary_force 100
-set g_balance_laser_primary_radius 50
-set g_balance_laser_primary_speed 1500
+set g_balance_laser_primary_radius 2
+set g_balance_laser_primary_speed 2500
 set g_balance_laser_primary_refire 0
 set g_balance_laser_primary_animtime 0.1
 set g_balance_laser_primary_lifetime 0.066
@@ -228,8 +229,8 @@
 set g_balance_laser_secondary_damage 50
 set g_balance_laser_secondary_edgedamage 1
 set g_balance_laser_secondary_force 100
-set g_balance_laser_secondary_radius 65
-set g_balance_laser_secondary_speed 1500
+set g_balance_laser_secondary_radius 2
+set g_balance_laser_secondary_speed 2500
 set g_balance_laser_secondary_refire 0
 set g_balance_laser_secondary_animtime 0.15
 set g_balance_laser_secondary_lifetime 0.066
@@ -242,83 +243,83 @@
 set g_balance_shotgun_primary_spread 0.2
 set g_balance_shotgun_primary_refire 1
 set g_balance_shotgun_primary_animtime 1
-set g_balance_shotgun_primary_ammo 1
+set g_balance_shotgun_primary_ammo 2
 set g_balance_shotgun_primary_speed 12000
 set g_balance_shotgun_primary_bulletconstant 75 // 3.8qu
 set g_balance_shotgun_secondary_bullets 15
-set g_balance_shotgun_secondary_damage 4
+set g_balance_shotgun_secondary_damage 6
 set g_balance_shotgun_secondary_force 0
 set g_balance_shotgun_secondary_spread 0.4
-set g_balance_shotgun_secondary_refire 1.5
-set g_balance_shotgun_secondary_animtime 0.2
+set g_balance_shotgun_secondary_refire 2
+set g_balance_shotgun_secondary_animtime 0.5
 set g_balance_shotgun_secondary_ammo 1
 set g_balance_shotgun_secondary_speed 12000
 set g_balance_shotgun_secondary_bulletconstant 75 // 3.8qu
 //   }}}
 //   {{{ uzi
-set g_balance_uzi_first_damage 8
-set g_balance_uzi_first_force 0
-set g_balance_uzi_first_spread 0.015
+set g_balance_uzi_first_damage 10
+set g_balance_uzi_first_force 50
+set g_balance_uzi_first_spread 0.007
 set g_balance_uzi_first_refire 0.15
-set g_balance_uzi_first_ammo 1
-set g_balance_uzi_sustained_damage 6
-set g_balance_uzi_sustained_force 0
-set g_balance_uzi_sustained_spread 0.05
+set g_balance_uzi_first_ammo 2
+set g_balance_uzi_sustained_damage 7
+set g_balance_uzi_sustained_force 30
+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_damage 50
-set g_balance_grenadelauncher_primary_edgedamage 38
-set g_balance_grenadelauncher_primary_force 300
+set g_balance_grenadelauncher_primary_damage 45
+set g_balance_grenadelauncher_primary_edgedamage 35
+set g_balance_grenadelauncher_primary_force 250
 set g_balance_grenadelauncher_primary_radius 140
-set g_balance_grenadelauncher_primary_speed 2200
-set g_balance_grenadelauncher_primary_speed_up 220
+set g_balance_grenadelauncher_primary_speed 2000
+set g_balance_grenadelauncher_primary_speed_up 200
 set g_balance_grenadelauncher_primary_lifetime 30
 set g_balance_grenadelauncher_primary_refire 0.8
 set g_balance_grenadelauncher_primary_animtime 0.8
 set g_balance_grenadelauncher_primary_ammo 2
-set g_balance_grenadelauncher_secondary_damage 60
-set g_balance_grenadelauncher_secondary_edgedamage 38
-set g_balance_grenadelauncher_secondary_force 300
-set g_balance_grenadelauncher_secondary_radius 140
-set g_balance_grenadelauncher_secondary_speed 1000
-set g_balance_grenadelauncher_secondary_speed_up 150
-set g_balance_grenadelauncher_secondary_lifetime 1
+set g_balance_grenadelauncher_secondary_damage 40
+set g_balance_grenadelauncher_secondary_edgedamage 35
+set g_balance_grenadelauncher_secondary_force 250
+set g_balance_grenadelauncher_secondary_radius 200
+set g_balance_grenadelauncher_secondary_speed 800
+set g_balance_grenadelauncher_secondary_speed_up 0
+set g_balance_grenadelauncher_secondary_lifetime 1.6
 set g_balance_grenadelauncher_secondary_refire 0.7
-set g_balance_grenadelauncher_secondary_animtime 0.8
+set g_balance_grenadelauncher_secondary_animtime 0.7
 set g_balance_grenadelauncher_secondary_ammo 2
 set g_balance_grenadelauncher_secondary_health 70
 set g_balance_grenadelauncher_secondary_damageforcescale 4
 //   }}}
 //   {{{ electro
-set g_balance_electro_primary_damage 65
-set g_balance_electro_primary_edgedamage 0
-set g_balance_electro_primary_force 125
-set g_balance_electro_primary_radius 150
-set g_balance_electro_primary_comboradius 0
+set g_balance_electro_primary_damage 45
+set g_balance_electro_primary_edgedamage 5
+set g_balance_electro_primary_force 150
+set g_balance_electro_primary_radius 90
+set g_balance_electro_primary_comboradius 150
 set g_balance_electro_primary_speed 2000
-set g_balance_electro_primary_lifetime 30
-set g_balance_electro_primary_refire 0.6
-set g_balance_electro_primary_animtime 0.3
+set g_balance_electro_primary_lifetime 0.5
+set g_balance_electro_primary_refire 1
+set g_balance_electro_primary_animtime 1
 set g_balance_electro_primary_ammo 2
-set g_balance_electro_secondary_damage 50
-set g_balance_electro_secondary_spread 0.05
+set g_balance_electro_secondary_damage 30
+set g_balance_electro_secondary_spread 0.20
 set g_balance_electro_secondary_edgedamage 0
 set g_balance_electro_secondary_force 100
 set g_balance_electro_secondary_radius 150
 set g_balance_electro_secondary_speed 900
 set g_balance_electro_secondary_speed_up 200
 set g_balance_electro_secondary_lifetime 2.5
-set g_balance_electro_secondary_refire 0.2
+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_ammo 2
 set g_balance_electro_secondary_health 5
 set g_balance_electro_secondary_damageforcescale 4
-set g_balance_electro_secondary_count 3
+set g_balance_electro_secondary_count 5
 set g_balance_electro_combo_damage 50
 set g_balance_electro_combo_edgedamage 0
 set g_balance_electro_combo_force 100
@@ -329,7 +330,7 @@
 //   {{{ crylink
 set g_balance_crylink_primary_damage 14
 set g_balance_crylink_primary_edgedamage 0
-set g_balance_crylink_primary_force -55
+set g_balance_crylink_primary_force 30
 set g_balance_crylink_primary_radius 80
 set g_balance_crylink_primary_speed 7000
 set g_balance_crylink_primary_spread 0.01
@@ -337,7 +338,7 @@
 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_ammo 3
 set g_balance_crylink_primary_bouncedamagefactor 0.5
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
@@ -347,10 +348,10 @@
 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_secondary_damage 10
+set g_balance_crylink_secondary_damage 6
 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_radius 50
 set g_balance_crylink_secondary_speed 3000
 set g_balance_crylink_secondary_spread 0.02
 set g_balance_crylink_secondary_shots 3
@@ -366,7 +367,7 @@
 set g_balance_crylink_secondary_line_fadetime 2
 //   }}}
 //   {{{ nex
-set g_balance_nex_damage 80
+set g_balance_nex_damage 90
 set g_balance_nex_force 200
 set g_balance_nex_refire 1.5
 set g_balance_nex_animtime 1.5
@@ -377,24 +378,24 @@
 set g_balance_nex_damagefalloff_forcehalflife 1500
 //   }}}
 //   {{{ minstanex
-set g_balance_minstanex_refire 1
-set g_balance_minstanex_animtime 0.3
+set g_balance_minstanex_refire 1.5
+set g_balance_minstanex_animtime 1.5
 set g_balance_minstanex_ammo 10
 //   }}}
 //   {{{ hagar
-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_damage 15
+set g_balance_hagar_primary_edgedamage 10
+set g_balance_hagar_primary_force 65
+set g_balance_hagar_primary_radius 90
+set g_balance_hagar_primary_spread 0
+set g_balance_hagar_primary_speed 2000
 set g_balance_hagar_primary_lifetime 30
-set g_balance_hagar_primary_refire 0.15
-set g_balance_hagar_primary_ammo 1
-set g_balance_hagar_secondary_damage 20
+set g_balance_hagar_primary_refire 0.1
+set g_balance_hagar_primary_ammo 0.5
+set g_balance_hagar_secondary_damage 15
 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_force 60
+set g_balance_hagar_secondary_radius 70
 set g_balance_hagar_secondary_spread 0.05
 set g_balance_hagar_secondary_speed 2000
 set g_balance_hagar_secondary_lifetime_min 0.1
@@ -406,13 +407,13 @@
 set g_balance_rocketlauncher_damage 80
 set g_balance_rocketlauncher_edgedamage 40
 set g_balance_rocketlauncher_force 400
-set g_balance_rocketlauncher_radius 90
+set g_balance_rocketlauncher_radius 150
 set g_balance_rocketlauncher_speed 1100
 set g_balance_rocketlauncher_speedaccel 0
 set g_balance_rocketlauncher_speedstart 1100
 set g_balance_rocketlauncher_lifetime 30
-set g_balance_rocketlauncher_refire 1
-set g_balance_rocketlauncher_animtime 1
+set g_balance_rocketlauncher_refire 1.2
+set g_balance_rocketlauncher_animtime 1.2
 set g_balance_rocketlauncher_ammo 3
 set g_balance_rocketlauncher_health 40
 set g_balance_rocketlauncher_damageforcescale 4
@@ -469,7 +470,7 @@
 set g_balance_hlac_primary_lifetime 5
 
 set g_balance_hlac_primary_refire 0.2
-set g_balance_hlac_primary_animtime 0.05
+set g_balance_hlac_primary_animtime 0.2
 set g_balance_hlac_primary_ammo 1
 
 set g_balance_hlac_secondary_spread 0.06
@@ -483,7 +484,7 @@
 set g_balance_hlac_secondary_lifetime 5
 
 set g_balance_hlac_secondary_refire 1
-set g_balance_hlac_secondary_animtime 0.3
+set g_balance_hlac_secondary_animtime 1
 set g_balance_hlac_secondary_ammo 10
 set g_balance_hlac_secondary_shots 5
 //   }}}
@@ -494,13 +495,13 @@
 set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
 set g_balance_campingrifle_tracer 1
 set g_balance_campingrifle_primary_damage 50
-set g_balance_campingrifle_primary_headshotaddeddamage 50
+set g_balance_campingrifle_primary_headshotaddeddamage 80
 set g_balance_campingrifle_primary_spread 0
 set g_balance_campingrifle_primary_force 0
 set g_balance_campingrifle_primary_speed 35000
 set g_balance_campingrifle_primary_lifetime 5
 set g_balance_campingrifle_primary_refire 0.7
-set g_balance_campingrifle_primary_animtime 0.3
+set g_balance_campingrifle_primary_animtime 0.7
 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

Modified: branches/nexuiz-2.0/data/balanceSamual.cfg
===================================================================
--- branches/nexuiz-2.0/data/balanceSamual.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/balanceSamual.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -3,7 +3,7 @@
 //
 // And... don't forget to edit the other balance*.cfg too.
 
-set cvar_check_balance 1e423b95c67bac7998289473abe8feb1
+set cvar_check_balance 7f0cddd65617fa39bd3efb7942dceea9
 
 // {{{ weapon replacement
 // NOTE: this only replaces weapons on the map
@@ -23,7 +23,7 @@
 set g_weaponreplace_porto ""
 set g_weaponreplace_minstanex ""
 set g_weaponreplace_hook ""
-set g_weaponreplace_hlac 0
+set g_weaponreplace_hlac 0 // I don't particularly like this weapon.
 set g_weaponreplace_campingrifle ""
 set g_weaponreplace_tuba ""
 set g_weaponreplace_fireball 0 // Don't kill me div0, just for now until I figure out a good balance for it.
@@ -285,7 +285,7 @@
 set g_balance_grenadelauncher_secondary_edgedamage 38
 set g_balance_grenadelauncher_secondary_force 400
 set g_balance_grenadelauncher_secondary_radius 140
-set g_balance_grenadelauncher_secondary_speed 1000
+set g_balance_grenadelauncher_secondary_speed 1400
 set g_balance_grenadelauncher_secondary_speed_up 150
 set g_balance_grenadelauncher_secondary_lifetime 1
 set g_balance_grenadelauncher_secondary_refire 0.7
@@ -418,7 +418,7 @@
 set g_balance_rocketlauncher_health 40
 set g_balance_rocketlauncher_damageforcescale 4
 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 120 // max degrees per second
+set g_balance_rocketlauncher_guiderate 125 // 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

Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -26,7 +26,7 @@
 seta g_configversion 0	"Configuration file version (used to upgrade settings) 0: first run, or previous start was <2.4.1  Later, it's overridden by config.cfg, version ranges are defined in config_update.cfg"
 
 // default.cfg versioning (update using update-cvarcount.sh, run that every time after adding a new cvar)
-set cvar_check_default 37cc3aae4b042acd9cf2b71135034bcf
+set cvar_check_default 5d48426c72cdfbf78480870c75601f89
 
 // Nexuiz version (formatted for machines)
 // used to determine if a client version is compatible
@@ -113,6 +113,8 @@
 crosshair 1
 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_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"
@@ -1656,8 +1658,6 @@
 
 seta cl_noantilag 0 "turn this on if you believe antilag is bad"
 
-r_shadow_shadowmapping 1
-
 set sv_pitch_min -35 "minimum aiming angle for shooting direction display of the gun"
 set sv_pitch_max  35 "maximum aiming angle for shooting direction display of the gun"
 set sv_pitch_fixyaw 1 "workaround to fix the aiming direction on stupidly made player models, FIXME fix the models and set this to 0"

Modified: branches/nexuiz-2.0/data/effects-high.cfg
===================================================================
--- branches/nexuiz-2.0/data/effects-high.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/effects-high.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -21,6 +21,7 @@
 r_shadow_realtime_dlight_shadows 0
 r_shadow_realtime_world 0
 r_shadow_realtime_world_shadows 0
+r_shadow_shadowmapping 0
 r_shadow_usenormalmap 1
 r_showsurfaces 0
 r_subdivisions_tolerance 3

Modified: branches/nexuiz-2.0/data/effects-low.cfg
===================================================================
--- branches/nexuiz-2.0/data/effects-low.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/effects-low.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -21,6 +21,7 @@
 r_shadow_realtime_dlight_shadows 0
 r_shadow_realtime_world 0
 r_shadow_realtime_world_shadows 0
+r_shadow_shadowmapping 0
 r_shadow_usenormalmap 0
 r_showsurfaces 0
 r_subdivisions_tolerance 8

Modified: branches/nexuiz-2.0/data/effects-med.cfg
===================================================================
--- branches/nexuiz-2.0/data/effects-med.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/effects-med.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -21,6 +21,7 @@
 r_shadow_realtime_dlight_shadows 0
 r_shadow_realtime_world 0
 r_shadow_realtime_world_shadows 0
+r_shadow_shadowmapping 0
 r_shadow_usenormalmap 0
 r_showsurfaces 0
 r_subdivisions_tolerance 4

Modified: branches/nexuiz-2.0/data/effects-normal.cfg
===================================================================
--- branches/nexuiz-2.0/data/effects-normal.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/effects-normal.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -21,6 +21,7 @@
 r_shadow_realtime_dlight_shadows 0
 r_shadow_realtime_world 0
 r_shadow_realtime_world_shadows 0
+r_shadow_shadowmapping 0
 r_shadow_usenormalmap 1
 r_showsurfaces 0
 r_subdivisions_tolerance 3

Modified: branches/nexuiz-2.0/data/effects-omg.cfg
===================================================================
--- branches/nexuiz-2.0/data/effects-omg.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/effects-omg.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -21,6 +21,7 @@
 r_shadow_realtime_dlight_shadows 0
 r_shadow_realtime_world 0
 r_shadow_realtime_world_shadows 0
+r_shadow_shadowmapping 0
 r_shadow_usenormalmap 0
 r_showsurfaces 3
 r_subdivisions_tolerance 16

Modified: branches/nexuiz-2.0/data/effects-ultimate.cfg
===================================================================
--- branches/nexuiz-2.0/data/effects-ultimate.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/effects-ultimate.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -21,6 +21,7 @@
 r_shadow_realtime_dlight_shadows 1
 r_shadow_realtime_world 1
 r_shadow_realtime_world_shadows 1
+r_shadow_shadowmapping 1
 r_shadow_usenormalmap 1
 r_showsurfaces 0
 r_subdivisions_tolerance 1

Modified: branches/nexuiz-2.0/data/effects-ultra.cfg
===================================================================
--- branches/nexuiz-2.0/data/effects-ultra.cfg	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/effects-ultra.cfg	2009-10-17 18:05:47 UTC (rev 8149)
@@ -21,6 +21,7 @@
 r_shadow_realtime_dlight_shadows 1
 r_shadow_realtime_world 1
 r_shadow_realtime_world_shadows 1
+r_shadow_shadowmapping 1
 r_shadow_usenormalmap 1
 r_showsurfaces 0
 r_subdivisions_tolerance 2

Modified: branches/nexuiz-2.0/data/qcsrc/client/Defs.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/Defs.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/client/Defs.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -192,6 +192,11 @@
 float race_penaltyeventtime; // time when the player got the penalty
 float race_penaltytime; // duration of penalty time, in tenths
 string race_penaltyreason; // reason for penalty
+float race_server_record; // server record
+float race_speedaward;
+string race_speedaward_holder;
+float race_speedaward_alltimebest;
+string race_speedaward_alltimebest_holder;
 
 // RACE
 float race_mycheckpoint;
@@ -221,6 +226,7 @@
 
 // database for misc stuff
 float tempdb;
+float ClientProgsDB;
 vector hook_shotorigin;
 
 #ifdef BLURTEST

Modified: branches/nexuiz-2.0/data/qcsrc/client/Main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/Main.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/client/Main.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -65,6 +65,7 @@
 
 	binddb = db_create();
 	tempdb = db_create();
+	ClientProgsDB = db_load("client.db");
 	compressShortVector_init();
 
 	drawfont = 0;
@@ -167,6 +168,8 @@
 	remove(players);
 	db_close(binddb);
 	db_close(tempdb);
+	db_save(ClientProgsDB, "client.db");
+	db_close(ClientProgsDB);
 
 	cvar_clientsettemp_restore();
 
@@ -935,6 +938,8 @@
 
 	armorblockpercent = ReadByte() / 255.0;
 
+	g_weaponswitchdelay = ReadByte() / 255.0;
+
 	if(!postinit)
 		PostInit();
 }
@@ -1024,6 +1029,18 @@
 				strunzone(race_penaltyreason);
 			race_penaltyreason = strzone(ReadString());
 			break;
+
+		case RACE_NET_SERVER_RECORD:
+			race_server_record = ReadInt24_t();
+			break;
+		case RACE_NET_SPEED_AWARD:
+			race_speedaward = ReadShort();
+			race_speedaward_holder = strzone(ReadString());
+			break;
+		case RACE_NET_SPEED_AWARD_BEST:
+			race_speedaward_alltimebest = ReadShort();
+			race_speedaward_alltimebest_holder = strzone(ReadString());
+			break;
 	}
 }
 

Modified: branches/nexuiz-2.0/data/qcsrc/client/View.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/View.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/client/View.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -153,9 +153,9 @@
 	{
 		if(spectatorbutton_zoom)
 			zoomdir = 0 + !zoomdir;
-			// do not even THINK about removing this 0
-			// _I_ know what I am doing
-			// fteqcc does not
+		// do not even THINK about removing this 0
+		// _I_ know what I am doing
+		// fteqcc does not
 	}
 
 	if(zoomdir)
@@ -208,6 +208,16 @@
 float zoomscript_caught;
 
 vector wcross_origin;
+float wcross_scale_prev, wcross_alpha_prev;
+vector wcross_color_prev;
+float wcross_scale_goal_prev, wcross_alpha_goal_prev;
+vector wcross_color_goal_prev;
+float wcross_changedonetime;
+
+string wcross_name_goal_prev, wcross_name_goal_prev_prev;
+float wcross_resolution_goal_prev, wcross_resolution_goal_prev_prev;
+float wcross_name_changestarttime, wcross_name_changedonetime;
+float wcross_name_alpha_goal_prev, wcross_name_alpha_goal_prev_prev;
 entity trueaim;
 entity trueaim_rifle;
 
@@ -237,8 +247,8 @@
 		return SHOTTYPE_HITWORLD;
 	t = GetPlayerColor(trace_networkentity - 1);
 	if(teamplay)
-	if(t == myteam)
-		return SHOTTYPE_HITTEAM;
+		if(t == myteam)
+			return SHOTTYPE_HITTEAM;
 	if(t == COLOR_SPECTATOR)
 		return SHOTTYPE_HITWORLD;
 	return SHOTTYPE_HITENEMY;
@@ -305,7 +315,7 @@
 	shottype = EnemyHitCheck();
 	if(shottype != SHOTTYPE_HITWORLD)
 		return shottype;
-	
+
 #if 0
 	// FIXME WHY DOES THIS NOT WORK FOR THE ROCKET LAUNCHER?
 	// or rather, I know why, but see no fix
@@ -313,7 +323,7 @@
 		// yes, this is an ugly hack... but it seems good enough to find out whether the test hits the same place as the initial trace
 		return SHOTTYPE_HITOBSTRUCTION;
 #endif
-	
+
 	return SHOTTYPE_HITWORLD;
 }
 
@@ -391,11 +401,11 @@
 		PostInit();
 
 	if(intermission && !isdemo() && !(calledhooks & HOOK_END))
-	if(calledhooks & HOOK_START)
-	{
-		localcmd("\ncl_hook_gameend;");
-		calledhooks |= HOOK_END;
-	}
+		if(calledhooks & HOOK_START)
+		{
+			localcmd("\ncl_hook_gameend;");
+			calledhooks |= HOOK_END;
+		}
 
 	CheckForGamestartChange();
 	maptimeAnnouncer();
@@ -492,10 +502,10 @@
 
 	// Update the mouse position
 	/*
-	mousepos_x = vid_conwidth;
-	mousepos_y = vid_conheight;
-	mousepos = mousepos*0.5 + getmousepos();
-	*/
+	   mousepos_x = vid_conwidth;
+	   mousepos_y = vid_conheight;
+	   mousepos = mousepos*0.5 + getmousepos();
+	 */
 
 	e = self;
 	for(self = world; (self = nextent(self)); )
@@ -523,9 +533,9 @@
 		menu_show();
 
 	/*if(gametype == GAME_CTF)
-	{
-		ctf_view();
-	} else */
+	  {
+	  ctf_view();
+	  } else */
 
 	// draw 2D entities
 	e = self;
@@ -536,67 +546,67 @@
 
 	// draw radar
 	if(
-		ons_showmap
-		||
-		(
-			!scoreboard_active
-			&&
-			cvar_string("cl_teamradar") != "0"
-			&&
+			ons_showmap
+			||
 			(
-				cvar("cl_teamradar") == 2
-				||
-				teamplay
+			 !scoreboard_active
+			 &&
+			 cvar_string("cl_teamradar") != "0"
+			 &&
+			 (
+			  cvar("cl_teamradar") == 2
+			  ||
+			  teamplay
+			 )
 			)
-		)
-	)
+	  )
 		teamradar_view();
 
 	// draw sbar
- 	if(cvar("r_letterbox") == 0) {
+	if(cvar("r_letterbox") == 0) {
 		if (cvar("cl_showpressedkeys")) { // draw pressed keys when spectating and playing
 			if(spectatee_status > 0 || cvar("cl_showpressedkeys") >= 2)
 				Sbar_DrawPressedKeys();
 		}
-		
+
 		if (cvar("cl_showspeed"))
 			Sbar_ShowSpeed();
 		if (cvar("cl_showacceleration"))
 			Sbar_ShowAcceleration();
-		
- 		Sbar_DrawCenterPrint(); // draw centerprint messages even if viewsize >= 120
+
+		Sbar_DrawCenterPrint(); // draw centerprint messages even if viewsize >= 120
 	}
 
-    float hud;
-    hud = getstati(STAT_HUD);
-    if(hud == HUD_SPIDERBOT)
-    {
-        vector sz;
-        CSQC_spider_HUD();
-        sz = drawgetimagesize(SPIDER_CROSS);
-        sz_x *= cvar_or("cl_vehicle_spiderbot_cross_size",1);
-        sz_y *= cvar_or("cl_vehicle_spiderbot_cross_size",1);
-        drawpic('0.5 0 0' * (vid_conwidth - sz_x) + '0 0.5 0' * (vid_conheight - sz_y), SPIDER_CROSS, sz, '1 1 1', cvar_or("cl_vehicle_spiderbot_cross_alpha",0.6), DRAWFLAG_NORMAL);
-    }
-    else
-    {
-        if(cvar("r_letterbox") == 0)
-            if(cvar("viewsize") < 120)
-                CSQC_common_hud();
+	float hud;
+	hud = getstati(STAT_HUD);
+	if(hud == HUD_SPIDERBOT)
+	{
+		vector sz;
+		CSQC_spider_HUD();
+		sz = drawgetimagesize(SPIDER_CROSS);
+		sz_x *= cvar_or("cl_vehicle_spiderbot_cross_size",1);
+		sz_y *= cvar_or("cl_vehicle_spiderbot_cross_size",1);
+		drawpic('0.5 0 0' * (vid_conwidth - sz_x) + '0 0.5 0' * (vid_conheight - sz_y), SPIDER_CROSS, sz, '1 1 1', cvar_or("cl_vehicle_spiderbot_cross_alpha",0.6), DRAWFLAG_NORMAL);
+	}
+	else
+	{
+		if(cvar("r_letterbox") == 0)
+			if(cvar("viewsize") < 120)
+				CSQC_common_hud();
 
-        // crosshair goes VERY LAST
-        if(!scoreboard_active && !ons_showmap && !camera_active) {
+		// crosshair goes VERY LAST
+		if(!scoreboard_active && !ons_showmap && !camera_active) {
 			// TrueAim check
 			float shottype;
 			float bullets, ring_scale;
 			// wcross_origin = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
 			wcross_origin = project_3d_to_2d(view_origin + MAX_SHOT_DISTANCE * view_forward);
 			wcross_origin_z = 0;
-            if(cvar("crosshair_hittest"))
+			if(cvar("crosshair_hittest"))
 			{
 				vector wcross_oldorigin;
 				wcross_oldorigin = wcross_origin;
-                shottype = TrueAimCheck();
+				shottype = TrueAimCheck();
 				if(shottype == SHOTTYPE_HITWORLD)
 				{
 					v = wcross_origin - wcross_oldorigin;
@@ -608,54 +618,111 @@
 				if(!cvar("crosshair_hittest_showimpact"))
 					wcross_origin = wcross_oldorigin;
 			}
-            else
-                shottype = SHOTTYPE_HITWORLD;
+			else
+				shottype = SHOTTYPE_HITWORLD;
 
-            string wcross_style;
-            wcross_style = cvar_string("crosshair");
+			string wcross_style;
+			wcross_style = cvar_string("crosshair");
 
-            if (wcross_style != "0") {
-                vector wcross_color, wcross_size;
-                string wcross_wep, wcross_name;
-                float wcross_alpha, wcross_sizefloat;
+			if (wcross_style != "0") {
+				vector wcross_color, wcross_size;
+				string wcross_wep, wcross_name;
+				float wcross_alpha, wcross_scale, wcross_blur, wcross_resolution;
 
-                wcross_color_x = cvar("crosshair_color_red");
-                wcross_color_y = cvar("crosshair_color_green");
-                wcross_color_z = cvar("crosshair_color_blue");
-                wcross_alpha = cvar("crosshair_color_alpha") * (1-cvar("_menu_alpha"));
-                wcross_sizefloat = cvar("crosshair_size") * (1-cvar("_menu_alpha"));
-                if (cvar("crosshair_per_weapon")) {
-                    e = get_weaponinfo(activeweapon);
-                    if (e && e.netname != "")
-                    {
-                        wcross_wep = e.netname;
-                        wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
-                        if(wcross_style == "")
-                            wcross_style = e.netname;
+				wcross_color_x = cvar("crosshair_color_red");
+				wcross_color_y = cvar("crosshair_color_green");
+				wcross_color_z = cvar("crosshair_color_blue");
+				wcross_alpha = cvar("crosshair_color_alpha");
+				wcross_resolution = cvar("crosshair_size");
+				if (cvar("crosshair_per_weapon")) {
+					e = get_weaponinfo(activeweapon);
+					if (e && e.netname != "")
+					{
+						wcross_wep = e.netname;
+						wcross_style = cvar_string(strcat("crosshair_", wcross_wep));
+						if(wcross_style == "")
+							wcross_style = e.netname;
 
-                        if(!cvar("crosshair_color_override"))
-                        {
-                            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"));
-                        }
+						if(!cvar("crosshair_color_override"))
+						{
+							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_alpha *= cvar(strcat("crosshair_", wcross_wep, "_color_alpha"));
-                        wcross_sizefloat *= cvar(strcat("crosshair_", wcross_wep, "_size"));
-                    }
-                }
+						wcross_alpha *= cvar(strcat("crosshair_", wcross_wep, "_color_alpha"));
+						wcross_resolution *= cvar(strcat("crosshair_", wcross_wep, "_size"));
+					}
+				}
 
-                wcross_name = strcat("gfx/crosshair", wcross_style);
+				wcross_name = strcat("gfx/crosshair", wcross_style);
 
+				if(cvar("crosshair_effect_scalefade"))
+				{
+					wcross_scale = wcross_resolution;
+					wcross_resolution = 1;
+				}
+				else
+				{
+					wcross_scale = 1;
+				}
+
 				if(shottype == SHOTTYPE_HITENEMY)
-					wcross_sizefloat *= cvar("crosshair_hittest"); // is not queried if hittest is 0
+					wcross_scale *= cvar("crosshair_hittest"); // is not queried if hittest is 0
 				if(shottype == SHOTTYPE_HITTEAM)
-					wcross_sizefloat /= cvar("crosshair_hittest"); // is not queried if hittest is 0
+					wcross_scale /= cvar("crosshair_hittest"); // is not queried if hittest is 0
 
-                wcross_size = drawgetimagesize(wcross_name);
-                wcross_size_x *= wcross_sizefloat;
-                wcross_size_y *= wcross_sizefloat;
-				
+				f = cvar("crosshair_effect_speed");
+				if(f < 0)
+					f *= -2 * g_weaponswitchdelay;
+				if(wcross_scale != wcross_scale_goal_prev || wcross_alpha != wcross_alpha_goal_prev || wcross_color != wcross_color_goal_prev)
+				{
+					wcross_changedonetime = time + f;
+				}
+				if(wcross_name != wcross_name_goal_prev || wcross_resolution != wcross_resolution_goal_prev)
+				{
+					wcross_name_changestarttime = time;
+					wcross_name_changedonetime = time + f;
+					if(wcross_name_goal_prev_prev)
+						strunzone(wcross_name_goal_prev_prev);
+					wcross_name_goal_prev_prev = wcross_name_goal_prev;
+					wcross_name_goal_prev = strzone(wcross_name);
+					wcross_name_alpha_goal_prev_prev = wcross_name_alpha_goal_prev;
+					wcross_resolution_goal_prev_prev = wcross_resolution_goal_prev;
+					wcross_resolution_goal_prev = wcross_resolution;
+				}
+
+				wcross_scale_goal_prev = wcross_scale;
+				wcross_alpha_goal_prev = wcross_alpha;
+				wcross_color_goal_prev = wcross_color;
+
+				if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && cvar("crosshair_hittest_blur") && !cvar("chase_active")))
+				{
+					wcross_blur = 1;
+					wcross_alpha *= 0.75;
+				}
+				else
+					wcross_blur = 0;
+				// *_prev is at time-frametime
+				// * is at wcross_changedonetime+f
+				// what do we have at time?
+				if(time < wcross_changedonetime)
+				{
+					f = frametime / (wcross_changedonetime - time + frametime);
+					wcross_scale = f * wcross_scale + (1 - f) * wcross_scale_prev;
+					wcross_alpha = f * wcross_alpha + (1 - f) * wcross_alpha_prev;
+					wcross_color = f * wcross_color + (1 - f) * wcross_color_prev;
+				}
+
+				wcross_scale_prev = wcross_scale;
+				wcross_alpha_prev = wcross_alpha;
+				wcross_color_prev = wcross_color;
+
+				wcross_scale *= 1 - cvar("_menu_alpha");
+				wcross_alpha *= 1 - cvar("_menu_alpha");
+
+				wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+
 				// ring around crosshair representing bullets left in camping rifle clip
 				if (activeweapon == WEP_CAMPINGRIFLE)
 				{
@@ -664,28 +731,74 @@
 				}
 				else
 					bullets = 0;
-				
-                if(shottype == SHOTTYPE_HITTEAM || (shottype == SHOTTYPE_HITOBSTRUCTION && cvar("crosshair_hittest_blur") && !cvar("chase_active")))
-                {
-                    wcross_alpha *= 0.04 * 0.75;
-                    for(i = -2; i <= 2; ++i)
-                        for(j = -2; j <= 2; ++j)
-						{
-							if (bullets)
-								drawpic(wcross_origin - '0.5 0 0' * (wcross_size_x * ring_scale + i) - '0 0.5 0' * (wcross_size_y * ring_scale + j), strcat("gfx/hud/rifle_ring_", ftos(bullets)), wcross_size * ring_scale, wcross_color, wcross_alpha, DRAWFLAG_NORMAL);
-                            drawpic(wcross_origin - '0.5 0 0' * (wcross_size_x + i) - '0 0.5 0' * (wcross_size_y + j), wcross_name, wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL);
-						}
-                }
-                else
-                {
-					if (bullets)
-						drawpic(wcross_origin - '0.5 0 0' * (wcross_size_x * ring_scale) - '0 0.5 0' * (wcross_size_y * ring_scale), strcat("gfx/hud/rifle_ring_", ftos(bullets)), wcross_size * ring_scale, wcross_color, wcross_alpha, DRAWFLAG_NORMAL);
-                    drawpic(wcross_origin - '0.5 0 0' * (wcross_size_x) - '0 0.5 0' * ( wcross_size_y), wcross_name, wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL);
-                }
-            }
-        }
-    }
 
+#define CROSSHAIR_DRAW_RING(i,j,sz,dummy1,dummy2) \
+				drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x * ring_scale + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y * ring_scale + j * wcross_blur)), strcat("gfx/hud/rifle_ring_", ftos(bullets)), sz * wcross_size * ring_scale, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
+
+#define CROSSHAIR_DO_BLUR(M,sz,a,b) \
+				do \
+				{ \
+					if(wcross_blur > 0) \
+					{ \
+						wcross_alpha = wcross_alpha * 0.04; \
+						for(i = -2; i <= 2; ++i) \
+							for(j = -2; j <= 2; ++j) \
+								M(i,j,sz,a,b); \
+					} \
+					else \
+					{ \
+						M(0,0,sz,a,b); \
+					} \
+				} \
+				while(0)
+
+#define CROSSHAIR_DRAW_SINGLE(i,j,sz,wcross_name,wcross_alpha) \
+				drawpic(wcross_origin - ('0.5 0 0' * (sz * wcross_size_x + i * wcross_blur) + '0 0.5 0' * (sz * wcross_size_y + j * wcross_blur)), wcross_name, sz * wcross_size, wcross_color, wcross_alpha, DRAWFLAG_NORMAL)
+
+#define CROSSHAIR_DRAW(sz,wcross_name,wcross_alpha) \
+				CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_SINGLE,sz,wcross_name,wcross_alpha)
+
+				if(bullets)
+				{
+					CROSSHAIR_DO_BLUR(CROSSHAIR_DRAW_RING, wcross_resolution, 0, 0);
+				}
+
+				if(time < wcross_name_changedonetime && wcross_name != wcross_name_goal_prev_prev && wcross_name_goal_prev_prev)
+				{
+					f = (wcross_name_changedonetime - time) / (wcross_name_changedonetime - wcross_name_changestarttime);
+					CROSSHAIR_DRAW(wcross_resolution_goal_prev_prev, wcross_name_goal_prev_prev, wcross_alpha * f * wcross_name_alpha_goal_prev_prev);
+					f = 1 - f;
+				}
+				else
+				{
+					f = 1;
+				}
+				CROSSHAIR_DRAW(wcross_resolution, wcross_name, wcross_alpha * f);
+				wcross_name_alpha_goal_prev = f;
+			}
+		}
+		else
+		{
+			wcross_scale_prev = 0;
+			wcross_alpha_prev = 0;
+			wcross_scale_goal_prev = 0;
+			wcross_alpha_goal_prev = 0;
+			wcross_changedonetime = 0;
+			if(wcross_name_goal_prev)
+				strunzone(wcross_name_goal_prev);
+			wcross_name_goal_prev = string_null;
+			if(wcross_name_goal_prev_prev)
+				strunzone(wcross_name_goal_prev_prev);
+			wcross_name_goal_prev_prev = string_null;
+			wcross_name_changestarttime = 0;
+			wcross_name_changedonetime = 0;
+			wcross_name_alpha_goal_prev = 0;
+			wcross_name_alpha_goal_prev_prev = 0;
+			wcross_resolution_goal_prev = 0;
+			wcross_resolution_goal_prev_prev = 0;
+		}
+	}
+
 	if(NextFrameCommand)
 	{
 		localcmd("\n", NextFrameCommand, "\n");
@@ -728,57 +841,57 @@
 void Sbar_Draw();
 void CSQC_spider_HUD()
 {
-    float rockets,reload,heat,hp,shield,i;
-    vector p,pp;
+	float rockets,reload,heat,hp,shield,i;
+	vector p,pp;
 
-    rockets = getstati(STAT_SPIDERBOT_ROCKETS);
-    heat    = min(getstatf(STAT_SPIDERBOT_HEAT),1);
-    reload  = min(getstatf(STAT_SPIDERBOT_RELOAD),1);
-    hp      = min(getstatf(STAT_SPIDERBOT_HEALTH),1);
-    shield  = min(getstatf(STAT_SPIDERBOT_SHIELD),1);
+	rockets = getstati(STAT_SPIDERBOT_ROCKETS);
+	heat    = min(getstatf(STAT_SPIDERBOT_HEAT),1);
+	reload  = min(getstatf(STAT_SPIDERBOT_RELOAD),1);
+	hp      = min(getstatf(STAT_SPIDERBOT_HEALTH),1);
+	shield  = min(getstatf(STAT_SPIDERBOT_SHIELD),1);
 
-    // Draw health bar
-    p = '0.5 0 0' * (vid_conwidth - (rkt_size * 8));
-    p = p + '0 1 0' * vid_conheight - '0 32 0';
-    //pp = ('0 1 0' * hp) + ('1 0 0' * (1-hp));
-    drawfill(p, '256 0 0' * shield + '0 8 0' , '0.5 0.5 1', 0.75, DRAWFLAG_NORMAL);
-    p_y += 8;
-    drawfill(p, '256 0 0' * hp + '0 8 0' , '0 1 0', 0.75, DRAWFLAG_NORMAL);
-    p_x += 256 * hp;
-    drawfill(p, '256 0 0' * (1-hp) + '0 8 0' , '0 0 0', 0.75, DRAWFLAG_NORMAL);
+	// Draw health bar
+	p = '0.5 0 0' * (vid_conwidth - (rkt_size * 8));
+	p = p + '0 1 0' * vid_conheight - '0 32 0';
+	//pp = ('0 1 0' * hp) + ('1 0 0' * (1-hp));
+	drawfill(p, '256 0 0' * shield + '0 8 0' , '0.5 0.5 1', 0.75, DRAWFLAG_NORMAL);
+	p_y += 8;
+	drawfill(p, '256 0 0' * hp + '0 8 0' , '0 1 0', 0.75, DRAWFLAG_NORMAL);
+	p_x += 256 * hp;
+	drawfill(p, '256 0 0' * (1-hp) + '0 8 0' , '0 0 0', 0.75, DRAWFLAG_NORMAL);
 
-    // Draw minigun heat indicator
-    p = '0.5 0 0' * (vid_conwidth - 256);
-    p = p + '0 1 0' * vid_conheight - '0 34  0';
-    drawfill(p, '256 0 0' * (1-heat) + '0 2 0' ,'0 0 1', 0.5, DRAWFLAG_NORMAL);
-    p_x += 256 * (1-heat);
-    drawfill(p, '256 0 0' * heat  + '0 2 0' , '1 0 0', 0.5, DRAWFLAG_NORMAL);
+	// Draw minigun heat indicator
+	p = '0.5 0 0' * (vid_conwidth - 256);
+	p = p + '0 1 0' * vid_conheight - '0 34  0';
+	drawfill(p, '256 0 0' * (1-heat) + '0 2 0' ,'0 0 1', 0.5, DRAWFLAG_NORMAL);
+	p_x += 256 * (1-heat);
+	drawfill(p, '256 0 0' * heat  + '0 2 0' , '1 0 0', 0.5, DRAWFLAG_NORMAL);
 
-    // Draw rocket icons for loaded/empty tubes.
-    pp = '0.5 0 0' * (vid_conwidth - (rkt_size * 8));
-    pp += '0 1 0' * vid_conheight - '0 64 0';
-    for(i = 0; i < 8; ++i)
-    {
-        p = pp + '1 0 0' * (rkt_size * i);
-        if(rockets == 8)
-        {
-            if(floor(reload * 8) == i)
-            {
-                drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '1 0 0' + '0 1 0' * ((reload*8)-i), 0.75 , DRAWFLAG_NORMAL);
-            }
-            else if(i < reload * 8)
-                drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '1 1 0', 0.75 , DRAWFLAG_NORMAL);
-            else
-                drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '0.5 0.5 0.5', 0.75, DRAWFLAG_NORMAL);
-        }
-        else
-        {
-            if(i < rockets)
-                drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '0 0 0', 0.25, DRAWFLAG_NORMAL);
-            else
-                drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '0 1 0' * reload, 0.75, DRAWFLAG_NORMAL);
-        }
-    }
+	// Draw rocket icons for loaded/empty tubes.
+	pp = '0.5 0 0' * (vid_conwidth - (rkt_size * 8));
+	pp += '0 1 0' * vid_conheight - '0 64 0';
+	for(i = 0; i < 8; ++i)
+	{
+		p = pp + '1 0 0' * (rkt_size * i);
+		if(rockets == 8)
+		{
+			if(floor(reload * 8) == i)
+			{
+				drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '1 0 0' + '0 1 0' * ((reload*8)-i), 0.75 , DRAWFLAG_NORMAL);
+			}
+			else if(i < reload * 8)
+				drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '1 1 0', 0.75 , DRAWFLAG_NORMAL);
+			else
+				drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '0.5 0.5 0.5', 0.75, DRAWFLAG_NORMAL);
+		}
+		else
+		{
+			if(i < rockets)
+				drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '0 0 0', 0.25, DRAWFLAG_NORMAL);
+			else
+				drawpic(p, spider_rocket_icon, '1 1 0' * rkt_size, '0 1 0' * reload, 0.75, DRAWFLAG_NORMAL);
+		}
+	}
 
 	if (sb_showscores)
 	{
@@ -789,22 +902,21 @@
 }
 void CSQC_common_hud(void)
 {
-
 	// Sbar_SortFrags(); done in Sbar_Draw
-    float hud;
-    hud = getstati(STAT_HUD);
+	float hud;
+	hud = getstati(STAT_HUD);
 
-    //hud = 10;
-    switch(hud)
-    {
-        case HUD_NORMAL:
-            Sbar_Draw();
-            break;
+	//hud = 10;
+	switch(hud)
+	{
+		case HUD_NORMAL:
+			Sbar_Draw();
+			break;
 
-        case HUD_SPIDERBOT:
-            CSQC_spider_HUD();
-            break;
-    }
+		case HUD_SPIDERBOT:
+			CSQC_spider_HUD();
+			break;
+	}
 }
 
 

Modified: branches/nexuiz-2.0/data/qcsrc/client/main.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/main.qh	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/client/main.qh	2009-10-17 18:05:47 UTC (rev 8149)
@@ -152,6 +152,7 @@
 #define ALPHA_MIN_VISIBLE 0.003
 
 float armorblockpercent;
+float g_weaponswitchdelay;
 
 //hooks
 float calledhooks;

Modified: branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/sbar.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/client/sbar.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -33,6 +33,7 @@
 void CSQC_ctf_hudreset();
 void CSQC_ctf_hud();
 void CSQC_nb_hud();
+void CSQC_race_hud();
 void MapVote_Draw();
 void Sbar_FinaleOverlay()
 {
@@ -838,27 +839,28 @@
 
 void Sbar_PrintScoreboardItem(vector pos, entity pl, float is_self, float pl_number)
 {
-	vector tmp, plteamrgb;
-	plteamrgb = GetTeamRGB(pl.team); 
+	vector tmp, rgb;
+	rgb = GetTeamRGB(pl.team);
 	string str;
 	float i, field;
 	float is_spec;
 	is_spec = (GetPlayerColor(pl.sv_entnum) == COLOR_SPECTATOR);
-
+	
+	if((rgb == '1 1 1') && (!is_spec)) {
+		rgb_x = cvar("sbar_color_bg_r") + 0.5;
+		rgb_y = cvar("sbar_color_bg_g") + 0.5;
+		rgb_z = cvar("sbar_color_bg_b") + 0.5; }
+		
 	// Layout:
 	tmp_x = sbwidth;
 	tmp_y = sbar_fontsize_y * 1.25;
 	tmp_z = 0;
 
 	// alternated rows highlighting
-	if (is_self)
-		drawfill(pos - '1 1 0', tmp + '2 0 0', plteamrgb, sbar_scoreboard_highlight_alpha_self, DRAWFLAG_NORMAL);
-	else
-	{
-		if (sbar_scoreboard_highlight)
-			if(!mod(pl_number,2))
-				drawfill(pos - '1 1 0', tmp + '2 0 0', plteamrgb, sbar_scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
-	}
+	if(is_self)
+		drawfill(pos - '1 1 0', tmp + '2 0 0', rgb, sbar_scoreboard_highlight_alpha_self, DRAWFLAG_NORMAL);
+	else if((sbar_scoreboard_highlight) && (!mod(pl_number,2)))
+		drawfill(pos - '1 1 0', tmp + '2 0 0', rgb, sbar_scoreboard_highlight_alpha, DRAWFLAG_NORMAL);
 
 	tmp_y = 0;
 
@@ -981,7 +983,7 @@
 	tmp_y = 1.25 * sbar_fontsize_y;
 
 	// rounded header
-	drawpic(pos, "gfx/hud/sb_scoreboard_tableheader", tmp, '0.5 0.5 0.5', sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);
+	drawpic(pos, "gfx/hud/sb_scoreboard_tableheader", tmp, (rgb * sbar_color_bg_team) + '0.5 0.5 0.5', sbar_scoreboard_alpha_bg, DRAWFLAG_NORMAL);
 
 	// table border
 	tmp_y += sbar_border_thickness;
@@ -1209,9 +1211,20 @@
 		}
 	}
 
+	if(gametype == GAME_CTS || gametype == GAME_RACE) {
+		if(race_speedaward) {
+			drawcolorcodedstring(pos, strcat("Speed award: ", ftos(race_speedaward), " (", race_speedaward_holder, ")"), sbar_fontsize, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+			pos_y += 1.25 * sbar_fontsize_y;
+		}
+		if(race_speedaward_alltimebest) {
+			drawcolorcodedstring(pos, strcat("All-time fastest: ", ftos(race_speedaward_alltimebest), " (", race_speedaward_alltimebest_holder, ")"), sbar_fontsize, sbar_scoreboard_alpha_fg, DRAWFLAG_NORMAL);
+			pos_y += 1.25 * sbar_fontsize_y;
+		}
+	}
+
 	tmp = pos + '0 1.5 0' * sbar_fontsize_y;
 	pos_y += 3 * sbar_fontsize_y;
-	
+
 	// List spectators
 	float specs;
 	specs = 0;
@@ -2074,9 +2087,6 @@
 	drawstring(position + '0 9 0' * sbar_fontsize_y, "Damage wasted:", sbar_fontsize, '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
 }
 
-float sbar_accuracystats_fade_alpha;
-float sbar_woulddrawscoreboard_prev;
-float sbar_woulddrawscoreboard_change; // "time" at which Sbar_WouldDrawScoreboard() changed
 void Sbar_DrawAccuracyStats()
 {
 	float i, count_hitscan, count_splash, row;  // count is the number of 'colums'
@@ -2436,7 +2446,7 @@
 	}
 	if(vote_waiting)
 	{
-		s = strcat("^2A vote has been called for ^1", vote_called_vote);
+		s = strcat("^2A vote has been called for ^1",  textShortenToWidth(vote_called_vote, vid_conwidth/2/sbar_fontsize_x, stringwidth_colors));
 		o = Sbar_DrawNoteLine(o, s);
 
 		if(vote_waiting_for_me)
@@ -2712,6 +2722,8 @@
 			CSQC_ctf_hud();
 		else if(gametype == GAME_NEXBALL)
 			CSQC_nb_hud();
+		else if(gametype == GAME_CTS || gametype == GAME_RACE)
+			CSQC_race_hud();
 	}
 	return;
 }
@@ -3014,3 +3026,75 @@
 	if (stat_items & IT_KEY1)
 		drawpic(pos, "gfx/hud/sb_nexball_carrying", '80 34 0', '1 1 1', 1, DRAWFLAG_NORMAL);
 }
+
+float crecordtime_prev; // last remembered crecordtime
+float crecordtime_change_time; // time when crecordtime last changed
+float srecordtime_prev; // last remembered srecordtime
+float srecordtime_change_time; // time when srecordtime last changed
+void CSQC_race_hud(void) 
+{
+	entity me;
+	me = playerslots[player_localentnum - 1];
+	float t, score;
+	float f; // yet another function has this
+	score = me.(scores[ps_primary]);
+
+	if not((scores_flags[ps_primary] & SFL_TIME) && !teamplay) // race/cts record display on HUD
+		return; // no records in the actual race
+
+	drawfont = sbar_bigfont;
+	vector pos;
+	pos_x = 2;
+	pos_y = vid_conheight - 48;
+
+	// clientside personal record
+	string rr;
+	if(gametype == GAME_CTS)
+		rr = CTS_RECORD;
+	else
+		rr = RACE_RECORD;
+	t = stof(db_get(ClientProgsDB, strcat(shortmapname, rr, "time")));
+
+	if(score && score < t || !t)
+		db_put(ClientProgsDB, strcat(shortmapname, rr, "time"), ftos(score));
+
+	if(t != crecordtime_prev) {
+		crecordtime_prev = t;
+		crecordtime_change_time = time;
+	}
+	f = time - crecordtime_change_time;
+
+	if (f > 1) {
+		drawstring(pos, "Personal best ", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+		drawstring(pos + '0 10 0', TIME_ENCODED_TOSTRING(t),'14 14 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+	} else {
+		drawstring(pos, "Personal best ", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+		drawstring(pos + '0 10 0', TIME_ENCODED_TOSTRING(t),'14 14 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+
+		// expanding
+		drawstring(pos - '0 50 0' * f, "Personal best ", '10 10 0' + '30 30 0' * f, '1 1 1', sbar_alpha_fg * (1 - f), DRAWFLAG_NORMAL);
+		drawstring(pos + '0 10 0' - '0 30 0' * f, TIME_ENCODED_TOSTRING(t),'14 14 0' + '42 42 0' * f, '1 1 1', sbar_alpha_fg * (1 - f), DRAWFLAG_NORMAL);
+	}
+
+	// server record
+	pos_y += 26;
+	t = race_server_record;
+	if(t != srecordtime_prev) {
+		srecordtime_prev = t;
+		srecordtime_change_time = time;
+	}
+	f = time - srecordtime_change_time;
+
+	if (f > 1) {
+		drawstring(pos, "Server best ", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+		drawstring(pos + '0 10 0', TIME_ENCODED_TOSTRING(t),'14 14 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+	} else {
+		drawstring(pos, "Server best ", '10 10 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+		drawstring(pos + '0 10 0', TIME_ENCODED_TOSTRING(t),'14 14 0', '1 1 1', sbar_alpha_fg, DRAWFLAG_NORMAL);
+
+		// expanding
+		drawstring(pos - '0 50 0' * f, "Server best ", '10 10 0' + '30 30 0' * f, '1 1 1', sbar_alpha_fg * (1 - f), DRAWFLAG_NORMAL);
+		drawstring(pos + '0 10 0' - '0 30 0' * f, TIME_ENCODED_TOSTRING(t),'14 14 0' + '42 42 0' * f, '1 1 1', sbar_alpha_fg * (1 - f), DRAWFLAG_NORMAL);
+	}
+	drawfont = sbar_font;
+}

Modified: branches/nexuiz-2.0/data/qcsrc/common/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/constants.qh	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/common/constants.qh	2009-10-17 18:05:47 UTC (rev 8149)
@@ -59,6 +59,9 @@
 const float RACE_NET_CHECKPOINT_NEXT_SPEC_QUALIFYING = 5; // byte nextcheckpoint, float laptime, short recordtime, string recordholder
 const float RACE_NET_PENALTY_RACE = 6; // byte penaltytime, string reason
 const float RACE_NET_PENALTY_QUALIFYING = 7; // byte penaltytime, string reason
+const float RACE_NET_SERVER_RECORD = 8; // server record, sent to client
+const float RACE_NET_SPEED_AWARD = 9; // speed award, sent to client
+const float RACE_NET_SPEED_AWARD_BEST = 10; // all time best speed award, sent to client
 
 const float ENT_CLIENT = 0;
 const float ENT_CLIENT_DEAD = 1;

Modified: branches/nexuiz-2.0/data/qcsrc/common/util.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/util.qh	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/common/util.qh	2009-10-17 18:05:47 UTC (rev 8149)
@@ -194,3 +194,7 @@
 void WriteInt24_t(float dest, float val);
 #endif
 #endif
+
+// the NULL function
+const var void func_null(void);
+const var string string_null;

Modified: branches/nexuiz-2.0/data/qcsrc/menu/draw.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/draw.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/menu/draw.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -278,10 +278,10 @@
 
 string draw_TextShortenToWidth(string theText, float maxWidth, float ICanHasKallerz)
 {
-	if(draw_TextWidth(theText, ICanHasKallerz) <= maxWidth)
-		return theText;
+	if(ICanHasKallerz)
+		return textShortenToWidth(theText, maxWidth, draw_TextWidth_WithColors);
 	else
-		return strcat(substring(theText, 0, draw_TextLengthUpToWidth(theText, maxWidth - draw_TextWidth("...", ICanHasKallerz), ICanHasKallerz)), "...");
+		return textShortenToWidth(theText, maxWidth, draw_TextWidth_WithoutColors);
 }
 
 float draw_TextWidth_WithColors(string s)

Modified: branches/nexuiz-2.0/data/qcsrc/menu/menu.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/menu.qh	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/menu/menu.qh	2009-10-17 18:05:47 UTC (rev 8149)
@@ -5,7 +5,6 @@
 
 // constants
 
-const string string_null;
 const vector eX = '1 0 0';
 const vector eY = '0 1 0';
 const vector eZ = '0 0 1';

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_effects.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_effects.c	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_effects.c	2009-10-17 18:05:47 UTC (rev 8149)
@@ -18,6 +18,17 @@
 	return me;
 }
 
+float someShadowCvarIsEnabled(entity box)
+{
+	if(cvar("r_shadow_realtime_dlight"))
+		if(cvar("r_shadow_realtime_dlight_shadows"))
+			return TRUE;
+	if(cvar("r_shadow_realtime_world"))
+		if(cvar("r_shadow_realtime_world_shadows"))
+			return TRUE;
+	return FALSE;
+}
+
 void fillNexuizEffectsSettingsTab(entity me)
 {
 	entity e;
@@ -138,8 +149,10 @@
 			setDependent(e, "r_shadow_realtime_world", 1, 1);
 	me.TR(me);
 		me.TDempty(me, 0.2);
-		me.TD(me, 1, 2.8, e = makeNexuizCheckBox(0, "r_shadow_usenormalmap", "Use normal maps"));
+		me.TD(me, 1, 1.8, e = makeNexuizCheckBox(0, "r_shadow_usenormalmap", "Use normal maps"));
 			setDependentOR(e, "r_shadow_realtime_dlight", 1, 1, "r_shadow_realtime_world", 1, 1);
+		me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "r_shadow_shadowmapping", "Soft shadows"));
+			setDependentWeird(e, someShadowCvarIsEnabled);
 	me.TR(me);
 		me.TD(me, 1, 1, e = makeNexuizCheckBox(0, "r_coronas", "Coronas"));
 	me.TR(me);
@@ -158,6 +171,6 @@
 			setDependent(e, "r_motionblur", 0, 1);
 	
 	me.gotoRC(me, me.rows - 1, 0);
-		me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "vid_conwidth $menu_vid_conwidth; vid_conheight $menu_vid_conheight; vid_restart", COMMANDBUTTON_APPLY));
+		me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "vid_restart", COMMANDBUTTON_APPLY));
 }
 #endif

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_resolution.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_resolution.c	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/slider_resolution.c	2009-10-17 18:05:47 UTC (rev 8149)
@@ -45,7 +45,7 @@
 		f = 1 + (minfactor - 1) * sz;
 	else
 		f = 1;
-	c *= f;
+	c = c * f; // fteqcc fail
 
 	cvar_set("vid_width", ftos(rint(r_x)));
 	cvar_set("vid_height", ftos(rint(r_y)));

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/util.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/util.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/util.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -103,12 +103,17 @@
 .float op_setDependent;
 .string cvarString_setDependent;
 .string cvarValue_setDependent;
+.float(entity) func_setDependent;
 void setDependent_Check(entity e)
 {
 	float f;
 	string s;
-	if(e.cvarString_setDependent)
+	if(e.func_setDependent)
 	{
+		e.disabled = !(e.func_setDependent(e));
+	}
+	else if(e.cvarString_setDependent)
+	{
 		s = cvar_string(e.cvarString_setDependent);
 		e.disabled = (cvar_string(e.cvarString_setDependent) == e.cvarValue_setDependent);
 	}
@@ -153,6 +158,7 @@
 	e.cvarMax_setDependent = theCvarMax;
 	e.cvar2_setDependent = string_null;
 	e.cvar3_setDependent = string_null;
+	e.func_setDependent = func_null;
 	e.draw = setDependent_Draw;
 	setDependent_Check(e);
 }
@@ -164,6 +170,7 @@
 	e.cvar_setDependent = string_null;
 	e.cvar2_setDependent = string_null;
 	e.cvar3_setDependent = string_null;
+	e.func_setDependent = func_null;
 	e.draw = setDependent_Draw;
 	setDependent_Check(e);
 }
@@ -178,6 +185,7 @@
 	e.cvar2Max_setDependent = theCvar2Max;
 	e.cvar3_setDependent = string_null;
 	e.op_setDependent = 0;
+	e.func_setDependent = func_null;
 	e.draw = setDependent_Draw;
 	setDependent_Check(e);
 }
@@ -192,6 +200,7 @@
 	e.cvar2Max_setDependent = theCvar2Max;
 	e.cvar3_setDependent = string_null;
 	e.op_setDependent = 1;
+	e.func_setDependent = func_null;
 	e.draw = setDependent_Draw;
 	setDependent_Check(e);
 }
@@ -208,9 +217,17 @@
 	e.cvar3Min_setDependent = theCvar3Min;
 	e.cvar3Max_setDependent = theCvar3Max;
 	e.op_setDependent = 0;
+	e.func_setDependent = func_null;
 	e.draw = setDependent_Draw;
 	setDependent_Check(e);
 }
+void setDependentWeird(entity e, float(entity) func)
+{
+	e.draw_setDependent = e.draw;
+	e.func_setDependent = func;
+	e.draw = setDependent_Draw;
+	setDependent_Check(e);
+}
 
 // EXTRESPONSE SYSTEM ////////////////////////////////////////////////////////
 

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/util.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/util.qh	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/util.qh	2009-10-17 18:05:47 UTC (rev 8149)
@@ -10,6 +10,7 @@
 void setDependentOR(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max);
 void setDependentAND3(entity e, string theCvarName, float theCvarMin, float theCvarMax, string theCvar2Name, float theCvar2Min, float theCvar2Max, string theCvar3Name, float theCvar3Min, float theCvar3Max);
 void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValue);
+void setDependentWeird(entity e, float(entity) func);
 
 float tooltipdb;
 void loadTooltips();

Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -1,3 +1,5 @@
+void race_send_recordtime(float t, float msg);
+
 float ClientData_Send(entity to, float sf)
 {
 	if(to != self.owner)
@@ -1015,6 +1017,7 @@
 	else
 		WriteString(MSG_ENTITY, "");
 	WriteByte(MSG_ENTITY, cvar("g_balance_armor_blockpercent") * 255.0);
+	WriteByte(MSG_ENTITY, cvar("g_balance_weaponswitchdelay") * 255.0);
 	return TRUE;
 }
 
@@ -1454,6 +1457,22 @@
 	}
 	else
 		self.hitplotfh = -1;
+
+	if(g_race || g_cts) {
+		string rr;
+		if(g_cts)
+			rr = CTS_RECORD;
+		else
+			rr = RACE_RECORD;
+		t = stof(db_get(ServerProgsDB, strcat(GetMapname(), rr, "time")));
+
+		race_send_recordtime(t, MSG_ONE);
+		race_send_speedaward(MSG_ONE);
+
+		speedaward_alltimebest = stof(db_get(ServerProgsDB, strcat(GetMapname(), rr, "speed/speed")));
+		speedaward_alltimebest_holder = db_get(ServerProgsDB, strcat(GetMapname(), rr, "speed/netname"));
+		race_send_speedaward_alltimebest(MSG_ONE);
+	}
 }
 
 /*

Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -512,6 +512,33 @@
 #endif
 }
 
+float speedaward_speed;
+string speedaward_holder;
+void race_send_speedaward(float msg)
+{
+	// send the best speed of the round
+	WriteByte(msg, SVC_TEMPENTITY);
+	WriteByte(msg, TE_CSQC_RACE);
+	WriteByte(msg, RACE_NET_SPEED_AWARD);
+	WriteShort(msg, floor(speedaward_speed+0.5));
+	WriteString(msg, speedaward_holder);
+}
+
+float speedaward_alltimebest;
+string speedaward_alltimebest_holder;
+void race_send_speedaward_alltimebest(float msg)
+{
+	// send the best speed
+	WriteByte(msg, SVC_TEMPENTITY);
+	WriteByte(msg, TE_CSQC_RACE);
+	WriteByte(msg, RACE_NET_SPEED_AWARD_BEST);
+	WriteShort(msg, floor(speedaward_alltimebest+0.5));
+	WriteString(msg, speedaward_alltimebest_holder);
+}
+
+string GetMapname(void);
+float speedaward_lastupdate;
+float speedaward_lastsent;
 void SV_PlayerPhysics()
 {
 	local vector wishvel, wishdir, v;
@@ -1157,6 +1184,29 @@
 		}
 	}
 
+	if((g_cts || g_race) && self.classname != "observer") {
+		if(vlen(self.velocity - self.velocity_z * '0 0 1') > speedaward_speed) {
+			speedaward_speed = vlen(self.velocity - self.velocity_z * '0 0 1');
+			speedaward_holder = self.netname;
+			speedaward_lastupdate = time;
+		}
+		if(speedaward_speed > speedaward_lastsent && time - speedaward_lastupdate > 1) {
+			string rr;
+			if(g_cts)
+				rr = CTS_RECORD;
+			else
+				rr = RACE_RECORD;
+			race_send_speedaward(MSG_ALL);
+			speedaward_lastsent = speedaward_speed;
+			if (speedaward_speed > speedaward_alltimebest) {
+				speedaward_alltimebest = speedaward_speed;
+				speedaward_alltimebest_holder = speedaward_holder;
+				db_put(ServerProgsDB, strcat(GetMapname(), rr, "speed/speed"), ftos(speedaward_alltimebest));
+				db_put(ServerProgsDB, strcat(GetMapname(), rr, "speed/netname"), speedaward_alltimebest_holder);
+				race_send_speedaward_alltimebest(MSG_ALL);
+			}
+		}
+	}
 :end
 	if(self.flags & FL_ONGROUND)
 		self.lastground = time;

Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -967,7 +967,14 @@
 	if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
 	if (!weapon_action(self.weapon, WR_CHECKAMMO1 + secondary))
 	{
-		W_SwitchWeapon_Force(self, w_getbestweapon(self));
+		// hack to ensure it switches to an OTHER weapon (in case the other fire mode still has ammo, we want that anyway)
+		float w, ww;
+		w = W_WeaponBit(self.weapon);
+		self.weapons &~= w;
+		ww = w_getbestweapon(self);
+		self.weapons |= w;
+		if(ww)
+			W_SwitchWeapon_Force(self, ww);
 		return FALSE;
 	}
 

Modified: branches/nexuiz-2.0/data/qcsrc/server/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/constants.qh	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/constants.qh	2009-10-17 18:05:47 UTC (rev 8149)
@@ -1,5 +1,5 @@
-string CVAR_CHECK_DEFAULT = "37cc3aae4b042acd9cf2b71135034bcf";
-string CVAR_CHECK_BALANCE = "1e423b95c67bac7998289473abe8feb1";
+string CVAR_CHECK_DEFAULT = "5d48426c72cdfbf78480870c75601f89";
+string CVAR_CHECK_BALANCE = "7f0cddd65617fa39bd3efb7942dceea9";
 
 float	FALSE					= 0;
 float	TRUE					= 1;

Modified: branches/nexuiz-2.0/data/qcsrc/server/ctf.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/ctf.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/ctf.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -447,7 +447,7 @@
 			h0 = db_get(ServerProgsDB, strcat(GetMapname(), "/captimerecord/netname"));
 			h1 = other.netname;
 			if(h0 == h1)
-				h0 = "his";
+				h0 = "their";
 			else
 				h0 = strcat(h0, "^7's"); // h0: display text for previous netname
 			if (flagcaptimerecord == 0)

Modified: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh	2009-10-17 18:05:47 UTC (rev 8149)
@@ -47,8 +47,6 @@
 float sv_foginterval;
 
 entity	activator;
-string	string_null;
-const var void(void)	func_null;
 
 float player_count;
 float currentbots;

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_damage.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -274,11 +274,11 @@
 
 			if(sv_gentle) {
 				if (deathtype == DEATH_CAMP)
-					bprint ("^1",s, "^1 thought he found a nice camping ground\n");
+					bprint ("^1",s, "^1 thought they found a nice camping ground\n");
 				else if (deathtype == DEATH_MIRRORDAMAGE)
 					bprint ("^1",s, "^1 didn't become friends with the Lord of Teamplay\n");
 				else
-					bprint ("^1",s, "^1 will be reinserted into the game due to his own actions\n");
+					bprint ("^1",s, "^1 will be reinserted into the game due to their own actions\n");
 
 				if(deathtype != DEATH_TEAMCHANGE)
 				{
@@ -303,11 +303,11 @@
 				else if (deathtype == DEATH_NOAMMO)
 					bprint ("^7",s, "^7 committed suicide. What's the point of living without ammo?\n");
 				else if (deathtype == DEATH_CAMP)
-					bprint ("^1",s, "^1 thought he found a nice camping ground\n");
+					bprint ("^1",s, "^1 thought they found a nice camping ground\n");
 				else if (deathtype == DEATH_MIRRORDAMAGE)
 					bprint ("^1",s, "^1 didn't become friends with the Lord of Teamplay\n");
 				else if (deathtype == DEATH_CHEAT)
-					bprint ("^1",s, "^1 unfairly eliminated himself\n");
+					bprint ("^1",s, "^1 unfairly eliminated themself\n");
 				else if (deathtype == DEATH_FIRE)
 					bprint ("^1",s, "^1 burned to death\n");
 				else if (deathtype != DEATH_TEAMCHANGE)

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_triggers.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -1656,7 +1656,7 @@
 
 	magicear_matched = FALSE;
 
-	dotrigger = ((self.classname == "player") && ((ear.radius == 0) || (vlen(source.origin - ear.origin) <= ear.radius)));
+	dotrigger = ((self.classname == "player") && (self.deadflag == DEAD_NO) && ((ear.radius == 0) || (vlen(source.origin - ear.origin) <= ear.radius)));
 	domatch = ((ear.spawnflags & 32) || dotrigger);
 	if not(domatch)
 		return msgin;
@@ -1786,7 +1786,7 @@
 	//   4 = ignore tell
 	//   8 = ignore tell to unknown player
 	//   16 = let netname replace the whole message (otherwise, netname is a word replacement if set)
-	//   32 = perform the replacement even if outside the radius
+	//   32 = perform the replacement even if outside the radius or dead
 	//   64 = continue replacing/triggering even if this one matched
 	// message: either
 	//   *pattern*

Modified: branches/nexuiz-2.0/data/qcsrc/server/gamecommand.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/gamecommand.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/gamecommand.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -669,20 +669,27 @@
 		return;
 	}
 
-	if(argv(0) == "adminmsg") if(argc == 3)
+	if(argv(0) == "adminmsg")
+	if(argc == 3)
 	{
 		entno = stof(argv(1));
-		client = world;
-		if(entno <= maxclients)
-			client = edict_num(entno);
+
+		if((entno < 1) | (entno > maxclients)) {
+			print("Player ", argv(1), " doesn't exist\n");
+			return;
+		}
+
+		client = edict_num(entno);
+
 		if(client.flags & FL_CLIENT)
 		{
-			centerprint_atprio(client, CENTERPRIO_ADMIN, strcat("^3SERVER ADMIN:\n\n^7", argv(2)));
-			sprint(client, strcat("\{1}\{13}^3SERVER ADMIN^7: ", argv(2), "\n"));
+			centerprint_atprio(client, CENTERPRIO_ADMIN, strcat("^3", admin_name(), ":\n\n^7", argv(2)));
+			sprint(client, strcat("\{1}\{13}^3", admin_name(), "^7: ", argv(2), "\n"));
 			print("Message sent to ", client.netname, "\n");
 		}
 		else
 			print("Client not found\n");
+
 		return;
 	}
 
@@ -707,6 +714,7 @@
 		print("DB loaded.\n");
 		return;
 	}
+
 	if (argv(0) == "nospectators")
 	{
 		blockSpectators = 1;
@@ -722,6 +730,7 @@
 		bprint(strcat("^7All spectators will be automatically kicked when not joining the game after ", ftos(cvar("g_maxplayers_spectator_blocktime")), " seconds!\n"));
 		return;
 	}
+
 	if (argv(0) == "lockteams")
 	{
 		if(teams_matter)
@@ -733,6 +742,7 @@
 			bprint("That command can only be used in a team-based gamemode.\n");
 		return;
 	}
+
 	if (argv(0) == "unlockteams")
 	{
 		if(teams_matter)

Modified: branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/keyhunt.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -120,21 +120,28 @@
 	string s;
 	if(intermission_running)
 		return;
+
 	if(frags_player)
 		UpdateFrags(player, frags_player);
+
 	if(key && key.owner && frags_owner)
 		UpdateFrags(key.owner, frags_owner);
+
 	if(!cvar("sv_eventlog"))  //output extra info to the console or text file
 		return;
-	s = strcat(":keyhunt:", what, ":", ftos(player.playerid));
-	s = strcat(s, ":", ftos(frags_player));
+
+	s = strcat(":keyhunt:", what, ":", ftos(player.playerid), ":", ftos(frags_player));
+
 	if(key && key.owner)
 		s = strcat(s, ":", ftos(key.owner.playerid));
 	else
 		s = strcat(s, ":0");
+
 	s = strcat(s, ":", ftos(frags_owner), ":");
+
 	if(key)
 		s = strcat(s, key.netname);
+
 	GameLogEcho(s);
 }
 

Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -7,6 +7,14 @@
 void() spawnpoint_use;
 string ColoredTeamName(float t);
 
+string admin_name(void)
+{
+	if(cvar_string("sv_adminnick") != "")
+		return cvar_string("sv_adminnick");
+	else
+		return "SERVER ADMIN";
+}
+
 float DistributeEvenly_amount;
 float DistributeEvenly_totalweight;
 void DistributeEvenly_Init(float amount, float totalweight)
@@ -653,6 +661,7 @@
     else
         return "^7";
 }
+
 string Team_ColorName(float t)
 {
     // fixme: Search for team entities and get their .netname's!
@@ -666,6 +675,7 @@
         return "Pink";
     return "Neutral";
 }
+
 string Team_ColorNameLowerCase(float t)
 {
     // fixme: Search for team entities and get their .netname's!

Modified: branches/nexuiz-2.0/data/qcsrc/server/nexball.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/nexball.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/nexball.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -347,7 +347,7 @@
 	if        (ball.team == self.team) //owngoal (regular goals)
 	{
 		LogNB("owngoal", ball.pusher);
-		bprint("Boo! ", pname, "^7 scored a goal against his own team!\n");
+		bprint("Boo! ", pname, "^7 scored a goal against their own team!\n");
 		pscore = -1;
 	} else if (self.team == GOAL_FAULT) {
 		LogNB("fault", ball.pusher);

Modified: branches/nexuiz-2.0/data/qcsrc/server/race.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/race.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/race.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -93,6 +93,15 @@
 			race_SendNextCheckpoint(msg_entity.enemy, 1);
 }
 
+void race_send_recordtime(float t, float msg)
+{
+	// send the server best time
+	WriteByte(msg, SVC_TEMPENTITY);
+	WriteByte(msg, TE_CSQC_RACE);
+	WriteByte(msg, RACE_NET_SERVER_RECORD);
+	WriteInt24_t(msg, t);
+}
+
 void race_SendTime(entity e, float cp, float t, float tvalid)
 {
 	float snew, l;
@@ -138,7 +147,6 @@
 
 	float recordtime;
 	string recordholder;
-
 	if(g_race_qualifying)
 	{
 		if(tvalid)
@@ -158,7 +166,7 @@
 				if(cp == race_timed_checkpoint)
 				{
 					float grecordtime;
-					string grecordholder;
+					string grecordholder, recorddifference;
 					string rr;
 					if(g_cts)
 						rr = CTS_RECORD;
@@ -174,23 +182,27 @@
 						db_put(ServerProgsDB, strcat(GetMapname(), rr, "time"), ftos(t));
 						db_put(ServerProgsDB, strcat(GetMapname(), rr, "netname"), e.netname);
 						write_recordmarker(e, time - TIME_DECODE(t), TIME_DECODE(t));
+						race_send_recordtime(t, MSG_ALL);
 					}
 					else if(t < grecordtime)
 					{
+						recorddifference = strcat("^2", " [-", TIME_ENCODED_TOSTRING(grecordtime-t), "]");
 						if(grecordholder == "")
-							bprint(e.netname, "^7 broke his all-time fastest lap record with ", TIME_ENCODED_TOSTRING(t), "\n");
+							bprint(e.netname, strcat("^7 broke their all-time fastest lap record ", TIME_ENCODED_TOSTRING(grecordtime), " with ", TIME_ENCODED_TOSTRING(t), recorddifference), "\n");
 						else
-							bprint(e.netname, "^7 broke ", grecordholder, "^7's all-time fastest lap record with ", TIME_ENCODED_TOSTRING(t), "\n");
+							bprint(e.netname, strcat("^7 broke ", grecordholder, "^7's all-time fastest lap record ", TIME_ENCODED_TOSTRING(grecordtime), " with ", TIME_ENCODED_TOSTRING(t), recorddifference), "\n");
 						db_put(ServerProgsDB, strcat(GetMapname(), rr, "time"), ftos(t));
 						db_put(ServerProgsDB, strcat(GetMapname(), rr, "netname"), e.netname);
 						write_recordmarker(e, time - TIME_DECODE(t), TIME_DECODE(t));
+						race_send_recordtime(t, MSG_ALL);
 					}
 					else
 					{
+						recorddifference = strcat("^1", " [+", TIME_ENCODED_TOSTRING(t-grecordtime), "]");
 						if(grecordholder == "")
-							bprint(e.netname, "^7's new fastest lap could not break his all-time fastest lap record of ", TIME_ENCODED_TOSTRING(grecordtime), "\n");
+							bprint(e.netname, strcat("^7's new fastest lap ", TIME_ENCODED_TOSTRING(t), " could not break their all-time fastest lap record of ", TIME_ENCODED_TOSTRING(grecordtime), recorddifference), "\n");
 						else
-							bprint(e.netname, "^7's new fastest lap could not break ", grecordholder, "^7's all-time fastest lap record of ", TIME_ENCODED_TOSTRING(grecordtime), "\n");
+							bprint(e.netname, strcat("^7's new fastest lap ", TIME_ENCODED_TOSTRING(t), " could not break ", grecordholder, "^7's all-time fastest lap record of ", TIME_ENCODED_TOSTRING(grecordtime), recorddifference), "\n");
 					}
 				}
 

Modified: branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/sv_main.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -128,6 +128,10 @@
 Called before each frame by the server
 =============
 */
+
+float game_delay;
+float game_delay_last;
+
 void RuneMatchGivePoints();
 float RedirectionThink();
 entity SelectSpawnPoint (float anypoint);
@@ -207,6 +211,17 @@
 
 	Spawnqueue_Check();
 
+
+	// detect when the pre-game countdown (if any) has ended and the game has started
+	game_delay = (time < game_starttime) ? TRUE : FALSE;
+
+	if(game_delay_last == TRUE)
+	if(game_delay == FALSE)
+	if(cvar("sv_eventlog"))
+			GameLogEcho(":startdelay_ended");
+
+	game_delay_last = game_delay;
+
 	// if in warmup stage and limit for warmup is hit start match
 	if (inWarmupStage)
 	if ((g_warmup_limit > 0 && time >= g_warmup_limit)

Modified: branches/nexuiz-2.0/data/qcsrc/server/vote.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/vote.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/vote.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -221,7 +221,7 @@
 				} else if(VoteCheckNasty(dovote)) {
 					print_to(e, "Syntax error in command. See 'vhelp' for more info.");
 				} else if(RemapVote(dovote, "vdo", e)) { // strcat seems to be necessary
-					bprint("\{1}^2* ^3", VoteNetname(e), "^2 used his ^3master^2 status to do \"^2", RemapVote_display, "^2\".\n");
+					bprint("\{1}^2* ^3", VoteNetname(e), "^2 used their ^3master^2 status to do \"^2", RemapVote_display, "^2\".\n");
 					if(cvar("sv_eventlog"))
 						GameLogEcho(strcat(":vote:vdo:", ftos(e.playerid), ":", RemapVote_display));
 					localcmd(strcat(RemapVote_vote, "\n"));

Modified: branches/nexuiz-2.0/data/qcsrc/server/w_campingrifle.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_campingrifle.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_campingrifle.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -194,9 +194,9 @@
 	else if (req == WR_SUICIDEMESSAGE)
 	{
 		if(w_deathtype & HITTYPE_SECONDARY)
-			w_deathtypestring = "shot himself automatically";
+			w_deathtypestring = "shot themself automatically";
 		else
-			w_deathtypestring = "sniped himself somehow";
+			w_deathtypestring = "sniped themself somehow";
 	}
 	else if (req == WR_KILLMESSAGE)
 	{

Modified: branches/nexuiz-2.0/data/qcsrc/server/w_crylink.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_crylink.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_crylink.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -241,7 +241,7 @@
 		return self.ammo_cells >= cvar("g_balance_crylink_secondary_ammo");
 	else if (req == WR_SUICIDEMESSAGE)
 	{
-		w_deathtypestring = "succeeded at self-destructing himself with the Crylink";
+		w_deathtypestring = "succeeded at self-destructing themself with the Crylink";
 	}
 	else if (req == WR_KILLMESSAGE)
 	{

Modified: branches/nexuiz-2.0/data/qcsrc/server/w_electro.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_electro.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_electro.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -271,7 +271,7 @@
 	else if (req == WR_SUICIDEMESSAGE)
 	{
 		if(w_deathtype & HITTYPE_SECONDARY)
-			w_deathtypestring = "could not remember where he put plasma";
+			w_deathtypestring = "could not remember where they put plasma";
 		else
 			w_deathtypestring = "played with plasma";
 	}

Modified: branches/nexuiz-2.0/data/qcsrc/server/w_laser.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/w_laser.qc	2009-10-17 17:41:40 UTC (rev 8148)
+++ branches/nexuiz-2.0/data/qcsrc/server/w_laser.qc	2009-10-17 18:05:47 UTC (rev 8149)
@@ -143,7 +143,7 @@
 	else if (req == WR_CHECKAMMO2)
 		return TRUE;
 	else if (req == WR_SUICIDEMESSAGE)
-		w_deathtypestring = "lasered himself to hell";
+		w_deathtypestring = "lasered themself to hell";
 	else if (req == WR_KILLMESSAGE)
 	{
 		w_deathtypestring = "was lasered to death by"; // unchecked: SPLASH



More information about the nexuiz-commits mailing list