Changeset 3036 for code/trunk/src/orxonox/gamestates
- Timestamp:
- May 24, 2009, 2:39:16 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/gamestates/GSLevel.cc
r3008 r3036 58 58 AddGameState(GSLevel, "level"); 59 59 60 SetCommandLineArgument(level, " presentation_dm.oxw").shortcut("l");60 SetCommandLineArgument(level, "").shortcut("l"); 61 61 SetConsoleCommand(GSLevel, showIngameGUI, true); 62 SetConsoleCommand(GSLevel, setLevel, true);63 62 64 63 XMLFile* GSLevel::startFile_s = NULL; … … 254 253 COUT(0) << "Loading level..." << std::endl; 255 254 std::string levelName; 256 if (!startFile_s) 257 { 258 CommandLine::getValue("level", &levelName); 255 CommandLine::getValue("level", &levelName); 256 if (levelName == "") 257 startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + Game::getInstance().getLevel()); 258 else 259 259 startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + levelName); 260 }261 260 Loader::open(startFile_s); 262 }263 264 void GSLevel::setLevel(std::string levelName)265 {266 delete GSLevel::startFile_s;267 GSLevel::startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + levelName);268 261 } 269 262
Note: See TracChangeset
for help on using the changeset viewer.