[nexuiz-commits] r7218 - in branches/nexuiz-2.0: . Docs data data/maps data/models/player data/qcsrc/client data/qcsrc/common data/qcsrc/menu/nexuiz data/qcsrc/server misc/netradiant-NexuizPack/nexuiz.game/data misc/tools

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Jul 13 07:41:40 EDT 2009


Author: div0
Date: 2009-07-13 07:41:39 -0400 (Mon, 13 Jul 2009)
New Revision: 7218

Added:
   branches/nexuiz-2.0/data/weaponsNexrun.cfg
Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/Docs/mapping.txt
   branches/nexuiz-2.0/data/defaultNexuiz.cfg
   branches/nexuiz-2.0/data/effectinfo.txt
   branches/nexuiz-2.0/data/maps/campaignNexuiz25.txt
   branches/nexuiz-2.0/data/maps/racetrack.mapinfo
   branches/nexuiz-2.0/data/models/player/carni.tga
   branches/nexuiz-2.0/data/models/player/carniarmor.tga
   branches/nexuiz-2.0/data/models/player/fricka.tga
   branches/nexuiz-2.0/data/models/player/grunt.tga
   branches/nexuiz-2.0/data/models/player/headhunter.tga
   branches/nexuiz-2.0/data/models/player/heroine.tga
   branches/nexuiz-2.0/data/models/player/insurrectionist.tga
   branches/nexuiz-2.0/data/models/player/lurk.tga
   branches/nexuiz-2.0/data/models/player/lycanthrope.tga
   branches/nexuiz-2.0/data/models/player/marine.tga
   branches/nexuiz-2.0/data/models/player/mulder.tga
   branches/nexuiz-2.0/data/models/player/nexus.tga
   branches/nexuiz-2.0/data/models/player/pyria.tga
   branches/nexuiz-2.0/data/models/player/quark.tga
   branches/nexuiz-2.0/data/models/player/reptile.tga
   branches/nexuiz-2.0/data/models/player/shock.tga
   branches/nexuiz-2.0/data/models/player/skadi.tga
   branches/nexuiz-2.0/data/models/player/specop.tga
   branches/nexuiz-2.0/data/models/player/xolar.tga
   branches/nexuiz-2.0/data/physics15.cfg
   branches/nexuiz-2.0/data/physics151.cfg
   branches/nexuiz-2.0/data/physics151b.cfg
   branches/nexuiz-2.0/data/physics16rc1.cfg
   branches/nexuiz-2.0/data/physics25.cfg
   branches/nexuiz-2.0/data/physicsCPMA.cfg
   branches/nexuiz-2.0/data/physicsCPMAnex.cfg
   branches/nexuiz-2.0/data/physicsHavoc.cfg
   branches/nexuiz-2.0/data/physicsNexrun.cfg
   branches/nexuiz-2.0/data/physicsQ.cfg
   branches/nexuiz-2.0/data/physicsQ3.cfg
   branches/nexuiz-2.0/data/physicsQBF.cfg
   branches/nexuiz-2.0/data/physicsQBFplus.cfg
   branches/nexuiz-2.0/data/physicsQBR.cfg
   branches/nexuiz-2.0/data/physicsWarsow.cfg
   branches/nexuiz-2.0/data/physicsWarsowClassicBunny.cfg
   branches/nexuiz-2.0/data/physicsWarsowDev.cfg
   branches/nexuiz-2.0/data/qcsrc/client/Main.qc
   branches/nexuiz-2.0/data/qcsrc/client/gibs.qc
   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/mapinfo.qc
   branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qh
   branches/nexuiz-2.0/data/qcsrc/common/util.qc
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c
   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/clientcommands.qc
   branches/nexuiz-2.0/data/qcsrc/server/constants.qh
   branches/nexuiz-2.0/data/qcsrc/server/defs.qh
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
   branches/nexuiz-2.0/data/qcsrc/server/havocbot_roles.qc
   branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
   branches/nexuiz-2.0/data/qcsrc/server/race.qc
   branches/nexuiz-2.0/data/qcsrc/server/race.qh
   branches/nexuiz-2.0/data/qcsrc/server/t_teleporters.qc
   branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc
   branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/data/entities.def
   branches/nexuiz-2.0/misc/tools/demotc-race-record-extractor.sh
   branches/nexuiz-2.0/misc/tools/nexuiz-map-compiler
Log:
r7192 | div0 | 2009-07-11 11:27:00 -0400 (Sat, 11 Jul 2009) | 2 lines
more penalty time fixes
r7193 | div0 | 2009-07-11 11:38:23 -0400 (Sat, 11 Jul 2009) | 2 lines
fix "randomly stuck at spawn" bug
r7194 | div0 | 2009-07-11 13:36:35 -0400 (Sat, 11 Jul 2009) | 2 lines
meta works not like I thought :P
r7195 | morphed | 2009-07-11 15:58:08 -0400 (Sat, 11 Jul 2009) | 1 line
new player images for menu made by Ronan
r7196 | div0 | 2009-07-11 16:57:52 -0400 (Sat, 11 Jul 2009) | 2 lines
fix yet another bug by TH :(
r7197 | div0 | 2009-07-11 17:05:26 -0400 (Sat, 11 Jul 2009) | 3 lines
cl_gentle 1: morphed's effect
cl_gentle 2: my effect
r7198 | div0 | 2009-07-11 17:07:17 -0400 (Sat, 11 Jul 2009) | 2 lines
cl_gentle 2: work properly even in sv_gentle 1 mode
r7199 | div0 | 2009-07-11 17:08:15 -0400 (Sat, 11 Jul 2009) | 2 lines
document cl_gentle 2 in cvar description
r7200 | div0 | 2009-07-11 17:14:27 -0400 (Sat, 11 Jul 2009) | 2 lines
entities.def
r7201 | div0 | 2009-07-12 08:02:49 -0400 (Sun, 12 Jul 2009) | 2 lines
bye bye "Race", hello "CTS" and "Race" (in mapinfo: rc)
r7202 | div0 | 2009-07-12 08:06:48 -0400 (Sun, 12 Jul 2009) | 2 lines
CTS line
r7203 | div0 | 2009-07-12 08:11:55 -0400 (Sun, 12 Jul 2009) | 2 lines
use -1 as "unknown skill"
r7204 | div0 | 2009-07-12 11:47:16 -0400 (Sun, 12 Jul 2009) | 2 lines
fix some more stuff separating rc/cts
r7205 | div0 | 2009-07-12 11:50:48 -0400 (Sun, 12 Jul 2009) | 2 lines
normalize formatting of physics cfg files
r7206 | div0 | 2009-07-12 12:00:05 -0400 (Sun, 12 Jul 2009) | 2 lines
mapinfo: support #include in settemps
r7207 | div0 | 2009-07-12 12:12:24 -0400 (Sun, 12 Jul 2009) | 2 lines
do not apply kill delay in qualifying (race/cts) rounds
r7208 | div0 | 2009-07-12 13:46:28 -0400 (Sun, 12 Jul 2009) | 2 lines
do not require "has weapons" in cts
r7209 | div0 | 2009-07-12 14:55:31 -0400 (Sun, 12 Jul 2009) | 3 lines
CTS to menu;
Nexrun weapons cfg
r7210 | div0 | 2009-07-12 15:35:49 -0400 (Sun, 12 Jul 2009) | 2 lines
fix campaign + race, I think
r7211 | div0 | 2009-07-12 15:36:29 -0400 (Sun, 12 Jul 2009) | 2 lines
fix race name
r7212 | div0 | 2009-07-12 15:58:15 -0400 (Sun, 12 Jul 2009) | 3 lines
fix typo
r7213 | div0 | 2009-07-13 00:23:13 -0400 (Mon, 13 Jul 2009) | 2 lines
fix :recordset: eventlog lines
r7214 | div0 | 2009-07-13 00:25:11 -0400 (Mon, 13 Jul 2009) | 2 lines
match also new race records
r7215 | div0 | 2009-07-13 01:49:00 -0400 (Mon, 13 Jul 2009) | 2 lines
do not randomly order players who have completed no lap in qualifying, but always start them from behind
r7216 | div0 | 2009-07-13 06:24:21 -0400 (Mon, 13 Jul 2009) | 2 lines
if con_chat is disabled, still clip centerprint against the upper edge of the HUD
r7217 | div0 | 2009-07-13 06:36:10 -0400 (Mon, 13 Jul 2009) | 3 lines
remove model forcing feature until further notice, due to zyms having mismatching bone indexes.
Code can be reenabled by specifying -DALLOW_FORCEMODELS on the fteqcc command line.


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/.patchsets	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7188
+revisions_applied = 1-7217

Modified: branches/nexuiz-2.0/Docs/mapping.txt
===================================================================
--- branches/nexuiz-2.0/Docs/mapping.txt	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/Docs/mapping.txt	2009-07-13 11:41:39 UTC (rev 7218)
@@ -21,7 +21,7 @@
 
 V        Rune Match
 
-VI       Race
+VI       Race/CTS
 
 VII      Nexball
 
@@ -107,19 +107,20 @@
 
 There's much more power in a mapinfo file. See Appendix A for more details.
 
-Gametype        | Syntax                                             | Notes
-----------------+----------------------------------------------------+-------------------------------------------------------
-Deathmatch      | type dm    <fraglimit>  <timelimit>                |
-Team Deathmatch | type tdm   <fraglimit>  <timelimit> <teams>        | 2, 3, or 4 teams
-Domination      | type dom   <pointlimit> <timelimit>                | teams are set by the map's entities
-CTF             | type ctf   <pointlimit> <timelimit> <caplimit>     | pointlimit if g_ctf_win_mode is 2, otherwise caplimit
-Runematch       | type rune  <pointlimit> <timelimit>                |
-LMS             | type lms   <lives>      <timelimit>                |
-Arena           | type arena <fraglimit>  <timelimit>                |
-Key Hunt        | type kh    <pointlimit> <timelimit> <teams>        | 2, 3, or 4 teams
-Assault         | type as                 <timelimit>                | never uses points
-Onslaught       | type ons                <timelimit>                | never uses points
-Race            | type race  <laplimit>   <timelimit> <teamlaplimit> | g_race_teams: teamlaplimit is used instead of laplimit
+Gametype        | Syntax                                                                              | Notes
+----------------+-------------------------------------------------------------------------------------+-------------------------------------------------------
+Deathmatch      | type dm    <fraglimit>  <timelimit>                                                 |
+Team Deathmatch | type tdm   <fraglimit>  <timelimit> <teams>                                         | 2, 3, or 4 teams
+Domination      | type dom   <pointlimit> <timelimit>                                                 | teams are set by the map's entities
+CTF             | type ctf   <pointlimit> <timelimit> <caplimit>                                      | pointlimit if g_ctf_win_mode is 2, otherwise caplimit
+Runematch       | type rune  <pointlimit> <timelimit>                                                 |
+LMS             | type lms   <lives>      <timelimit>                                                 |
+Arena           | type arena <fraglimit>  <timelimit>                                                 |
+Key Hunt        | type kh    <pointlimit> <timelimit> <teams>                                         | 2, 3, or 4 teams
+Assault         | type as                 <timelimit>                                                 | never uses points
+Onslaught       | type ons                <timelimit>                                                 | never uses points
+Race            | type race               <timelimit> <qualifyingtimelimit> <laplimit> <teamlaplimit> | g_race_teams: teamlaplimit is used instead of laplimit
+CTS             | type cts                <timelimit> <skill>                                         | never uses points
 
 
 ===============
@@ -310,9 +311,9 @@
 such entities, delete the data/data/mapname.mapinfo file - or simply edit it to
 add the "type rune" line.
 
-==========
-=VI. Race=
-==========
+==============
+=VI. Race/CTS=
+==============
 
 Making a race map is not hard: you need some special spawnpoints, and some checkpoints.
 
@@ -320,7 +321,7 @@
 -----------
 classname  info_player_race
 target     targetname of the checkpoint
-race_place for finish line checkpoints, the place of the point, or -1 to make it qualifying-only, or unset to let all the other players spawn
+race_place for finish line checkpoints, the place of the point, or -1 to make it qualifying/CTS-only, or unset to let all the other players spawn
 
 Checkpoints
 -----------
@@ -360,8 +361,13 @@
 If your map contains the required entities for Race, the menu will automatically
 detect it for supporting Race. To force the map to get re-detected after you add
 such entities, delete the data/data/mapname.mapinfo file - or simply edit it to
-add the "type race" line.
+add the "type rc" line.
 
+CTS maps do not use checkpoints with race_place set, so you can leave them out
+for CTS maps.
+
+The skill parameter in the mapinfo entry for CTS shall be in the range from 0 (easy) to 10 (impossible).
+
 =============
 =VI. Nexball=
 =============

Modified: branches/nexuiz-2.0/data/defaultNexuiz.cfg
===================================================================
--- branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/defaultNexuiz.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -24,7 +24,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 9b8ca48c50d9e2af73245655fdb29b04
+set cvar_check_default 1247e8cd8be7bda1c260795d5bebb20b
 
 // Nexuiz version (formatted for machines)
 // used to determine if a client version is compatible
@@ -289,6 +289,7 @@
 set g_telefrags 1
 
 // use default physics
+set sv_friction_on_land 0
 exec physics25.cfg
 
 set sv_pogostick 1 "don't require releasing the space bar for jumping again"
@@ -667,13 +668,13 @@
 
 // race
 set g_race 0 "Race: be faster than your opponents"
-set g_race_qualifying 2
-// Qualifying uses timelimit, and the one with the best time wins. Fraglimit is nonfunctional then.
-// Normal race uses fraglimit as a limit for the laps.
-// Special mode: g_race_qualifying 2. First runs a qualifying, after
-// ready-restart it turns into a race. TODO not done yet (e.g. timing display)
+set g_race_qualifying_timelimit 0
+set g_race_qualifying_timelimit_override -1
 set g_race_teams 0	"when 2, 3, or 4, the race is played as a team game (the team members can add up their laps)"
 
+// cts
+set g_cts 0 "CTS: complete the stage"
+
 // nexball
 set g_nexball 0 "Nexball: Basketball and Soccer go Nexuiz"
 
@@ -1543,7 +1544,7 @@
 
 // "Gentle mode": show no blood
 seta sv_gentle 0	"force gentle mode for everyone, also remove references to acts of killing from the messages"
-seta cl_gentle 0	"client side gentle mode (only replaces gibs)"
+seta cl_gentle 0	"client side gentle mode (only replaces gibs); when set to 1, white smoke replaces gibs, when set to 2, colorful clouds replace gibs"
 
 seta sbar_increment_maptime 0	"set to 1 if you prefer an increasing hud timer"
 
@@ -1597,9 +1598,10 @@
 set bot_navigation_ignoreplayers 0 // FIXME remove this once the issue is solved
 set bot_sound_monopoly 0 "when enabled, only bots can make any noise"
 
-seta cl_forceplayermodels 0 "force all players to look like you; WARNING: animations can look very bad with this"
-seta cl_forceplayermodelsfromnexuiz 0 "force models coming from nexuiz; WARNING: animations can look very bad with this"
-set sv_clforceplayermodels 1 "allow clients to use cl_forcemodels"
+// broken, sorry (cannot handle weapon attachment properly)
+//seta cl_forceplayermodels 0 "force all players to look like you; WARNING: animations can look very bad with this"
+//seta cl_forceplayermodelsfromnexuiz 0 "force models coming from nexuiz; WARNING: animations can look very bad with this"
+//set sv_clforceplayermodels 1 "allow clients to use cl_forcemodels"
 
 set sv_loddistance1 1024
 set sv_loddistance2 4096

Modified: branches/nexuiz-2.0/data/effectinfo.txt
===================================================================
--- branches/nexuiz-2.0/data/effectinfo.txt	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/effectinfo.txt	2009-07-13 11:41:39 UTC (rev 7218)
@@ -2362,93 +2362,93 @@
 
 // Zero-violence effects
 
-// cl_gentle impact effect indicating damage
+// impact effect indicating damage
 // used in qcsrc/client/gibs.qc:			pointparticles(particleeffectnum("damage_hit"), org, vel, amount * 16)
 effect damage_hit
-tex 43 43
+tex 48 55
 count 1
-type spark
-color 0xffffff 0x9271fb
-size 14 24
+type alphastatic
+color 0x00FFFF 0xFF00FF
+size 16 16
 sizeincrease -24
-alpha 128 128 292
+alpha 128 128 192
 gravity -0.4
+bounce 1.5
 airfriction 5
 liquidfriction 10
-velocityjitter 356 356 456
-
+velocityjitter 256 256 256
 effect damage_hit
-tex 0 8
+tex 48 55
 count 1
-type smoke
-color 0xffffff 0x9271fb
-size 24 24
+type alphastatic
+color 0xFF00FF 0xFFFF00
+size 16 16
 sizeincrease -24
-alpha 128 128 292
+alpha 128 128 192
+gravity -0.4
+bounce 1.5
 airfriction 5
 liquidfriction 10
-originjitter 10 10 10
+velocityjitter 256 256 256
+effect damage_hit
+tex 48 55
+count 1
+type alphastatic
+color 0xFFFF00 0x00FFFF
+size 16 16
+sizeincrease -24
+alpha 128 128 192
+gravity -0.4
+bounce 1.5
+airfriction 5
+liquidfriction 10
+velocityjitter 256 256 256
 
-
 // effect for removing player model
 // "teleport"
-
-// cl_gentle deathfx
+// NOTE: maintained by div0, make your own new effect instead of changing this one without asking!
+// large sparks
 // used in qcsrc/client/gibs.qc:			pointparticles(particleeffectnum("damage_dissolve"), org, vel, amount)
 effect damage_dissolve
-tex 43 43
-count 20
-type spark
-color 0xffffff 0x9271fb
-size 62 62
+tex 48 55
+count 30
+type alphastatic
+color 0x00FFFF 0xFF00FF
+size 32 32
 sizeincrease -16
-alpha 256 256 328
+alpha 256 256 128
 gravity -0.4
+bounce 1.5
 airfriction 3
 liquidfriction 6
-velocityjitter 256 256 512
-
+velocityjitter 512 512 512
 effect damage_dissolve
-tex 43 43
-count 5
-type spark
-color 0x7bdbff 0xbed2ff
-size 62 62
+tex 48 55
+count 30
+type alphastatic
+color 0xFF00FF 0xFFFF00
+size 32 32
 sizeincrease -16
-alpha 256 256 328
-gravity -0.8
-airfriction 5
-liquidfriction 6
-velocityjitter 256 256 512
-
-effect damage_dissolve
-tex 0 8
-count 10
-type smoke
-color 0xffffff 0x9271fb
-size 44 44
-sizeincrease -16
-alpha 256 256 228
+alpha 256 256 128
+gravity -0.4
+bounce 1.5
 airfriction 3
 liquidfriction 6
-originjitter 32 32 96
-
-
+velocityjitter 512 512 512
 effect damage_dissolve
-tex 46 46
+tex 48 55
 count 30
-type smoke
-color 0xffffff 0x9271fb
+type alphastatic
+color 0xFFFF00 0x00FFFF
 size 32 32
 sizeincrease -16
-alpha 256 256 228
-gravity 1
+alpha 256 256 128
+gravity -0.4
 bounce 1.5
 airfriction 3
 liquidfriction 6
-velocityjitter 400 400 0
+velocityjitter 512 512 512
 
-
 // decal
 // used in qcsrc/server/g_triggers.qc:					self.cnt = particleeffectnum("laser_deadly")
 // used in qcsrc/server/g_triggers.qc:			self.cnt = particleeffectnum("laser_deadly")
@@ -3533,3 +3533,92 @@
 originjitter 44 44 44
 velocityjitter 11 11 50
 bounce 2
+
+
+
+// cl_gentle impact effect indicating damage
+// maintained by morphed
+// used in qcsrc/client/gibs.qc:			pointparticles(particleeffectnum("damage_hit"), org, vel, amount * 16)
+effect morphed_damage_hit
+tex 43 43
+count 1
+type spark
+color 0xffffff 0x9271fb
+size 14 24
+sizeincrease -24
+alpha 128 128 292
+gravity -0.4
+airfriction 5
+liquidfriction 10
+velocityjitter 356 356 456
+
+effect morphed_damage_hit
+tex 0 8
+count 1
+type smoke
+color 0xffffff 0x9271fb
+size 24 24
+sizeincrease -24
+alpha 128 128 292
+airfriction 5
+liquidfriction 10
+originjitter 10 10 10
+
+
+// effect for removing player model
+// "teleport"
+
+// cl_gentle deathfx
+// used in qcsrc/client/gibs.qc:			pointparticles(particleeffectnum("damage_dissolve"), org, vel, amount)
+effect morphed_damage_dissolve
+tex 43 43
+count 20
+type spark
+color 0xffffff 0x9271fb
+size 62 62
+sizeincrease -16
+alpha 256 256 328
+gravity -0.4
+airfriction 3
+liquidfriction 6
+velocityjitter 256 256 512
+
+effect morphed_damage_dissolve
+tex 43 43
+count 5
+type spark
+color 0x7bdbff 0xbed2ff
+size 62 62
+sizeincrease -16
+alpha 256 256 328
+gravity -0.8
+airfriction 5
+liquidfriction 6
+velocityjitter 256 256 512
+
+effect morphed_damage_dissolve
+tex 0 8
+count 10
+type smoke
+color 0xffffff 0x9271fb
+size 44 44
+sizeincrease -16
+alpha 256 256 228
+airfriction 3
+liquidfriction 6
+originjitter 32 32 96
+
+
+effect morphed_damage_dissolve
+tex 46 46
+count 30
+type smoke
+color 0xffffff 0x9271fb
+size 32 32
+sizeincrease -16
+alpha 256 256 228
+gravity 1
+bounce 1.5
+airfriction 3
+liquidfriction 6
+velocityjitter 400 400 0

Modified: branches/nexuiz-2.0/data/maps/campaignNexuiz25.txt
===================================================================
--- branches/nexuiz-2.0/data/maps/campaignNexuiz25.txt	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/maps/campaignNexuiz25.txt	2009-07-13 11:41:39 UTC (rev 7218)
@@ -26,7 +26,7 @@
 "dom","slimepit",5,7,100,,"DOM: The Slime Pit","An old, rusty industrial arena on which you have to watch out for slime...\n\nNote: while trying to capture one control point after another, you should keep an eye on your already captured control points, and defend them from incoming enemies."
 "dom","ruiner",5,8,100,,"DOM: RUINER","You got through The Slime Pit, go wash off that goo and try one last round of Domination here.\n\nYou may want to enable reflections in the Effects menu, but don't get carried away by them, as there still are control points to worry about..."
 "ctf","eggandbacon",7,7,200,,"SPECIAL: Egg & Bacon","An arena especially for spamming around with all the weapons. Enjoy it, and when you had enough of it, bring the enemy flag home...\n\nYou will notice some odd weapons here that haven't appeared before, by the way. Learn using them."
-"race","racetrack",0,0,360,,"Race: Racetrack","Race is about running as fast as possible on the map, by jumping at the right times, and using your weapons to gain more speed.\n\nOn this map, you have to finish a lap in 36.0 seconds to proceed. The mortar which you will find behind you may be an useful tool for this."
+"rc","racetrack",0,0,360,,"Race: Racetrack","Race is about running as fast as possible on the map, by jumping at the right times, and using your weapons to gain more speed.\n\nOn this map, you have to finish a lap in 36.0 seconds to proceed. The mortar which you will find behind you may be an useful tool for this."
 "dm","final_rage",3,8,20,"g_laserguided_missile 1; g_weaponarena rocketlauncher","SPECIAL: Final rage","Laser Guided Missiles... try playing with them, to let them blow up directly in the face of your enemies. Secondary fire button toggles the guiding.\n\nThe final is near..."
 "lms","reslimed",2,7,9,,"LMS: Slimepit Revisited","In Last Man Standing, everyone starts out with the same amount of lives, and you have to stay alive as long as possible. It is crucial to actually dodge rockets here. Also, there are traps on this map that you can activate to hurt your opponents - find then!\n\nEveryone gets 9 lives, and if you stay alive, you're in the next round."
 "lms","bluesky",3,8,9,,"LMS: Blue Sky","And the sky is the limit... enjoy the view and try to keep alive! Your 3 enemies will try to hit you using the Nex and other weapons suitable for long distances, so never stop moving!"

Modified: branches/nexuiz-2.0/data/maps/racetrack.mapinfo
===================================================================
--- branches/nexuiz-2.0/data/maps/racetrack.mapinfo	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/maps/racetrack.mapinfo	2009-07-13 11:41:39 UTC (rev 7218)
@@ -4,5 +4,5 @@
 _diameter 9083.417969
 _spawnpoints 0
 has weapons
-type race 5 20 15
+type rc 20 5 7 15
 cdtrack 7

Modified: branches/nexuiz-2.0/data/models/player/carni.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/carniarmor.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/fricka.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/grunt.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/headhunter.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/heroine.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/insurrectionist.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/lurk.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/lycanthrope.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/marine.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/mulder.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/nexus.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/pyria.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/quark.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/reptile.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/shock.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/skadi.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/specop.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/models/player/xolar.tga
===================================================================
(Binary files differ)

Modified: branches/nexuiz-2.0/data/physics15.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics15.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physics15.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0.25
+sv_friction_on_land 0.25

Modified: branches/nexuiz-2.0/data/physics151.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics151.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physics151.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physics151b.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics151b.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physics151b.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physics16rc1.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics16rc1.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physics16rc1.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0.2
+sv_friction_on_land 0.2

Modified: branches/nexuiz-2.0/data/physics25.cfg
===================================================================
--- branches/nexuiz-2.0/data/physics25.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physics25.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsCPMA.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsCPMA.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsCPMA.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1,7 +1,7 @@
 // these values match CPMA
 sv_gravity 800
 sv_maxspeed 320
-sv_maxairspeed $sv_maxspeed
+sv_maxairspeed 320
 sv_accelerate 15
 sv_airaccelerate 1
 sv_friction 8
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsCPMAnex.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsCPMAnex.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsCPMAnex.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsHavoc.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsHavoc.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsHavoc.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsNexrun.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsNexrun.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsNexrun.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsQ.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQ.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsQ.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsQ3.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQ3.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsQ3.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1,7 +1,7 @@
 // these values match Quake3
 sv_gravity 800
 sv_maxspeed 320
-sv_maxairspeed $sv_maxspeed
+sv_maxairspeed 320
 sv_accelerate 10
 sv_airaccelerate 1
 sv_friction 6
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsQBF.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQBF.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsQBF.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsQBFplus.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQBFplus.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsQBFplus.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsQBR.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsQBR.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsQBR.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsWarsow.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsWarsow.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsWarsow.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1,7 +1,7 @@
 // these values match Warsow 0.42
 sv_gravity 850
 sv_maxspeed 320
-sv_maxairspeed $sv_maxspeed
+sv_maxairspeed 320
 sv_accelerate 15
 sv_airaccelerate 1
 sv_friction 8
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsWarsowClassicBunny.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsWarsowClassicBunny.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsWarsowClassicBunny.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1,7 +1,7 @@
 // these values match Warsow 0.42 GS_CLASSICBUNNY
 sv_gravity 850
 sv_maxspeed 320
-sv_maxairspeed $sv_maxspeed
+sv_maxairspeed 320
 sv_accelerate 15
 sv_airaccelerate 1
 sv_friction 8
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1593
 sv_warsowbunny_topspeed 925
 sv_warsowbunny_backtosideratio 0.8
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/physicsWarsowDev.cfg
===================================================================
--- branches/nexuiz-2.0/data/physicsWarsowDev.cfg	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/physicsWarsowDev.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1,7 +1,7 @@
 // these values match Warsow 0.42
 sv_gravity 850
 sv_maxspeed 320
-sv_maxairspeed $sv_maxspeed
+sv_maxairspeed 320
 sv_accelerate 12
 sv_airaccelerate 1
 sv_friction 8
@@ -20,4 +20,4 @@
 sv_warsowbunny_accel 0.1585
 sv_warsowbunny_topspeed 900
 sv_warsowbunny_backtosideratio 0.9
-set sv_friction_on_land 0
+sv_friction_on_land 0

Modified: branches/nexuiz-2.0/data/qcsrc/client/Main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/Main.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/client/Main.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -920,7 +920,6 @@
 
 			if(race_checkpoint == 0 || race_checkpoint == 254)
 			{
-				race_penaltytime = 0;
 				race_penaltyaccumulator = 0;
 				race_laptime = time; // valid
 			}

Modified: branches/nexuiz-2.0/data/qcsrc/client/gibs.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/gibs.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/client/gibs.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -124,6 +124,7 @@
 	vector org, vel;
 	string specstr;
 	float issilent;
+	string gentle_prefix;
 
 	float c, gibfactor, randomvalue;
 
@@ -137,6 +138,14 @@
 	if(cvar("cl_gentle"))
 		type |= 0x80; // set gentle bit
 
+	if(type & 0x80)
+	{
+		if(cvar("cl_gentle") > 1)
+			gentle_prefix = "";
+		else
+			gentle_prefix = "morphed_";
+	}
+
 	gibfactor = 1 - cvar("cl_nogibs");
 	if(gibfactor <= 0)
 		return;
@@ -201,10 +210,10 @@
 				TossGib ("models/gibs/chunk.mdl", org, vel, prandomvec() * (prandom() * 30 + 20), specnum, 1, issilent); // TODO maybe adjust to more randomization?
 			break;
 		case 0x81:
-			pointparticles(particleeffectnum("damage_dissolve"), org, vel, amount);
+			pointparticles(particleeffectnum(strcat(gentle_prefix, "damage_dissolve")), org, vel, amount);
 			break;
 		case 0x82:
-			pointparticles(particleeffectnum("damage_hit"), org, vel, amount * 16);
+			pointparticles(particleeffectnum(strcat(gentle_prefix, "damage_hit")), org, vel, amount * 16);
 			break;
 		case 0x83:
 			// no gibs in gentle mode, sorry

Modified: branches/nexuiz-2.0/data/qcsrc/client/sbar.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/sbar.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/client/sbar.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1264,10 +1264,11 @@
  	topright_z = 0;
 
 	//get the ID (could be "me", or the player I'm spectating)
-	if (spectatee_status)
+	if (spectatee_status > 0)
 		desiredPlayerId = spectatee_status - 1;
 	else
 		desiredPlayerId = player_localentnum - 1;
+	me = playerslots[desiredPlayerId];
 
 	sbar_y = vid_conheight - (32+12);
 	sbar_x -= margin;
@@ -1457,7 +1458,7 @@
 		Sbar_DrawXNum(topright - '36 0 0' - '3 0 0' + '0 2 0', seconds, -2, 18, timer_color, 0, 0, sbar_alpha_fg, DRAWFLAG_NORMAL);
 	}
 
-	if(gametype == GAME_RACE)
+	if(gametype == GAME_RACE || gametype == GAME_CTS)
 	{
 		drawfont = sbar_bigfont;
 		float a, t;
@@ -1731,6 +1732,8 @@
 	havail = vid_conheight;
 	if(cvar("con_chatpos") < 0)
 		havail -= (-cvar("con_chatpos") + cvar("con_chat")) * cvar("con_chatsize"); // avoid overlapping chat
+	if(havail > vid_conheight - 70)
+		havail = vid_conheight - 70; // avoid overlapping HUD
 
 	centerprint_start_x = 0;
 

Modified: branches/nexuiz-2.0/data/qcsrc/common/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/constants.qh	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/common/constants.qh	2009-07-13 11:41:39 UTC (rev 7218)
@@ -37,6 +37,7 @@
 const float GAME_ONSLAUGHT	= 10;
 const float GAME_RACE	= 11;
 const float GAME_NEXBALL = 12;
+const float GAME_CTS = 13;
 
 const float AS_STRING		= 1;
 const float AS_INT		= 2;

Modified: branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -348,12 +348,8 @@
 			}
 			else if(k == "race_place")
 			{
-				if(v == "1")
-					spawnplaces |= 1;
-				else if(v == "2")
-					spawnplaces |= 2;
-				else if(v == "3")
-					spawnplaces |= 4;
+				if(stof(v) > 0)
+					spawnplaces = 1;
 			}
 			else if(k == "classname")
 			{
@@ -418,8 +414,11 @@
 	}
 
 	if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE)
-		if(spawnplaces != 7)
-			MapInfo_Map_flags |= MAPINFO_FLAG_FRUSTRATING;
+	if(!spawnplaces)
+	{
+		MapInfo_Map_supportedGametypes &~= MAPINFO_TYPE_RACE;
+		MapInfo_Map_supportedGametypes |= MAPINFO_TYPE_CTS;
+	}
 
 	dprint("-> diameter ",    ftos(diameter));
 	dprint(";  spawnpoints ", ftos(spawnpoints));
@@ -451,7 +450,7 @@
 	if(!(pThisType & pWantedType))
 		return;
 	
-	if(pWantedType == MAPINFO_TYPE_ASSAULT || pWantedType == MAPINFO_TYPE_ONSLAUGHT) // these modes don't use fraglimit
+	if(pWantedType == MAPINFO_TYPE_ASSAULT || pWantedType == MAPINFO_TYPE_ONSLAUGHT || pWantedType == MAPINFO_TYPE_RACE || pWantedType == MAPINFO_TYPE_CTS) // these modes don't use fraglimit
 	{
 		cvar_set("fraglimit", "0");
 	}
@@ -486,8 +485,26 @@
 		s = cdr(s);
 	}
 
+	// rc = timelimit timelimit_qualification laps laps_teamplay
 	if(pWantedType == MAPINFO_TYPE_RACE)
 	{
+		sa = car(s); if(sa == "") sa = cvar_string("timelimit");
+		cvar_set("g_race_qualifying_timelimit", sa);
+		s = cdr(s);
+
+		sa = car(s); if(sa == "") sa = "10";
+		if(cvar("g_race_teams") < 2)
+			cvar_set("fraglimit", sa);
+		s = cdr(s);
+
+		sa = car(s); if(sa == "") sa = "20";
+		if(cvar("g_race_teams") >= 2)
+			cvar_set("fraglimit", sa);
+		s = cdr(s);
+	}
+
+	if(pWantedType == MAPINFO_TYPE_CTS)
+	{
 		sa = car(s); if(sa == "") sa = cvar_string("fraglimit");
 		if(cvar("g_race_teams"))
 			cvar_set("fraglimit", sa);
@@ -511,12 +528,65 @@
 	else if(t == "kh")      return MAPINFO_TYPE_KEYHUNT;
 	else if(t == "as")      return MAPINFO_TYPE_ASSAULT;
 	else if(t == "ons")     return MAPINFO_TYPE_ONSLAUGHT;
-	else if(t == "race")    return MAPINFO_TYPE_RACE;
+	else if(t == "rc")      return MAPINFO_TYPE_RACE;
 	else if(t == "nexball") return MAPINFO_TYPE_NEXBALL;
+	else if(t == "cts")     return MAPINFO_TYPE_CTS;
 	else if(t == "all")     return MAPINFO_TYPE_ALL;
 	else                    return 0;
 }
 
+void _MapInfo_Parse_Settemp(string pFilename, string acl, string s, float recurse)
+{
+	string t;
+	float fh;
+	t = car(s); s = cdr(s);
+	if(t == "#include")
+	{
+		if(recurse > 0)
+		{
+			fh = fopen(s, FILE_READ);
+			if(fh < 0)
+				print("Map ", pFilename, " references not existing config file ", s, "\n");
+			else
+			{
+				for(;;)
+				{
+					if not((s = fgets(fh)))
+						break;
+
+					// catch different sorts of comments
+					if(s == "")                    // empty lines
+						continue;
+					if(substring(s, 0, 1) == "#")  // UNIX style
+						continue;
+					if(substring(s, 0, 2) == "//") // C++ style
+						continue;
+					if(substring(s, 0, 1) == "_")  // q3map style
+						continue;
+
+					_MapInfo_Parse_Settemp(pFilename, acl, s, recurse - 1);
+				}
+				fclose(fh);
+			}
+		}
+		else
+			print("Map ", pFilename, " uses too many levels of inclusion\n");
+	}
+	else if not(cvar_value_issafe(t))
+		print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+	else if not (cvar_value_issafe(s))
+		print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+	else if(substring(t, 0, 10) == "g_mapinfo_")
+		print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
+	else if(matchacl(acl, t) <= 0)
+		print("Map ", pFilename, " contains a denied setting, ignored\n");
+	else
+	{
+		dprint("Applying temporary setting ", t, " := ", s, "\n");
+		cvar_settemp(t, s);
+	}
+}
+
 // load info about a map by name into the MapInfo_Map_* globals
 float MapInfo_Get_ByName(string pFilename, float pAllowGenerate, float pGametypeToSet)
 {
@@ -595,9 +665,10 @@
 		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ARENA)           fputs(fh, "type arena 10 20\n");
 		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_KEYHUNT)         fputs(fh, "type kh 1000 20 3\n");
 		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ASSAULT)         fputs(fh, "type as 20\n");
-		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE)            fputs(fh, "type race 5 20 15\n");
+		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_RACE)            fputs(fh, "type rc 20 5 7 15\n");
 		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_ONSLAUGHT)       fputs(fh, "type ons 20\n");
 		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_NEXBALL)         fputs(fh, "type nexball 5 20\n");
+		if(MapInfo_Map_supportedGametypes & MAPINFO_TYPE_CTS)             fputs(fh, "type cts 20 -1\n");
 
 		fh2 = fopen(strcat("scripts/", pFilename, ".arena"), FILE_READ);
 		if(fh2 >= 0)
@@ -709,20 +780,7 @@
 			{
 				if(f & pGametypeToSet)
 				{
-					t = car(s); s = cdr(s);
-					if not(cvar_value_issafe(t))
-						print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
-					else if not (cvar_value_issafe(s))
-						print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
-					else if(substring(t, 0, 10) == "g_mapinfo_")
-						print("Map ", pFilename, " contains a potentially harmful setting, ignored\n");
-					else if(matchacl(acl, t) <= 0)
-						print("Map ", pFilename, " contains a denied setting, ignored\n");
-					else
-					{
-						dprint("Applying temporary setting ", t, " := ", s, "\n");
-						cvar_settemp(t, s);
-					}
+					_MapInfo_Parse_Settemp(pFilename, acl, s, 1);
 				}
 			}
 			else
@@ -851,7 +909,7 @@
 {
 	float req;
 	req = 0;
-	if(!(cvar("g_lms") || cvar("g_instagib") || cvar("g_minstagib") || cvar("g_nixnex") || cvar("g_rocketarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_nexball")))
+	if(!(cvar("g_lms") || cvar("g_instagib") || cvar("g_minstagib") || cvar("g_nixnex") || cvar("g_rocketarena") || !cvar("g_pickup_items") || cvar("g_race") || cvar("g_cts") || cvar("g_nexball")))
 		req |= MAPINFO_FEATURE_WEAPONS;
 	return req;
 }
@@ -880,6 +938,8 @@
 		return MAPINFO_TYPE_RACE;
 	else if(cvar("g_nexball"))
 		return MAPINFO_TYPE_NEXBALL;
+	else if(cvar("g_cts"))
+		return MAPINFO_TYPE_CTS;
 	else
 		return MAPINFO_TYPE_DEATHMATCH;
 }
@@ -918,6 +978,8 @@
 		case MAPINFO_TYPE_ASSAULT: return "g_assault";
 		case MAPINFO_TYPE_ONSLAUGHT: return "g_onslaught";
 		case MAPINFO_TYPE_RACE: return "g_race";
+		case MAPINFO_TYPE_NEXBALL: return "g_nexball";
+		case MAPINFO_TYPE_CTS: return "g_cts";
 		default: return "";
 	}
 }
@@ -937,6 +999,7 @@
 	cvar_set("g_onslaught",  (t == MAPINFO_TYPE_ONSLAUGHT)       ? "1" : "0");
 	cvar_set("g_race",       (t == MAPINFO_TYPE_RACE)            ? "1" : "0");
 	cvar_set("g_nexball",    (t == MAPINFO_TYPE_NEXBALL)         ? "1" : "0");
+	cvar_set("g_cts",        (t == MAPINFO_TYPE_CTS)             ? "1" : "0");
 }
 
 void MapInfo_LoadMap(string s)

Modified: branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qh	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/common/mapinfo.qh	2009-07-13 11:41:39 UTC (rev 7218)
@@ -10,6 +10,7 @@
 float MAPINFO_TYPE_ARENA			= 512;
 float MAPINFO_TYPE_KEYHUNT			= 1024;
 float MAPINFO_TYPE_NEXBALL          = 2048;
+float MAPINFO_TYPE_CTS              = 4096;
 float MAPINFO_TYPE_ALL              = 65535; // this has to include all above bits
 
 float MAPINFO_FEATURE_WEAPONS       = 1; // not defined for minstagib-only maps

Modified: branches/nexuiz-2.0/data/qcsrc/common/util.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/util.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/common/util.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -425,8 +425,9 @@
 	else if (g == GAME_KEYHUNT) return "kh";
 	else if (g == GAME_ONSLAUGHT) return "ons";
 	else if (g == GAME_ASSAULT) return "as";
-	else if (g == GAME_RACE) return "race";
+	else if (g == GAME_RACE) return "rc";
 	else if (g == GAME_NEXBALL) return "nexball";
+	else if (g == GAME_CTS) return "cts";
 	return "dm";
 }
 
@@ -870,6 +871,8 @@
 #else
 void cvar_settemp(string pKey, string pValue)
 {
+	if(cvar_string(pKey) == pValue)
+		return;
 	cvar_set("settemp_list", strcat("1 ", pKey, " ", cvar_string("settemp_var"), " ", cvar_string("settemp_list")));
 #ifdef MENUQC
 	registercvar(cvar_string("settemp_var"), "", 0);
@@ -1302,12 +1305,16 @@
 
 float isGametypeInFilter(float gt, float tp, string pattern)
 {
-	string subpattern, subpattern2;
+	string subpattern, subpattern2, subpattern3;
 	subpattern = strcat(",", GametypeNameFromType(gt), ",");
 	if(tp)
 		subpattern2 = ",teams,";
 	else
 		subpattern2 = ",noteams,";
+	if(gt == GAME_RACE || gt == GAME_CTS)
+		subpattern3 = ",race,";
+	else
+		subpattern3 = string_null;
 
 	if(substring(pattern, 0, 1) == "-")
 	{
@@ -1316,6 +1323,8 @@
 			return 0;
 		if(strstrofs(strcat(",", pattern, ","), subpattern2, 0) >= 0)
 			return 0;
+		if(subpattern3 && strstrofs(strcat(",", pattern, ","), subpattern3, 0) >= 0)
+			return 0;
 	}
 	else
 	{
@@ -1323,6 +1332,7 @@
 			pattern = substring(pattern, 1, strlen(pattern) - 1);
 		if(strstrofs(strcat(",", pattern, ","), subpattern, 0) < 0)
 		if(strstrofs(strcat(",", pattern, ","), subpattern2, 0) < 0)
+		if((!subpattern3) || strstrofs(strcat(",", pattern, ","), subpattern3, 0) < 0)
 			return 0;
 	}
 	return 1;

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c	2009-07-13 11:41:39 UTC (rev 7218)
@@ -32,7 +32,7 @@
 	float n;
 
 	me.TR(me);
-		n = 5;
+		n = 6;
 		me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_dm", "DM"));
 			e0 = e;
 		me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_lms", "LMS"));
@@ -43,6 +43,8 @@
 			if(e.checked) e0 = NULL;
 		me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_race", "Race"));
 			if(e.checked) e0 = NULL;
+		me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_cts", "Race CTS"));
+			if(e.checked) e0 = NULL;
 	me.TR(me);
 		n = 7;
 		me.TD(me, 1, me.columns / n, e = makeNexuizGametypeButton(1, "g_tdm", "TDM"));
@@ -210,6 +212,7 @@
 		case MAPINFO_TYPE_NEXBALL:    GameType_ConfigureSliders(e, l, l2, "Goals:",           1,   50,  1, "g_nexball_goallimit");      break;
 		case MAPINFO_TYPE_ASSAULT:    GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
 		case MAPINFO_TYPE_ONSLAUGHT:  GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
+		case MAPINFO_TYPE_CTS:        GameType_ConfigureSliders(e, l, l2, "Point limit:",    50,  500, 10, "");                         break;
 		default:                      GameType_ConfigureSliders(e, l, l2, "Frag limit:",      5,  100,  5, "fraglimit_override");       break;
 	}
 	me.mapListBox.refilter(me.mapListBox);

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_playersetup.c	2009-07-13 11:41:39 UTC (rev 7218)
@@ -152,10 +152,12 @@
 		me.TDempty(me, 0.5);
 	me.TR(me);
 	me.TR(me);
+#ifdef ALLOW_FORCEMODELS
 		me.TD(me, 1, 1, e = makeNexuizTextLabel(0, "Force Models:"));
 		me.TD(me, 1, 2/3, e = makeNexuizRadioButton(2, string_null, string_null, "None"));
 		me.TD(me, 1, 2/3, e = makeNexuizRadioButton(2, "cl_forceplayermodelsfromnexuiz", string_null, "Custom"));
 		me.TD(me, 1, 2/3, e = makeNexuizRadioButton(2, "cl_forceplayermodels", string_null, "All"));
+#endif
 
 	me.gotoRC(me, me.rows - 1, 0);
 		me.TD(me, 1, me.columns, makeNexuizCommandButton("Apply immediately", '0 0 0', "color -1 -1;name \"$_cl_name\";sendcvar cl_weaponpriority;sendcvar cl_zoomfactor;sendcvar cl_zoomspeed;sendcvar cl_autoswitch;sendcvar cl_shownames;sendcvar cl_forceplayermodelsfromnexuiz;sendcvar cl_forceplayermodels", COMMANDBUTTON_APPLY));

Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -417,11 +417,15 @@
 #endif
 
 	modelsource = self;
+
+#ifdef ALLOW_FORCEMODELS
 	if(other.cvar_cl_forceplayermodelsfromnexuiz)
 		if not(self.modelindex_lod0_from_nexuiz)
 			modelsource = other;
 	if(other.cvar_cl_forceplayermodels && sv_clforceplayermodels)
 		modelsource = other;
+#endif
+
 	self.skin = modelsource.skinindex;
 
 #if 0
@@ -1125,6 +1129,9 @@
 	float killtime;
 	entity e;
 	killtime = cvar("g_balance_kill_delay");
+	
+	if(g_race_qualifying)
+		killtime = 0;
 
 	self.killindicator_teamchange = targetteam;
 
@@ -2533,7 +2540,7 @@
 	if(self.spectatee_status != oldspectatee_status)
 	{
 		ClientData_Touch(self);
-		if(g_race)
+		if(g_race || g_cts)
 			race_InitSpectator();
 	}
 
@@ -2837,23 +2844,6 @@
 
 		//if (TetrisPostFrame()) return;
 
-		// restart countdown
-		if (!cvar("sv_ready_restart_after_countdown"))
-		{
-			if(time < game_starttime)
-			{
-				self.movetype = MOVETYPE_NONE;		
-				self.velocity = '0 0 0';
-				self.avelocity = '0 0 0';
-				self.movement = '0 0 0';
-			}
-			else
-			{
-				//allow the player to move again if sv_ready_restart_after_countdown is not used and countdown is over
-				if(self.movetype == MOVETYPE_NONE)
-					self.movetype = MOVETYPE_WALK;
-			}
-		}
 		GetPressedKeys();
 	} else if (self.classname == "observer") {
 		//do nothing

Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_physics.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -471,6 +471,7 @@
 	local float wishspeed, f, maxspd_mod, spd, maxairspd, airaccel, swampspd_mod, shtest_score, buttons;
 	string temps;
 	float buttons_prev;
+	float not_allowed_to_move;
 
     if(self.PlayerPhysplug)
         if(self.PlayerPhysplug())
@@ -527,24 +528,28 @@
 	self.items &~= IT_USING_JETPACK;
 
 	if(self.race_penalty)
-	{
 		if(time > self.race_penalty)
-		{
-			if(self.disableclientprediction == 2)
-			{
-				self.movetype = MOVETYPE_WALK;
-				self.disableclientprediction = 0;
-			}
 			self.race_penalty = 0;
-		}
-	}
 
+	not_allowed_to_move = 0;
 	if(self.race_penalty)
+		not_allowed_to_move = 1;
+	if(!cvar("sv_ready_restart_after_countdown"))
+	if(time < game_starttime)
+		not_allowed_to_move = 1;
+
+	if(not_allowed_to_move)
 	{
 		self.velocity = '0 0 0';
 		self.movetype = MOVETYPE_NONE;
 		self.disableclientprediction = 2;
 	}
+	else if(self.disableclientprediction == 2)
+	{
+		if(self.movetype == MOVETYPE_NONE)
+			self.movetype = MOVETYPE_WALK;
+		self.disableclientprediction = 0;
+	}
 
 	if (self.movetype == MOVETYPE_NONE)
 		return;

Modified: branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/clientcommands.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -233,7 +233,7 @@
 			return;
 
 		if((inWarmupStage && 0 >= g_warmup_limit) // with unlimited warmup players have to be able to restart
-		   || cvar("sv_ready_restart"))
+		   || cvar("sv_ready_restart") || g_race_qualifying == 2)
 		{
 			if(!readyrestart_happened || cvar("sv_ready_restart_repeatable"))
 			{
@@ -454,7 +454,7 @@
 	VoteReset();
 
 	// clear overtime
-	if (checkrules_overtimesadded > 0) {
+	if (checkrules_overtimesadded > 0 && g_race_qualifying != 2) {
 		//we have to decrease timelimit to its original value again!!
 		float newTL;
 		newTL = cvar("timelimit");
@@ -511,13 +511,13 @@
 	if(g_arena | g_assault | gameover | intermission_running | race_completing)
 		localcmd("restart\n");
 
+	ReadyRestartForce();
+
 	// reset ALL scores, but only do that at the beginning
 	//of the countdown if sv_ready_restart_after_countdown is off!
 	//Otherwise scores could be manipulated during the countdown!
 	if (!cvar("sv_ready_restart_after_countdown"))
 		Score_ClearAll();
-
-	ReadyRestartForce();
 }
 
 /**
@@ -558,8 +558,8 @@
  */
 void restartTimer_Think() {
 	restart_mapalreadyrestarted = 1;
+	reset_map(TRUE);
 	Score_ClearAll();
-	reset_map(TRUE);
 	remove(self);
 	return;
 }

Modified: branches/nexuiz-2.0/data/qcsrc/server/constants.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/constants.qh	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/constants.qh	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1,4 +1,4 @@
-string CVAR_CHECK_DEFAULT = "9b8ca48c50d9e2af73245655fdb29b04";
+string CVAR_CHECK_DEFAULT = "1247e8cd8be7bda1c260795d5bebb20b";
 string CVAR_CHECK_WEAPONS = "4f7b4c1e2feeef4988b02a93ff35a2ca";
 
 float	FALSE					= 0;

Modified: branches/nexuiz-2.0/data/qcsrc/server/defs.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/defs.qh	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/defs.qh	2009-07-13 11:41:39 UTC (rev 7218)
@@ -17,7 +17,7 @@
 
 float ctf_score_value(string parameter);
 
-float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_lms, g_runematch, g_race, g_nexball;
+float g_dm, g_domination, g_ctf, g_tdm, g_keyhunt, g_onslaught, g_assault, g_arena, g_lms, g_runematch, g_race, g_nexball, g_cts;
 float g_cloaked, g_footsteps, g_jump_grunt, g_grappling_hook, g_laserguided_missile, g_midair, g_minstagib, g_nixnex, g_nixnex_with_laser, g_pinata, g_norecoil, g_vampire, g_minstagib_invis_alpha, g_bloodloss;
 float g_warmup_limit;
 float g_warmup_allguns;
@@ -329,9 +329,11 @@
 .string cvar_g_nexuizversion;
 .string cvar_cl_weaponpriority;
 .string cvar_cl_weaponpriorities[10];
+#ifdef ALLOW_FORCEMODELS
 .float cvar_cl_forceplayermodels;
 .float cvar_cl_forceplayermodelsfromnexuiz;
 float sv_clforceplayermodels;
+#endif
 float sv_loddistance1;
 float sv_loddistance2;
 .float cvar_cl_gunalign;

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -251,6 +251,7 @@
 		BADCVAR("g_keyhunt_teams");
 		BADCVAR("g_onslaught");
 		BADCVAR("g_race");
+		BADCVAR("g_cts");
 		BADCVAR("g_runematch");
 		BADCVAR("g_tdm");
 		BADCVAR("teamplay");
@@ -1899,9 +1900,9 @@
 						++readyplayers;
 				}
 
-				// at least 2/3 of the players have completed a lap: start the RACE
+				// at least 2 of the players have completed a lap: start the RACE
 				// otherwise, the players should end the qualifying on their own
-				if(readyplayers || ((totalplayers >= 3) && (playerswithlaps * 3 >= totalplayers * 2)))
+				if(readyplayers || playerswithlaps >= 2)
 				{
 					checkrules_suddendeathend = 0;
 					ReadyRestart(); // go to race

Modified: branches/nexuiz-2.0/data/qcsrc/server/havocbot_roles.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/havocbot_roles.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/havocbot_roles.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -637,7 +637,7 @@
 		havocbot_chooserole_dom();
 	else if (g_keyhunt)
 		havocbot_chooserole_kh();
-	else if (g_race)
+	else if (g_race || g_cts)
 		havocbot_chooserole_race();
 	else if (g_onslaught)
 		havocbot_chooserole_ons();

Modified: branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/miscfunctions.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -532,8 +532,10 @@
     GetCvars_handleFloat(s, f, cvar_cl_voice_directional, "cl_voice_directional");
     GetCvars_handleFloat(s, f, cvar_cl_voice_directional_taunt_attenuation, "cl_voice_directional_taunt_attenuation");
     GetCvars_handleFloat(s, f, cvar_cl_hitsound, "cl_hitsound");
+#ifdef ALLOW_FORCEMODELS
     GetCvars_handleFloat(s, f, cvar_cl_forceplayermodels, "cl_forceplayermodels");
     GetCvars_handleFloat(s, f, cvar_cl_forceplayermodelsfromnexuiz, "cl_forceplayermodelsfromnexuiz");
+#endif
     GetCvars_handleFloat(s, f, cvar_cl_gunalign, "cl_gunalign");
 
 
@@ -876,7 +878,7 @@
             {
                 if (g_lms)
                     t = (e.spawnflags & WEPSPAWNFLAG_NORMAL);
-                else if (g_race)
+                else if (g_race || g_cts)
                     t = (i == WEP_LASER);
                 else if (g_nexball)
                     t = 0; // weapon is set a few lines later
@@ -1018,7 +1020,9 @@
     g_touchexplode_edgedamage = cvar("g_touchexplode_edgedamage");
     g_touchexplode_force = cvar("g_touchexplode_force");
 
+#ifdef ALLOW_FORCEMODELS
     sv_clforceplayermodels = cvar("sv_clforceplayermodels");
+#endif
     sv_loddistance1 = cvar("sv_loddistance1");
     sv_loddistance2 = cvar("sv_loddistance2");
 	if(sv_loddistance2 <= sv_loddistance1)
@@ -1051,7 +1055,7 @@
     g_warmup_allguns = cvar("g_warmup_allguns");
     g_warmup_allow_timeout = cvar("g_warmup_allow_timeout");
 
-    if (g_race && g_race_qualifying == 2 || g_arena || g_assault || cvar("g_campaign"))
+    if ((g_race && g_race_qualifying == 2) || g_arena || g_assault || cvar("g_campaign"))
         inWarmupStage = 0; // these modes cannot work together, sorry
 
     g_pickup_respawntime_weapon = cvar("g_pickup_respawntime_weapon");
@@ -1960,7 +1964,7 @@
         }
     }
 
-    if (g_race)
+    if (g_race || g_cts)
     {
         for (i = 0; i < MapInfo_count; ++i)
         {
@@ -1975,6 +1979,7 @@
             }
         }
     }
+
     MapInfo_ClearTemps();
 
     if (s == "")
@@ -2117,7 +2122,7 @@
 string GetGametype(); // g_world.qc
 void write_recordmarker(entity pl, float tstart, float dt)
 {
-    GameLogEcho(strcat(":recordset:", ftos(pl.playerid), ":", ftos(dt / 10)));
+    GameLogEcho(strcat(":recordset:", ftos(pl.playerid), ":", ftos(dt)));
 
     // also write a marker into demo files for demotc-race-record-extractor to find
     stuffcmd(pl,

Modified: branches/nexuiz-2.0/data/qcsrc/server/race.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/race.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/race.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -363,6 +363,18 @@
 
 	if(other.race_checkpoint == -1 || other.race_checkpoint == self.race_checkpoint)
 	{
+		if(self.race_penalty)
+		{
+			if(other.race_lastpenalty != self)
+			{
+				other.race_lastpenalty = self;
+				race_ImposePenaltyTime(other, self.race_penalty, self.race_penalty_reason);
+			}
+		}
+
+		if(other.race_penalty)
+			return;
+
 		/*
 		 * Trigger targets
 		 */
@@ -375,8 +387,6 @@
 			self.message = oldmsg;
 		}
 
-		race_ImposePenaltyTime(other, self.race_penalty, self.race_penalty_reason);
-
 		other.race_checkpoint = race_NextCheckpoint(self.race_checkpoint);
 
 		race_SendTime(other, self.race_checkpoint, time - other.race_laptime, !!other.race_laptime);
@@ -492,7 +502,7 @@
 void spawnfunc_trigger_race_checkpoint()
 {
 	vector o;
-	if(!g_race)
+	if(!g_race && !g_cts)
 	{
 		remove(self);
 		return;
@@ -559,7 +569,7 @@
 
 void race_RetractPlayer()
 {
-	if(!g_race)
+	if(!g_race && !g_cts)
 		return;
 	self.race_checkpoint = race_PreviousCheckpoint(self.race_checkpoint);
 	if(self.race_checkpoint == 0)
@@ -571,7 +581,7 @@
 
 void race_PreDie()
 {
-	if(!g_race)
+	if(!g_race && !g_cts)
 		return;
 
 	race_AbandonRaceCheck(self);
@@ -579,7 +589,7 @@
 
 void race_PreSpawn()
 {
-	if(!g_race)
+	if(!g_race && !g_cts)
 		return;
 	if(self.killcount == -666 || g_race_qualifying)
 		race_PreparePlayer();
@@ -589,7 +599,7 @@
 
 void race_PostSpawn(entity spot)
 {
-	if(!g_race)
+	if(!g_race && !g_cts)
 		return;
 	if(self.killcount != -666 && !g_race_qualifying)
 	{
@@ -608,14 +618,14 @@
 
 void race_PreSpawnObserver()
 {
-	if(!g_race)
+	if(!g_race && !g_cts)
 		return;
 	race_PreparePlayer();
 }
 
 void spawnfunc_info_player_race (void)
 {
-	if(!g_race)
+	if(!g_race && !g_cts)
 	{
 		remove(self);
 		return;
@@ -648,6 +658,8 @@
 
 void race_ReadyRestart()
 {
+	float s;
+
 	Score_NicePrint(world);
 
 	race_ClearRecords();
@@ -655,7 +667,15 @@
 
 	entity e;
 	FOR_EACH_CLIENT(e)
+	{
+		if(e.race_place)
+		{
+			s = PlayerScore_Add(e, SP_RACE_FASTEST, 0);
+			if(!s)
+				e.race_place = 0;
+		}
 		print(e.netname, " = ", ftos(e.race_place), "\n");
+	}
 
 	if(g_race_qualifying == 2)
 	{
@@ -663,6 +683,7 @@
 		independent_players = 0;
 		cvar_set("fraglimit", ftos(race_fraglimit));
 		cvar_set("leadlimit", ftos(race_leadlimit));
+		cvar_set("timelimit", ftos(race_timelimit));
 		ScoreRules_race();
 	}
 }

Modified: branches/nexuiz-2.0/data/qcsrc/server/race.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/race.qh	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/race.qh	2009-07-13 11:41:39 UTC (rev 7218)
@@ -13,6 +13,7 @@
 float race_lowest_place_spawn; // where to spawn in qualifying
 float race_fraglimit;
 float race_leadlimit;
+float race_timelimit;
 .float race_place;
 .float race_completed;
 float race_completing;

Modified: branches/nexuiz-2.0/data/qcsrc/server/t_teleporters.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/t_teleporters.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/t_teleporters.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -83,7 +83,7 @@
 
 	if(player.classname == "player")
 	{
-		if(player.takedamage && player.deadflag == DEAD_NO && !g_race && cvar("g_telefrags"))
+		if(player.takedamage && player.deadflag == DEAD_NO && !g_race && !g_cts && cvar("g_telefrags"))
 			tdeath(player, teleporter, telefragger, telefragmin, telefragmax);
 
 		// player no longer is on ground

Modified: branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/data/qcsrc/server/teamplay.qc	2009-07-13 11:41:39 UTC (rev 7218)
@@ -98,6 +98,7 @@
 	cvar_set("g_onslaught", ftos(g_onslaught));
 	cvar_set("g_race", ftos(g_race));
 	cvar_set("g_nexball", ftos(g_nexball));
+	cvar_set("g_cts", ftos(g_cts));
 }
 
 void ReadGameCvars()
@@ -122,6 +123,7 @@
 		found += (g_onslaught = (!found && (prev != GAME_ONSLAUGHT) && cvar("g_onslaught")));
 		found += (g_race = (!found && (prev != GAME_RACE) && cvar("g_race")));
 		found += (g_nexball = (!found && (prev != GAME_NEXBALL) && cvar("g_nexball")));
+		found += (g_cts = (!found && (prev != GAME_CTS) && cvar("g_cts")));
 
 		if(found)
 			break;
@@ -163,8 +165,10 @@
 
 void InitGameplayMode()
 {
-	float fraglimit_override, timelimit_override, leadlimit_override;
+	float fraglimit_override, timelimit_override, leadlimit_override, qualifying_override;
 
+	qualifying_override = -1;
+
 	VoteReset();
 
 	teams_matter = 0;
@@ -315,28 +319,30 @@
 	{
 		game = GAME_RACE;
 		gamemode_name = "Race";
-		g_race_qualifying = cvar("g_race_qualifying");
 
 		if(cvar("g_race_teams"))
 		{
-			g_race_qualifying = 0; // not supported!
 			ActivateTeamplay();
 			race_teams = bound(2, cvar("g_race_teams"), 4);
 		}
 		else
 			race_teams = 0;
 
-		if(g_race_qualifying == 1)
-			fraglimit_override = 0;
-		else
-			fraglimit_override = cvar("g_race_laps_limit");
-
+		qualifying_override = cvar("g_race_qualifying_timelimit_override");
+		fraglimit_override = cvar("g_race_laps_limit");
 		leadlimit_override = 0; // currently not supported by race
 
 		if(g_race_qualifying)
 			independent_players = 1;
+	}
 
-		ScoreRules_race();
+	if(g_cts)
+	{
+		game = GAME_CTS;
+		gamemode_name = "CTS";
+		g_race_qualifying = 1;
+		fraglimit_override = 0;
+		leadlimit_override = 0;
 	}
 
 	if(g_nexball)
@@ -367,16 +373,35 @@
 			cvar_set("timelimit", ftos(timelimit_override));
 		if(leadlimit_override >= 0)
 			cvar_set("leadlimit", ftos(leadlimit_override));
+		if(qualifying_override >= 0)
+			cvar_set("g_race_qualifying_timelimit", ftos(qualifying_override));
 	}
 
-	if(g_race && g_race_qualifying == 2)
+	if(g_race)
 	{
-		race_fraglimit = cvar("fraglimit");
-		cvar_set("fraglimit", "0");
-		race_leadlimit = cvar("leadlimit");
-		cvar_set("leadlimit", "0");
+		// we need to find out the correct value for g_race_qualifying
+		if(!cvar("g_campaign") && cvar("g_race_qualifying_timelimit") > 0)
+		{
+			g_race_qualifying = 2;
+			race_fraglimit = cvar("fraglimit");
+			race_leadlimit = cvar("leadlimit");
+			race_timelimit = cvar("timelimit");
+			cvar_set("fraglimit", "0");
+			cvar_set("leadlimit", "0");
+			cvar_set("timelimit", cvar_string("g_race_qualifying_timelimit"));
+		}
+		else
+			g_race_qualifying = 0;
 	}
 
+	if(g_race || g_cts)
+	{
+		if(g_race_qualifying)
+			independent_players = 1;
+
+		ScoreRules_race();
+	}
+
 	InitializeEntity(world, default_delayedinit, INITPRIO_GAMETYPE_FALLBACK);
 }
 

Copied: branches/nexuiz-2.0/data/weaponsNexrun.cfg (from rev 7217, trunk/data/weaponsNexrun.cfg)
===================================================================
--- branches/nexuiz-2.0/data/weaponsNexrun.cfg	                        (rev 0)
+++ branches/nexuiz-2.0/data/weaponsNexrun.cfg	2009-07-13 11:41:39 UTC (rev 7218)
@@ -0,0 +1,39 @@
+// weapon settings
+g_projectiles_newton_style 0
+g_shootfromcenter 1
+
+g_balance_grenadelauncher_secondary_speed_up 0
+g_balance_grenadelauncher_secondary_force 260
+g_balance_grenadelauncher_secondary_speed 800 
+g_balance_grenadelauncher_secondary_damage 100
+g_balance_grenadelauncher_secondary_edgedamage 100
+g_balance_grenadelauncher_secondary_radius 150
+g_balance_grenadelauncher_secondary_lifetime 2.5
+g_balance_grenadelauncher_secondary_refire 0.8
+g_balance_grenadelauncher_secondary_animtime 0.3
+g_balance_grenadelauncher_secondary_ammo 1
+
+g_balance_hagar_primary_ammo 1
+g_balance_hagar_primary_damage 20
+g_balance_hagar_primary_edgedamage 15
+g_balance_hagar_primary_force 43
+g_balance_hagar_primary_lifetime 10
+g_balance_hagar_primary_radius 20
+g_balance_hagar_primary_refire 0.10
+g_balance_hagar_primary_speed 2000
+g_balance_hagar_primary_spread 0
+
+g_balance_rocketlauncher_damage 100
+g_balance_rocketlauncher_edgedamage 100
+g_balance_rocketlauncher_force 270
+g_balance_rocketlauncher_radius 150
+g_balance_rocketlauncher_speed 1000
+g_balance_rocketlauncher_speedaccel 0
+g_balance_rocketlauncher_speedstart 1000
+g_balance_rocketlauncher_lifetime 30
+g_balance_rocketlauncher_refire 0.8
+g_balance_rocketlauncher_animtime 0.3
+g_balance_rocketlauncher_ammo 1
+
+g_balance_powerup_invincible_takedamage 0
+g_balance_powerup_invincible_time 999

Modified: branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/data/entities.def
===================================================================
--- branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/data/entities.def	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/misc/netradiant-NexuizPack/nexuiz.game/data/entities.def	2009-07-13 11:41:39 UTC (rev 7218)
@@ -1228,6 +1228,8 @@
 message2: Death message when someone gets pushed into this (default: "was thrown into a world of hurt by"). The # character is replaced by the attacker name if present (and it instead does not get appended to the end)
 targetname: Name of the checkpoint. info_player_race can target this to assign a spawn to a checkpoint. Also used for triggering a checkpoint by an event.
 target: when the checkpoint is passed, these entities are triggered. Useful for forcing items in certain areas using trigger_items
+race_penalty: when set, this penalty time is given if passing this checkpoint, and the checkpoint does not show up with a sprite. Useful for invisible checkpoints to detect driving around the intended checkpoint
+race_penalty_reason: reason to display when the penalty time is imposed. Default: "missing a checkpoint"
 -------- SPAWNFLAGS --------
 NOTOUCH: the checkpoint will not become active when touched, it HAS to be targeted
 STRICTTRIGGER: only trigger the targets when the checkpoint actually was reached in a valid way (that is, not when going back)
@@ -1235,6 +1237,15 @@
 FINISH: when set on the last checkpoint (i.e. the one with highest cnt), it is marked as finish line and the CP with cnt=0 is the start line
 */
 
+/*QUAKED trigger_race_penalty (0 1 0) ? NOTOUCH
+A penalty trigger.
+-------- KEYS --------
+race_penalty: this penalty time is given if passing this trigger
+race_penalty_reason: reason to display when the penalty time is imposed. Default: "leaving the track"
+-------- SPAWNFLAGS --------
+NOTOUCH: the trigger will not become active when touched, it HAS to be targeted
+*/
+
 /*QUAKED info_player_race (1 0.5 0) (-16 -16 -24) (16 16 45) 
 Race spawn point.
 NOTE for race_place: when the race starts after the qualifying, the player with the fastest map ends up at the info_player_race with race_place 1, and so on. If there are too many players, or if someone comes in later, he will spawn at an info_player_race with race_place not set. So for each trigger_race_checkpoint, there must be at least one corresponding info_player_race with race_place NOT set.

Modified: branches/nexuiz-2.0/misc/tools/demotc-race-record-extractor.sh
===================================================================
--- branches/nexuiz-2.0/misc/tools/demotc-race-record-extractor.sh	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/misc/tools/demotc-race-record-extractor.sh	2009-07-13 11:41:39 UTC (rev 7218)
@@ -5,7 +5,7 @@
 		PATTERN='all-time fastest lap record with (.*)\n'
 		;;
 	new|*)
-		PATTERN='//RACE RECORD SET (.*)\n'
+		PATTERN='//RA?CE? RECORD SET (.*)\n'
 		;;
 esac
 

Modified: branches/nexuiz-2.0/misc/tools/nexuiz-map-compiler
===================================================================
--- branches/nexuiz-2.0/misc/tools/nexuiz-map-compiler	2009-07-13 10:36:10 UTC (rev 7217)
+++ branches/nexuiz-2.0/misc/tools/nexuiz-map-compiler	2009-07-13 11:41:39 UTC (rev 7218)
@@ -19,7 +19,7 @@
 	our $Q3MAP2FLAGS = '';
 
 	# Default flags for the -bsp stage
-	our $BSPFLAGS    = '-samplesize 8 -minsamplesize 4 -mv 1000000 -mi 6000000';
+	our $BSPFLAGS    = '-meta -samplesize 8 -minsamplesize 4 -mv 1000000 -mi 6000000';
 
 	# Default flags for the -vis stage
 	our $VISFLAGS    = '';
@@ -63,7 +63,7 @@
 {
 	$_ = shift @ARGV;
 	my $enterflags = undef;
-	if($_ eq '-bsp' or $_ eq '-meta')
+	if($_ eq '-bsp')
 	{
 		$enterflags = 'bsp';
 	}
@@ -243,7 +243,7 @@
 		}
 
 		unlink <$m/lm_*>; # delete old external lightmaps
-		q3map2 '-bsp', '-meta', @{$options->{bsp}},   "$m.map"
+		q3map2 '-bsp', @{$options->{bsp}},   "$m.map"
 			or die "-bsp: $?";
 		if($prescale != 1)
 		{



More information about the nexuiz-commits mailing list