Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1696


Ignore:
Timestamp:
Sep 3, 2008, 8:45:12 PM (16 years ago)
Author:
rgrieder
Message:
  • Actually set the Settings::showsGraphics and Settings::hasServer.
  • Forgot the timer calls in GSGraphics
Location:
code/branches/gui/src/orxonox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/gui/src/orxonox/Settings.h

    r1663 r1696  
    5151        friend class ClassIdentifier<Settings>;
    5252        friend class GSRoot;
     53        friend class GSGraphics;
     54        friend class GSServer;
     55        friend class GSDedicated;
    5356
    5457    public:
     
    6164        static bool showsGraphics() { assert(singletonRef_s); return singletonRef_s->bShowsGraphics_; }
    6265        static bool hasServer()     { assert(singletonRef_s); return singletonRef_s->bHasServer_; }
    63 
    6466
    6567    private:
  • code/branches/gui/src/orxonox/gamestates/GSDedicated.cc

    r1694 r1696  
    5555    void GSDedicated::enter()
    5656    {
     57        Settings::_getInstance().bHasServer_ = true;
     58
    5759        // create Ogre SceneManager for the level
    5860        this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC, "LevelSceneManager");
     
    9294
    9395        Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
     96
     97        Settings::_getInstance().bHasServer_ = false;
    9498    }
    9599
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.cc

    r1689 r1696  
    8383    void GSGraphics::enter()
    8484    {
     85        Settings::_getInstance().bShowsGraphics_ = true;
     86
    8587        setConfigValues();
    8688
     
    139141        //this->ogreRoot_->shutdown
    140142        // TODO: destroy render window
     143
     144        Settings::_getInstance().bShowsGraphics_ = false;
    141145    }
    142146
  • code/branches/gui/src/orxonox/gamestates/GSLevel.cc

    r1694 r1696  
    3838#include "objects/Backlight.h"
    3939#include "objects/Tickable.h"
     40#include "tools/Timer.h"
    4041#include "tools/ParticleInterface.h"
    4142#include "Settings.h"
     
    115116        for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it)
    116117            it->tick(time.getDeltaTime() * this->timeFactor_);
     118
     119        for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; ++it)
     120            it->tick(time);
    117121    }
    118122
  • code/branches/gui/src/orxonox/gamestates/GSServer.cc

    r1674 r1696  
    3434#include "core/CommandLine.h"
    3535#include "network/Server.h"
     36#include "Settings.h"
    3637
    3738namespace orxonox
     
    5152    void GSServer::enter()
    5253    {
     54        Settings::_getInstance().bHasServer_ = true;
     55
    5356        GSLevel::enter();
    5457
     
    8184
    8285        GSLevel::leave();
     86
     87        Settings::_getInstance().bHasServer_ = false;
    8388    }
    8489
Note: See TracChangeset for help on using the changeset viewer.