From 9a96df116c8bf1dd85571eb087cef7e2909f5676 Mon Sep 17 00:00:00 2001 From: div0 Date: Sun, 20 Sep 2009 10:06:26 +0000 Subject: [PATCH] race: do not fully verify CTS maps git-svn-id: svn://svn.icculus.org/nexuiz/trunk@7845 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/race.qc | 52 ++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 20 deletions(-) diff --git a/data/qcsrc/server/race.qc b/data/qcsrc/server/race.qc index c17aebf93..a2b904eea 100644 --- a/data/qcsrc/server/race.qc +++ b/data/qcsrc/server/race.qc @@ -453,34 +453,46 @@ void trigger_race_checkpoint_verify() self = spawn(); self.classname = "player"; - for(i = 0; i <= race_highest_checkpoint; ++i) + if(g_race) { - self.race_checkpoint = race_NextCheckpoint(i); - - // race only (middle of the race) - g_race_qualifying = 0; - self.race_place = 0; - if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), world, 0, FALSE)) - error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for respawning in race) - bailing out")); - - if(i == 0) + for(i = 0; i <= race_highest_checkpoint; ++i) { - // qualifying only - g_race_qualifying = 1; - self.race_place = race_lowest_place_spawn; - if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), world, 0, FALSE)) - error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for qualifying) - bailing out")); - - // race only (initial spawn) + self.race_checkpoint = race_NextCheckpoint(i); + + // race only (middle of the race) g_race_qualifying = 0; - for(p = 1; p <= race_highest_place_spawn; ++p) + self.race_place = 0; + if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), world, 0, FALSE)) + error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for respawning in race) - bailing out")); + + if(i == 0) { - self.race_place = p; + // qualifying only + g_race_qualifying = 1; + self.race_place = race_lowest_place_spawn; if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), world, 0, FALSE)) - error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for initially spawning in race) - bailing out")); + error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for qualifying) - bailing out")); + + // race only (initial spawn) + g_race_qualifying = 0; + for(p = 1; p <= race_highest_place_spawn; ++p) + { + self.race_place = p; + if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), world, 0, FALSE)) + error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for initially spawning in race) - bailing out")); + } } } } + else + { + // qualifying only + self.race_checkpoint = race_NextCheckpoint(0); + g_race_qualifying = 1; + self.race_place = race_lowest_place_spawn; + if(!Spawn_FilterOutBadSpots(findchain(classname, "info_player_deathmatch"), world, 0, FALSE)) + error(strcat("Checkpoint ", ftos(i), " misses a spawnpoint with race_place==", ftos(self.race_place), " (used for qualifying) - bailing out")); + } g_race_qualifying = qual; -- 2.39.2