Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 6, 2011, 1:38:49 PM (14 years ago)
Author:
dafrick
Message:

Introducing delayed starting of mainMenu if the loading of a level has failed. Probably not the smartest or cleanest implementation, so please feel free to adjust.

File:
1 edited

Legend:

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

    r7978 r8029  
    4646#include "LevelManager.h"
    4747#include "PlayerManager.h"
     48#include "GSRoot.h"
    4849
    4950namespace orxonox
     
    156157        COUT(0) << "Loading level..." << std::endl;
    157158        startFile_ = new XMLFile(LevelManager::getInstance().getDefaultLevel());
    158         Loader::open(startFile_);
     159        bool loaded = Loader::open(startFile_);
    159160
    160161        Core::getInstance().updateLastLevelTimestamp();
     162        if(!loaded)
     163            GSRoot::delayedStartMainMenu();
    161164    }
    162165
Note: See TracChangeset for help on using the changeset viewer.