Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 24, 2009, 2:39:16 AM (16 years ago)
Author:
bknecht
Message:

we do now save what level you chose last time and will preselect it for you on restart ;-). Of course you can still use —level or -l to choose your level in the old way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/gamestates/GSLevel.cc

    r3008 r3036  
    5858    AddGameState(GSLevel, "level");
    5959
    60     SetCommandLineArgument(level, "presentation_dm.oxw").shortcut("l");
     60    SetCommandLineArgument(level, "").shortcut("l");
    6161    SetConsoleCommand(GSLevel, showIngameGUI, true);
    62     SetConsoleCommand(GSLevel, setLevel, true);
    6362
    6463    XMLFile* GSLevel::startFile_s = NULL;
     
    254253        COUT(0) << "Loading level..." << std::endl;
    255254        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
    259259            startFile_s = new XMLFile(Core::getMediaPathString() + "levels" + '/' + levelName);
    260         }
    261260        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);
    268261    }
    269262
Note: See TracChangeset for help on using the changeset viewer.