Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 26, 2009, 4:33:32 PM (16 years ago)
Author:
rgrieder
Message:

small fixes with game states.

Location:
code/branches/gui/src/orxonox/gamestates
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.cc

    r2850 r2854  
    143143    void GSGraphics::update(const Clock& time)
    144144    {
     145        if (this->getActivity().topState)
     146        {
     147            // This state can not 'survive' on its own.
     148            // Load a user interface therefore
     149            Game::getInstance().requestState("mainMenu");
     150        }
     151
    145152        uint64_t timeBeforeTick = time.getRealMicroseconds();
    146153
  • code/branches/gui/src/orxonox/gamestates/GSRoot.cc

    r2850 r2854  
    100100        if (CommandLine::getValue("client").getBool())
    101101        {
    102             Game::getInstance().requestStates("graphics, standalone, level");
     102            Game::getInstance().requestStates("graphics, client, level");
    103103            loadLevel = true;
    104104        }
     
    109109        }
    110110       
    111         // Determine where to start
    112         if (!loadLevel)
    113         {
    114             if (CommandLine::getValue("console").getBool())
    115             {
    116                 // Start the game in the console without 3D graphics
    117                 Game::getInstance().requestState("ioConsole");
    118             }
    119             else
    120             {
    121                 // Start in GUI mode
    122                 Game::getInstance().requestStates("graphics, mainMenu");
    123             }
     111        // Determine where to start otherwise
     112        if (!loadLevel && !CommandLine::getValue("console").getBool())
     113        {
     114            // Also load graphics
     115            Game::getInstance().requestState("graphics");
    124116        }
    125117    }
Note: See TracChangeset for help on using the changeset viewer.