Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 25, 2009, 7:37:00 PM (16 years ago)
Author:
rgrieder
Message:

Exported showsGraphics, etc. to a new class named GameMode in the core.

Location:
code/branches/gui/src/orxonox
Files:
37 edited

Legend:

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

    r2834 r2848  
    3535#include <OgreResource.h>
    3636
    37 #include "core/Core.h"
     37#include "core/GameMode.h"
    3838#include "core/Iterator.h"
    3939#include "objects/worldentities/Camera.h"
     
    7575    void CameraManager::requestFocus(Camera* camera)
    7676    {
    77         if (!Core::showsGraphics())
     77        if (!GameMode::showsGraphics())
    7878            return;
    7979
     
    100100    void CameraManager::releaseFocus(Camera* camera)
    101101    {
    102         if (!Core::showsGraphics())
     102        if (!GameMode::showsGraphics())
    103103            return;
    104104
  • code/branches/gui/src/orxonox/GraphicsManager.cc

    r2842 r2848  
    6262#include "core/CoreIncludes.h"
    6363#include "core/Core.h"
     64#include "core/GameMode.h"
    6465#include "tools/WindowEventListener.h"
    6566#include "tools/ParticleInterface.h"
     
    102103    void GraphicsManager::initialise()
    103104    {
    104         Core::setShowsGraphics(true);
    105 
    106105        // Ogre setup procedure
    107106        setupOgre();
     
    156155            this->ogreLogger_->destroyLog(Ogre::LogManager::getSingleton().getDefaultLog());
    157156            delete this->ogreLogger_;
    158 
    159             // Don't showing graphics anymore
    160             Core::setShowsGraphics(false);
    161157        }
    162158
  • code/branches/gui/src/orxonox/PlayerManager.cc

    r2662 r2848  
    3131
    3232#include "LevelManager.h"
    33 #include "core/Core.h"
     33#include "core/GameMode.h"
    3434#include "core/CoreIncludes.h"
    3535#include "objects/Level.h"
     
    5858    void PlayerManager::clientConnected(unsigned int clientID)
    5959    {
    60         if (Core::isMaster())
     60        if (GameMode::isMaster())
    6161        {
    6262            COUT(3) << "client connected" << std::endl;
     
    7777    void PlayerManager::clientDisconnected(unsigned int clientID)
    7878    {
    79         if (Core::isMaster())
     79        if (GameMode::isMaster())
    8080        {
    8181            COUT(3) << "client disconnected" << std::endl;
     
    9797    PlayerInfo* PlayerManager::getClient(unsigned int clientID) const
    9898    {
    99         if (Core::isMaster())
     99        if (GameMode::isMaster())
    100100        {
    101101            std::map<unsigned int, PlayerInfo*>::const_iterator it = this->clients_.find(clientID);
  • code/branches/gui/src/orxonox/gamestates/GSClient.cc

    r2846 r2848  
    3333#include "core/Clock.h"
    3434#include "core/CommandLine.h"
    35 #include "core/Core.h"
     35#include "core/Game.h"
     36#include "core/GameMode.h"
    3637#include "network/Client.h"
    37 #include "core/Game.h"
    3838
    3939namespace orxonox
     
    5555    void GSClient::activate()
    5656    {
    57         Core::setIsClient(true);
     57        GameMode::setIsClient(true);
    5858
    5959        this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port"));
     
    7272        delete this->client_;
    7373
    74         Core::setIsClient(false);
     74        GameMode::setIsClient(false);
    7575    }
    7676
  • code/branches/gui/src/orxonox/gamestates/GSDedicated.cc

    r2844 r2848  
    3232#include "core/Clock.h"
    3333#include "core/CommandLine.h"
    34 #include "core/Core.h"
     34#include "core/Game.h"
     35#include "core/GameMode.h"
    3536#include "core/Iterator.h"
    3637#include "network/Server.h"
    3738#include "objects/Tickable.h"
    3839#include "util/Sleep.h"
    39 #include "core/Game.h"
    4040
    4141namespace orxonox
     
    5656    void GSDedicated::activate()
    5757    {
    58         Core::setHasServer(true);
     58        GameMode::setHasServer(true);
    5959
    6060        this->server_ = new Server(CommandLine::getValue("port"));
     
    6969        delete this->server_;
    7070
    71         Core::setHasServer(false);
     71        GameMode::setHasServer(false);
    7272    }
    7373
  • code/branches/gui/src/orxonox/gamestates/GSGUI.cc

    r2845 r2848  
    3333#include "core/Clock.h"
    3434#include "core/ConsoleCommand.h"
     35#include "core/Game.h"
    3536#include "core/input/InputManager.h"
    3637#include "core/input/SimpleInputState.h"
    3738#include "gui/GUIManager.h"
    3839#include "GraphicsManager.h"
    39 #include "core/Game.h"
    4040
    4141namespace orxonox
  • code/branches/gui/src/orxonox/gamestates/GSGraphics.cc

    r2847 r2848  
    3838#include "core/CoreIncludes.h"
    3939#include "core/Game.h"
     40#include "core/GameMode.h"
    4041#include "core/input/InputManager.h"
    4142#include "core/input/KeyBinder.h"
     
    7475    void GSGraphics::activate()
    7576    {
    76         Core::setShowsGraphics(true);
     77        GameMode::setShowsGraphics(true);
    7778
    7879        setConfigValues();
     
    128129        delete graphicsManager_;
    129130
    130         Core::setShowsGraphics(false);
     131        GameMode::setShowsGraphics(false);
    131132    }
    132133
  • code/branches/gui/src/orxonox/gamestates/GSLevel.cc

    r2844 r2848  
    3939#include "core/CommandLine.h"
    4040#include "core/ConfigValueIncludes.h"
     41#include "core/Core.h"
    4142#include "core/CoreIncludes.h"
    42 #include "core/Core.h"
     43#include "core/Game.h"
     44#include "core/GameMode.h"
    4345#include "objects/Tickable.h"
    4446#include "objects/Radar.h"
     
    4749#include "LevelManager.h"
    4850#include "PlayerManager.h"
    49 #include "core/Game.h"
    5051
    5152namespace orxonox
     
    8384        setConfigValues();
    8485
    85         if (Core::showsGraphics())
     86        if (GameMode::showsGraphics())
    8687        {
    8788            inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("game");
     
    99100        this->playerManager_ = new PlayerManager();
    100101
    101         if (Core::isMaster())
     102        if (GameMode::isMaster())
    102103        {
    103104            // create the global LevelManager
     
    107108        }
    108109
    109         if (Core::showsGraphics())
     110        if (GameMode::showsGraphics())
    110111        {
    111112            // TODO: insert slomo console command with
     
    149150        //Loader::close();
    150151
    151         if (Core::showsGraphics())
     152        if (GameMode::showsGraphics())
    152153            InputManager::getInstance().requestLeaveState("game");
    153154
    154         if (Core::isMaster())
     155        if (GameMode::isMaster())
    155156            this->unloadLevel();
    156157
     
    179180        }
    180181
    181         if (Core::showsGraphics())
     182        if (GameMode::showsGraphics())
    182183        {
    183184            inputState_->setHandler(0);
     
    240241    void GSLevel::keybindInternal(const std::string& command, bool bTemporary)
    241242    {
    242         if (Core::showsGraphics())
     243        if (GameMode::showsGraphics())
    243244        {
    244245            static std::string bindingString = "";
  • code/branches/gui/src/orxonox/gamestates/GSRoot.cc

    r2846 r2848  
    3333#include "util/Debug.h"
    3434#include "core/Clock.h"
    35 #include "core/Core.h"
     35#include "core/Game.h"
     36#include "core/GameMode.h"
    3637#include "core/CommandLine.h"
    3738#include "core/ConsoleCommand.h"
     
    3940#include "tools/Timer.h"
    4041#include "objects/Tickable.h"
    41 #include "core/Game.h"
    4242
    4343namespace orxonox
     
    142142    void GSRoot::setTimeFactor(float factor)
    143143    {
    144         if (Core::isMaster())
     144        if (GameMode::isMaster())
    145145        {
    146146            if (!this->bPaused_)
     
    160160    void GSRoot::pause()
    161161    {
    162         if (Core::isMaster())
     162        if (GameMode::isMaster())
    163163        {
    164164            if (!this->bPaused_)
  • code/branches/gui/src/orxonox/gamestates/GSServer.cc

    r2844 r2848  
    3131
    3232#include "core/CommandLine.h"
    33 #include "core/Core.h"
     33#include "core/Game.h"
     34#include "core/GameMode.h"
    3435#include "network/Server.h"
    35 #include "core/Game.h"
    3636
    3737namespace orxonox
     
    5353    void GSServer::activate()
    5454    {
    55         Core::setHasServer(true);
     55        GameMode::setHasServer(true);
    5656
    5757        this->server_ = new Server(CommandLine::getValue("port"));
     
    6666        delete this->server_;
    6767
    68         Core::setHasServer(false);
     68        GameMode::setHasServer(false);
    6969    }
    7070
  • code/branches/gui/src/orxonox/gamestates/GSStandalone.cc

    r2844 r2848  
    3232#include <OgreViewport.h>
    3333#include <OgreCamera.h>
    34 #include "core/Core.h"
     34#include "core/Game.h"
     35#include "core/GameMode.h"
    3536#include "core/ConsoleCommand.h"
    3637#include "gui/GUIManager.h"
    3738#include "GraphicsManager.h"
    38 #include "core/Game.h"
    3939
    4040namespace orxonox
     
    5454    void GSStandalone::activate()
    5555    {
    56         Core::setIsStandalone(true);
     56        GameMode::setIsStandalone(true);
    5757
    5858        guiManager_ = GUIManager::getInstancePtr();
     
    6363    void GSStandalone::deactivate()
    6464    {
    65         Core::setIsStandalone(false);
     65        GameMode::setIsStandalone(false);
    6666    }
    6767
  • code/branches/gui/src/orxonox/objects/Scene.cc

    r2662 r2848  
    4141
    4242#include "core/CoreIncludes.h"
    43 #include "core/Core.h"
     43#include "core/GameMode.h"
    4444#include "core/XMLPort.h"
    4545#include "tools/BulletConversions.h"
     
    5757        this->bShadows_ = true;
    5858
    59         if (Core::showsGraphics())
     59        if (GameMode::showsGraphics())
    6060        {
    6161            if (Ogre::Root::getSingletonPtr())
     
    9999                Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
    100100            }
    101             else if (!Core::showsGraphics())
     101            else if (!GameMode::showsGraphics())
    102102            {
    103103                delete this->sceneManager_;
     
    227227    void Scene::tick(float dt)
    228228    {
    229         if (!Core::showsGraphics())
     229        if (!GameMode::showsGraphics())
    230230        {
    231231            // We need to update the scene nodes if we don't render
     
    256256    void Scene::setSkybox(const std::string& skybox)
    257257    {
    258         if (Core::showsGraphics() && this->sceneManager_)
     258        if (GameMode::showsGraphics() && this->sceneManager_)
    259259            this->sceneManager_->setSkyBox(true, skybox);
    260260
     
    264264    void Scene::setAmbientLight(const ColourValue& colour)
    265265    {
    266         if (Core::showsGraphics() && this->sceneManager_)
     266        if (GameMode::showsGraphics() && this->sceneManager_)
    267267            this->sceneManager_->setAmbientLight(colour);
    268268
     
    272272    void Scene::setShadow(bool bShadow)
    273273    {
    274         if (Core::showsGraphics() && this->sceneManager_)
     274        if (GameMode::showsGraphics() && this->sceneManager_)
    275275        {
    276276            if (bShadow)
  • code/branches/gui/src/orxonox/objects/controllers/AIController.cc

    r2662 r2848  
    3030#include "AIController.h"
    3131
    32 #include "core/Core.h"
     32#include "core/GameMode.h"
    3333#include "core/CoreIncludes.h"
    3434#include "core/Executor.h"
     
    4545        RegisterObject(AIController);
    4646
    47         if (Core::isMaster())
     47        if (GameMode::isMaster())
    4848            this->actionTimer_.setTimer(ACTION_INTERVAL, true, this, createExecutor(createFunctor(&AIController::action)));
    4949    }
  • code/branches/gui/src/orxonox/objects/gametypes/Gametype.cc

    r2710 r2848  
    3636#include "core/ConfigValueIncludes.h"
    3737#include "core/Template.h"
    38 #include "core/Core.h"
     38#include "core/GameMode.h"
    3939#include "overlays/OverlayGroup.h"
    4040#include "objects/infos/PlayerInfo.h"
     
    6969
    7070        // load the corresponding score board
    71         if (Core::showsGraphics() && this->scoreboardTemplate_ != "")
     71        if (GameMode::showsGraphics() && this->scoreboardTemplate_ != "")
    7272        {
    7373            this->scoreboard_ = new OverlayGroup(this);
  • code/branches/gui/src/orxonox/objects/infos/Bot.cc

    r2662 r2848  
    3030#include "Bot.h"
    3131
    32 #include "core/Core.h"
     32#include "core/GameMode.h"
    3333#include "core/CoreIncludes.h"
    3434#include "core/ConfigValueIncludes.h"
     
    4646
    4747        this->bHumanPlayer_ = false;
    48         this->bLocalPlayer_ = Core::isMaster();
     48        this->bLocalPlayer_ = GameMode::isMaster();
    4949        this->bSetUnreadyAfterSpawn_ = false;
    5050        this->setReadyToSpawn(true);
  • code/branches/gui/src/orxonox/objects/infos/HumanPlayer.cc

    r2662 r2848  
    3030#include "HumanPlayer.h"
    3131
    32 #include "core/Core.h"
     32#include "core/GameMode.h"
    3333#include "core/CoreIncludes.h"
    3434#include "core/ConfigValueIncludes.h"
     
    4747        RegisterObject(HumanPlayer);
    4848
    49         this->server_initialized_ = Core::isMaster();
     49        this->server_initialized_ = GameMode::isMaster();
    5050        this->client_initialized_ = false;
    5151
     
    8282            this->synchronize_nick_ = this->nick_;
    8383
    84             if (Core::isMaster())
     84            if (GameMode::isMaster())
    8585                this->setName(this->nick_);
    8686        }
     
    105105            this->client_initialized_ = true;
    106106
    107             if (!Core::isMaster())
     107            if (!GameMode::isMaster())
    108108                this->setObjectMode(objectDirection::bidirectional);
    109109            else
  • code/branches/gui/src/orxonox/objects/items/MultiStateEngine.cc

    r2782 r2848  
    3030#include "MultiStateEngine.h"
    3131
    32 #include "core/Core.h"
     32#include "core/GameMode.h"
    3333#include "core/CoreIncludes.h"
    3434#include "core/XMLPort.h"
     
    123123            }
    124124
    125             if (Core::isMaster())
     125            if (GameMode::isMaster())
    126126            {
    127127                for (std::list<WorldEntity*>::const_iterator it = this->activeEffects_.begin(); it != this->activeEffects_.end(); ++it)
  • code/branches/gui/src/orxonox/objects/weaponSystem/projectiles/BillboardProjectile.cc

    r2662 r2848  
    3232#include <OgreBillboardSet.h>
    3333
    34 #include "core/Core.h"
     34#include "core/GameMode.h"
    3535#include "core/CoreIncludes.h"
    3636#include "objects/Scene.h"
     
    4444        RegisterObject(BillboardProjectile);
    4545
    46         if (Core::showsGraphics())
     46        if (GameMode::showsGraphics())
    4747        {
    4848            assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity
     
    5656    BillboardProjectile::~BillboardProjectile()
    5757    {
    58         if (this->isInitialized() && Core::showsGraphics() && this->billboard_.getBillboardSet())
     58        if (this->isInitialized() && GameMode::showsGraphics() && this->billboard_.getBillboardSet())
    5959            this->detachOgreObject(this->billboard_.getBillboardSet());
    6060    }
  • code/branches/gui/src/orxonox/objects/weaponSystem/projectiles/ParticleProjectile.cc

    r2662 r2848  
    3333#include <OgreParticleEmitter.h>
    3434
    35 #include "core/Core.h"
     35#include "core/GameMode.h"
    3636#include "core/CoreIncludes.h"
    3737#include "core/ConfigValueIncludes.h"
     
    4646        RegisterObject(ParticleProjectile);
    4747
    48         if (Core::showsGraphics())
     48        if (GameMode::showsGraphics())
    4949        {
    5050            this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::normal);
  • code/branches/gui/src/orxonox/objects/weaponSystem/projectiles/Projectile.cc

    r2782 r2848  
    4141#include "objects/worldentities/ParticleSpawner.h"
    4242#include "objects/collisionshapes/SphereCollisionShape.h"
    43 #include "core/Core.h"
     43#include "core/GameMode.h"
    4444
    4545namespace orxonox
     
    5555        // Get notification about collisions
    5656
    57         if (Core::isMaster())
     57        if (GameMode::isMaster())
    5858        {
    5959            this->enableCollisionCallback();
     
    9393    void Projectile::destroyObject()
    9494    {
    95         if (Core::isMaster())
     95        if (GameMode::isMaster())
    9696            delete this;
    9797    }
     
    9999    bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
    100100    {
    101         if (!this->bDestroy_ && Core::isMaster())
     101        if (!this->bDestroy_ && GameMode::isMaster())
    102102        {
    103103            this->bDestroy_ = true;
  • code/branches/gui/src/orxonox/objects/worldentities/Backlight.cc

    r2782 r2848  
    3333#include <OgreSceneManager.h>
    3434
    35 #include "core/Core.h"
     35#include "core/GameMode.h"
    3636#include "core/CoreIncludes.h"
    3737#include "core/Executor.h"
     
    5858        this->tickcount_ = 0;
    5959
    60         if (Core::showsGraphics())
     60        if (GameMode::showsGraphics())
    6161        {
    6262            if (!this->getScene())
  • code/branches/gui/src/orxonox/objects/worldentities/Billboard.cc

    r2662 r2848  
    3434#include "core/CoreIncludes.h"
    3535#include "core/XMLPort.h"
    36 #include "core/Core.h"
     36#include "core/GameMode.h"
    3737#include "objects/Scene.h"
    3838
     
    8181        if (!this->billboard_.getBillboardSet())
    8282        {
    83             if (this->getScene() && Core::showsGraphics())
     83            if (this->getScene() && GameMode::showsGraphics())
    8484            {
    8585                this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1);
     
    9898        {
    9999/*
    100             if (this->getScene() && Core::showsGraphics() && (this->material_ != ""))
     100            if (this->getScene() && GameMode::showsGraphics() && (this->material_ != ""))
    101101            {
    102102                this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1);
  • code/branches/gui/src/orxonox/objects/worldentities/BlinkingBillboard.cc

    r2662 r2848  
    3030#include "BlinkingBillboard.h"
    3131
    32 #include "core/Core.h"
     32#include "core/GameMode.h"
    3333#include "core/CoreIncludes.h"
    3434#include "core/XMLPort.h"
     
    7777        SUPER(BlinkingBillboard, tick, dt);
    7878
    79         if (Core::isMaster() && this->isActive())
     79        if (GameMode::isMaster() && this->isActive())
    8080        {
    8181            this->time_ += dt;
  • code/branches/gui/src/orxonox/objects/worldentities/ControllableEntity.cc

    r2662 r2848  
    3434#include "core/CoreIncludes.h"
    3535#include "core/ConfigValueIncludes.h"
    36 #include "core/Core.h"
     36#include "core/GameMode.h"
    3737#include "core/XMLPort.h"
    3838#include "core/Template.h"
     
    236236            this->startLocalHumanControl();
    237237
    238             if (!Core::isMaster())
     238            if (!GameMode::isMaster())
    239239            {
    240240                this->client_overwrite_ = this->server_overwrite_;
     
    331331            if (!this->isDynamic())
    332332            {
    333                 if (Core::isMaster())
     333                if (GameMode::isMaster())
    334334                {
    335335                    this->server_position_ = this->getPosition();
     
    446446    void ControllableEntity::setPosition(const Vector3& position)
    447447    {
    448         if (Core::isMaster())
     448        if (GameMode::isMaster())
    449449        {
    450450            MobileEntity::setPosition(position);
     
    461461    void ControllableEntity::setOrientation(const Quaternion& orientation)
    462462    {
    463         if (Core::isMaster())
     463        if (GameMode::isMaster())
    464464        {
    465465            MobileEntity::setOrientation(orientation);
     
    476476    void ControllableEntity::setVelocity(const Vector3& velocity)
    477477    {
    478         if (Core::isMaster())
     478        if (GameMode::isMaster())
    479479        {
    480480            MobileEntity::setVelocity(velocity);
     
    491491    void ControllableEntity::setAngularVelocity(const Vector3& velocity)
    492492    {
    493         if (Core::isMaster())
     493        if (GameMode::isMaster())
    494494        {
    495495            MobileEntity::setAngularVelocity(velocity);
     
    507507    {
    508508        MobileEntity::setWorldTransform(worldTrans);
    509         if (Core::isMaster())
     509        if (GameMode::isMaster())
    510510        {
    511511            this->server_position_ = this->getPosition();
  • code/branches/gui/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r2759 r2848  
    3232#include <OgreParticleSystem.h>
    3333
    34 #include "core/Core.h"
     34#include "core/GameMode.h"
    3535#include "core/CoreIncludes.h"
    3636#include "core/Executor.h"
     
    4747        RegisterObject(ExplosionChunk);
    4848
    49         if ( Core::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )
     49        if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )
    5050            ThrowException(AbortLoading, "Can't create ExplosionChunk, no scene or no scene manager given.");
    5151
     
    5353        this->LOD_ = LODParticle::normal;
    5454
    55         if ( Core::showsGraphics() )
     55        if ( GameMode::showsGraphics() )
    5656        {
    5757            try
     
    7575        }
    7676
    77         if (Core::isMaster())
     77        if (GameMode::isMaster())
    7878        {
    7979            Vector3 velocity(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1));
     
    132132            this->smoke_->setEnabled(false);
    133133
    134         if (Core::isMaster())
     134        if (GameMode::isMaster())
    135135        {
    136136            this->bStop_ = true;
     
    148148        static const unsigned int CHANGES_PER_SECOND = 5;
    149149
    150         if (Core::isMaster() && rnd() < dt*CHANGES_PER_SECOND)
     150        if (GameMode::isMaster() && rnd() < dt*CHANGES_PER_SECOND)
    151151        {
    152152            float length = this->getVelocity().length();
  • code/branches/gui/src/orxonox/objects/worldentities/Light.cc

    r2662 r2848  
    3737#include "util/String.h"
    3838#include "util/Exception.h"
    39 #include "core/Core.h"
     39#include "core/GameMode.h"
    4040#include "core/CoreIncludes.h"
    4141#include "core/XMLPort.h"
     
    5757        this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f);
    5858
    59         if (Core::showsGraphics())
     59        if (GameMode::showsGraphics())
    6060        {
    6161            if (!this->getScene())
  • code/branches/gui/src/orxonox/objects/worldentities/Model.cc

    r2799 r2848  
    3131#include <OgreEntity.h>
    3232#include "Model.h"
    33 #include "core/Core.h"
     33#include "core/GameMode.h"
    3434#include "core/CoreIncludes.h"
    3535#include "core/XMLPort.h"
     
    7171    void Model::changedMesh()
    7272    {
    73         if (Core::showsGraphics())
     73        if (GameMode::showsGraphics())
    7474        {
    7575            if (this->mesh_.getEntity())
  • code/branches/gui/src/orxonox/objects/worldentities/MovableEntity.cc

    r2662 r2848  
    3434#include "core/XMLPort.h"
    3535#include "core/Executor.h"
    36 #include "core/Core.h"
     36#include "core/GameMode.h"
    3737
    3838namespace orxonox
     
    8989    void MovableEntity::resynchronize()
    9090    {
    91         if (Core::isMaster() && !this->continuousResynchroTimer_)
     91        if (GameMode::isMaster() && !this->continuousResynchroTimer_)
    9292        {
    9393            // Resynchronise every few seconds because we only work with velocities (no positions)
  • code/branches/gui/src/orxonox/objects/worldentities/ParticleEmitter.cc

    r2799 r2848  
    3939#include "tools/ParticleInterface.h"
    4040#include "util/Exception.h"
    41 #include "core/Core.h"
     41#include "core/GameMode.h"
    4242#include "core/CoreIncludes.h"
    4343#include "core/XMLPort.h"
     
    5252        RegisterObject(ParticleEmitter);
    5353
    54         if (Core::showsGraphics() && (!this->getScene() || !this->getScene()->getSceneManager()))
     54        if (GameMode::showsGraphics() && (!this->getScene() || !this->getScene()->getSceneManager()))
    5555            ThrowException(AbortLoading, "Can't create ParticleEmitter, no scene or no scene manager given.");
    5656
     
    108108        }
    109109
    110         if (Core::showsGraphics() && this->getScene() && this->getScene()->getSceneManager())
     110        if (GameMode::showsGraphics() && this->getScene() && this->getScene()->getSceneManager())
    111111        {
    112112            try
  • code/branches/gui/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2782 r2848  
    3030#include "Pawn.h"
    3131
    32 #include "core/Core.h"
     32#include "core/GameMode.h"
    3333#include "core/CoreIncludes.h"
    3434#include "core/XMLPort.h"
     
    6363        this->getPickUp().setPlayer(this);
    6464
    65         if (Core::isMaster())
     65        if (GameMode::isMaster())
    6666        {
    6767            this->weaponSystem_ = new WeaponSystem(this);
     
    187187            this->getPlayer()->stopControl(this);
    188188
    189         if (Core::isMaster())
     189        if (GameMode::isMaster())
    190190            this->deatheffect();
    191191    }
     
    234234    {
    235235        this->setHealth(this->initialHealth_);
    236         if (Core::isMaster())
     236        if (GameMode::isMaster())
    237237            this->spawneffect();
    238238    }
  • code/branches/gui/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r2662 r2848  
    3434#include "core/CoreIncludes.h"
    3535#include "core/ConfigValueIncludes.h"
    36 #include "core/Core.h"
     36#include "core/GameMode.h"
    3737#include "objects/worldentities/Model.h"
    3838#include "objects/Scene.h"
     
    6363        this->setDestroyWhenPlayerLeft(true);
    6464
    65         if (Core::showsGraphics())
     65        if (GameMode::showsGraphics())
    6666        {
    6767            this->greetingFlare_ = new BillboardSet();
     
    206206        this->bGreeting_ = !this->bGreeting_;
    207207
    208         if (Core::isMaster())
     208        if (GameMode::isMaster())
    209209        {
    210210            this->bGreetingFlareVisible_ = this->bGreeting_;
  • code/branches/gui/src/orxonox/objects/worldentities/triggers/Trigger.cc

    r2710 r2848  
    3636#include "core/ConsoleCommand.h"
    3737#include "core/XMLPort.h"
    38 #include "core/Core.h"
     38#include "core/GameMode.h"
    3939#include "objects/Scene.h"
    4040
     
    6767//    this->bUpdating_ = false;
    6868
    69     if (this->getScene() && Core::showsGraphics())
     69    if (this->getScene() && GameMode::showsGraphics())
    7070    {
    7171      this->debugBillboard_.setBillboardSet(this->getScene()->getSceneManager(), "Examples/Flare", ColourValue(1.0, 0.0, 0.0), 1);
  • code/branches/gui/src/orxonox/overlays/OrxonoxOverlay.cc

    r2801 r2848  
    4444#include "util/Exception.h"
    4545#include "util/String.h"
    46 #include "core/Core.h"
     46#include "core/GameMode.h"
    4747#include "core/CoreIncludes.h"
    4848#include "core/XMLPort.h"
     
    6767        this->group_ = 0;
    6868
    69         if (!Core::showsGraphics())
     69        if (!GameMode::showsGraphics())
    7070            ThrowException(NoGraphics, "Can't create OrxonoxOverlay, graphics engine not initialized");
    7171
  • code/branches/gui/src/orxonox/tools/BillboardSet.cc

    r2662 r2848  
    3737#include <OgreBillboard.h>
    3838
    39 #include "core/Core.h"
     39#include "core/GameMode.h"
    4040#include "util/Convert.h"
    4141#include "util/String.h"
     
    7272        try
    7373        {
    74             if (Core::showsGraphics())
     74            if (GameMode::showsGraphics())
    7575            {
    7676                this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count);
     
    9595        try
    9696        {
    97             if (Core::showsGraphics())
     97            if (GameMode::showsGraphics())
    9898            {
    9999                this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count);
  • code/branches/gui/src/orxonox/tools/Mesh.cc

    r2662 r2848  
    3535#include <cassert>
    3636
    37 #include "core/Core.h"
     37#include "core/GameMode.h"
    3838#include "util/Convert.h"
    3939#include "util/String.h"
     
    6464            this->scenemanager_->destroyEntity(this->entity_);
    6565
    66         if (Core::showsGraphics())
     66        if (GameMode::showsGraphics())
    6767        {
    6868            try
  • code/branches/gui/src/orxonox/tools/ParticleInterface.cc

    r2801 r2848  
    4141
    4242#include "GraphicsManager.h"
    43 #include "core/Core.h"
     43#include "core/GameMode.h"
    4444#include "core/CoreIncludes.h"
    4545#include "util/Convert.h"
     
    6464        this->speedFactor_ = 1.0f;
    6565
    66         if (Core::showsGraphics())
     66        if (GameMode::showsGraphics())
    6767        {
    6868            try
     
    178178    {
    179179        this->detaillevel_ = level;
    180         if (Core::showsGraphics())
     180        if (GameMode::showsGraphics())
    181181            this->detailLevelChanged(GraphicsManager::getInstance().getDetailLevelParticle());
    182182    }
  • code/branches/gui/src/orxonox/tools/Shader.cc

    r2801 r2848  
    3636#include <OgrePlugin.h>
    3737
    38 #include "core/Core.h"
     38#include "core/GameMode.h"
    3939#include "core/CoreIncludes.h"
    4040#include "core/Executor.h"
     
    5959        this->compositorInstance_ = 0;
    6060        this->bVisible_ = true;
    61         this->bLoadCompositor_ = Core::showsGraphics();
     61        this->bLoadCompositor_ = GameMode::showsGraphics();
    6262        this->bViewportInitialized_ = false;
    6363        this->compositor_ = "";
     
    246246    Shader::ParameterPointer* Shader::getParameterPointer(const std::string& material, size_t technique, size_t pass, const std::string& parameter)
    247247    {
    248         if (!Core::showsGraphics() || !Shader::bLoadedCgPlugin_s)
     248        if (!GameMode::showsGraphics() || !Shader::bLoadedCgPlugin_s)
    249249            return 0;
    250250
Note: See TracChangeset for help on using the changeset viewer.