CTS can now coexist with other modes as a circuit (which is most official flex ctf maps)

This commit is contained in:
surkeh
2017-10-10 18:19:58 -07:00
parent f88a4710f0
commit 579b23fccb
3 changed files with 12 additions and 16 deletions

View File

@@ -392,11 +392,7 @@ EntityConverter::convertPlayerSpawn (const std::vector<std::string> &lines) cons
}
}
else {
convertedLines.push_back ("\"classname\" \"info_player_race\"\n");
// Reflex maps have only start and finish, point to start on spawn
convertedLines.push_back ("\"target\" \"cp1\"\n");
// Reflex maps are only cts, set spawn to cts-only type
convertedLines.push_back ("\"race_place\" \"-1\"\n");
convertedLines.push_back ("\"classname\" \"info_player_start\"\n");
}
std::stringstream positionStream;
@@ -518,7 +514,7 @@ EntityConverter::convertTarget (const std::vector<std::string> &lines) const
if (haveName) {
auto targetIter = targetMap_.find (targetName);
if (targetIter == targetMap_.end()) {
std::cerr << makeErrorMessage ("End-game camera Target is not a supported feature in id Tech games. Skipping", lines);
//std::cerr << makeErrorMessage ("End-game camera Target is not a supported feature in id Tech games. Skipping", lines);
std::vector<std::string> empty;
return empty;
@@ -565,7 +561,8 @@ EntityConverter::convertRaceStart (const std::vector<std::string> &lines) const
std::vector<std::string> convertedLines;
convertedLines.push_back ("\"classname\" \"trigger_race_checkpoint\"\n");
convertedLines.push_back ("\"targetname\" \"cp1\"\n");
convertedLines.push_back ("\"cnt\" \"1\"\n");
// While 0 is finish in Race, in CTS, checkpoints numbered from 0 to n
convertedLines.push_back ("\"cnt\" \"0\"\n");
return convertedLines;
}
@@ -577,7 +574,8 @@ EntityConverter::convertRaceFinish (const std::vector<std::string> &lines) const
std::vector<std::string> convertedLines;
convertedLines.push_back ("\"classname\" \"trigger_race_checkpoint\"\n");
convertedLines.push_back ("\"targetname\" \"finish\"\n");
convertedLines.push_back ("\"cnt\" \"0\"\n");
// While 0 is finish in Race, in CTS, checkpoints numbered from 0 to n
convertedLines.push_back ("\"cnt\" \"1\"\n");
return convertedLines;
}