Changeset 2848 for code/branches/gui/src/orxonox
- Timestamp:
- Mar 25, 2009, 7:37:00 PM (16 years ago)
- Location:
- code/branches/gui/src/orxonox
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/gui/src/orxonox/CameraManager.cc
r2834 r2848 35 35 #include <OgreResource.h> 36 36 37 #include "core/ Core.h"37 #include "core/GameMode.h" 38 38 #include "core/Iterator.h" 39 39 #include "objects/worldentities/Camera.h" … … 75 75 void CameraManager::requestFocus(Camera* camera) 76 76 { 77 if (! Core::showsGraphics())77 if (!GameMode::showsGraphics()) 78 78 return; 79 79 … … 100 100 void CameraManager::releaseFocus(Camera* camera) 101 101 { 102 if (! Core::showsGraphics())102 if (!GameMode::showsGraphics()) 103 103 return; 104 104 -
code/branches/gui/src/orxonox/GraphicsManager.cc
r2842 r2848 62 62 #include "core/CoreIncludes.h" 63 63 #include "core/Core.h" 64 #include "core/GameMode.h" 64 65 #include "tools/WindowEventListener.h" 65 66 #include "tools/ParticleInterface.h" … … 102 103 void GraphicsManager::initialise() 103 104 { 104 Core::setShowsGraphics(true);105 106 105 // Ogre setup procedure 107 106 setupOgre(); … … 156 155 this->ogreLogger_->destroyLog(Ogre::LogManager::getSingleton().getDefaultLog()); 157 156 delete this->ogreLogger_; 158 159 // Don't showing graphics anymore160 Core::setShowsGraphics(false);161 157 } 162 158 -
code/branches/gui/src/orxonox/PlayerManager.cc
r2662 r2848 31 31 32 32 #include "LevelManager.h" 33 #include "core/ Core.h"33 #include "core/GameMode.h" 34 34 #include "core/CoreIncludes.h" 35 35 #include "objects/Level.h" … … 58 58 void PlayerManager::clientConnected(unsigned int clientID) 59 59 { 60 if ( Core::isMaster())60 if (GameMode::isMaster()) 61 61 { 62 62 COUT(3) << "client connected" << std::endl; … … 77 77 void PlayerManager::clientDisconnected(unsigned int clientID) 78 78 { 79 if ( Core::isMaster())79 if (GameMode::isMaster()) 80 80 { 81 81 COUT(3) << "client disconnected" << std::endl; … … 97 97 PlayerInfo* PlayerManager::getClient(unsigned int clientID) const 98 98 { 99 if ( Core::isMaster())99 if (GameMode::isMaster()) 100 100 { 101 101 std::map<unsigned int, PlayerInfo*>::const_iterator it = this->clients_.find(clientID); -
code/branches/gui/src/orxonox/gamestates/GSClient.cc
r2846 r2848 33 33 #include "core/Clock.h" 34 34 #include "core/CommandLine.h" 35 #include "core/Core.h" 35 #include "core/Game.h" 36 #include "core/GameMode.h" 36 37 #include "network/Client.h" 37 #include "core/Game.h"38 38 39 39 namespace orxonox … … 55 55 void GSClient::activate() 56 56 { 57 Core::setIsClient(true);57 GameMode::setIsClient(true); 58 58 59 59 this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port")); … … 72 72 delete this->client_; 73 73 74 Core::setIsClient(false);74 GameMode::setIsClient(false); 75 75 } 76 76 -
code/branches/gui/src/orxonox/gamestates/GSDedicated.cc
r2844 r2848 32 32 #include "core/Clock.h" 33 33 #include "core/CommandLine.h" 34 #include "core/Core.h" 34 #include "core/Game.h" 35 #include "core/GameMode.h" 35 36 #include "core/Iterator.h" 36 37 #include "network/Server.h" 37 38 #include "objects/Tickable.h" 38 39 #include "util/Sleep.h" 39 #include "core/Game.h"40 40 41 41 namespace orxonox … … 56 56 void GSDedicated::activate() 57 57 { 58 Core::setHasServer(true);58 GameMode::setHasServer(true); 59 59 60 60 this->server_ = new Server(CommandLine::getValue("port")); … … 69 69 delete this->server_; 70 70 71 Core::setHasServer(false);71 GameMode::setHasServer(false); 72 72 } 73 73 -
code/branches/gui/src/orxonox/gamestates/GSGUI.cc
r2845 r2848 33 33 #include "core/Clock.h" 34 34 #include "core/ConsoleCommand.h" 35 #include "core/Game.h" 35 36 #include "core/input/InputManager.h" 36 37 #include "core/input/SimpleInputState.h" 37 38 #include "gui/GUIManager.h" 38 39 #include "GraphicsManager.h" 39 #include "core/Game.h"40 40 41 41 namespace orxonox -
code/branches/gui/src/orxonox/gamestates/GSGraphics.cc
r2847 r2848 38 38 #include "core/CoreIncludes.h" 39 39 #include "core/Game.h" 40 #include "core/GameMode.h" 40 41 #include "core/input/InputManager.h" 41 42 #include "core/input/KeyBinder.h" … … 74 75 void GSGraphics::activate() 75 76 { 76 Core::setShowsGraphics(true);77 GameMode::setShowsGraphics(true); 77 78 78 79 setConfigValues(); … … 128 129 delete graphicsManager_; 129 130 130 Core::setShowsGraphics(false);131 GameMode::setShowsGraphics(false); 131 132 } 132 133 -
code/branches/gui/src/orxonox/gamestates/GSLevel.cc
r2844 r2848 39 39 #include "core/CommandLine.h" 40 40 #include "core/ConfigValueIncludes.h" 41 #include "core/Core.h" 41 42 #include "core/CoreIncludes.h" 42 #include "core/Core.h" 43 #include "core/Game.h" 44 #include "core/GameMode.h" 43 45 #include "objects/Tickable.h" 44 46 #include "objects/Radar.h" … … 47 49 #include "LevelManager.h" 48 50 #include "PlayerManager.h" 49 #include "core/Game.h"50 51 51 52 namespace orxonox … … 83 84 setConfigValues(); 84 85 85 if ( Core::showsGraphics())86 if (GameMode::showsGraphics()) 86 87 { 87 88 inputState_ = InputManager::getInstance().createInputState<SimpleInputState>("game"); … … 99 100 this->playerManager_ = new PlayerManager(); 100 101 101 if ( Core::isMaster())102 if (GameMode::isMaster()) 102 103 { 103 104 // create the global LevelManager … … 107 108 } 108 109 109 if ( Core::showsGraphics())110 if (GameMode::showsGraphics()) 110 111 { 111 112 // TODO: insert slomo console command with … … 149 150 //Loader::close(); 150 151 151 if ( Core::showsGraphics())152 if (GameMode::showsGraphics()) 152 153 InputManager::getInstance().requestLeaveState("game"); 153 154 154 if ( Core::isMaster())155 if (GameMode::isMaster()) 155 156 this->unloadLevel(); 156 157 … … 179 180 } 180 181 181 if ( Core::showsGraphics())182 if (GameMode::showsGraphics()) 182 183 { 183 184 inputState_->setHandler(0); … … 240 241 void GSLevel::keybindInternal(const std::string& command, bool bTemporary) 241 242 { 242 if ( Core::showsGraphics())243 if (GameMode::showsGraphics()) 243 244 { 244 245 static std::string bindingString = ""; -
code/branches/gui/src/orxonox/gamestates/GSRoot.cc
r2846 r2848 33 33 #include "util/Debug.h" 34 34 #include "core/Clock.h" 35 #include "core/Core.h" 35 #include "core/Game.h" 36 #include "core/GameMode.h" 36 37 #include "core/CommandLine.h" 37 38 #include "core/ConsoleCommand.h" … … 39 40 #include "tools/Timer.h" 40 41 #include "objects/Tickable.h" 41 #include "core/Game.h"42 42 43 43 namespace orxonox … … 142 142 void GSRoot::setTimeFactor(float factor) 143 143 { 144 if ( Core::isMaster())144 if (GameMode::isMaster()) 145 145 { 146 146 if (!this->bPaused_) … … 160 160 void GSRoot::pause() 161 161 { 162 if ( Core::isMaster())162 if (GameMode::isMaster()) 163 163 { 164 164 if (!this->bPaused_) -
code/branches/gui/src/orxonox/gamestates/GSServer.cc
r2844 r2848 31 31 32 32 #include "core/CommandLine.h" 33 #include "core/Core.h" 33 #include "core/Game.h" 34 #include "core/GameMode.h" 34 35 #include "network/Server.h" 35 #include "core/Game.h"36 36 37 37 namespace orxonox … … 53 53 void GSServer::activate() 54 54 { 55 Core::setHasServer(true);55 GameMode::setHasServer(true); 56 56 57 57 this->server_ = new Server(CommandLine::getValue("port")); … … 66 66 delete this->server_; 67 67 68 Core::setHasServer(false);68 GameMode::setHasServer(false); 69 69 } 70 70 -
code/branches/gui/src/orxonox/gamestates/GSStandalone.cc
r2844 r2848 32 32 #include <OgreViewport.h> 33 33 #include <OgreCamera.h> 34 #include "core/Core.h" 34 #include "core/Game.h" 35 #include "core/GameMode.h" 35 36 #include "core/ConsoleCommand.h" 36 37 #include "gui/GUIManager.h" 37 38 #include "GraphicsManager.h" 38 #include "core/Game.h"39 39 40 40 namespace orxonox … … 54 54 void GSStandalone::activate() 55 55 { 56 Core::setIsStandalone(true);56 GameMode::setIsStandalone(true); 57 57 58 58 guiManager_ = GUIManager::getInstancePtr(); … … 63 63 void GSStandalone::deactivate() 64 64 { 65 Core::setIsStandalone(false);65 GameMode::setIsStandalone(false); 66 66 } 67 67 -
code/branches/gui/src/orxonox/objects/Scene.cc
r2662 r2848 41 41 42 42 #include "core/CoreIncludes.h" 43 #include "core/ Core.h"43 #include "core/GameMode.h" 44 44 #include "core/XMLPort.h" 45 45 #include "tools/BulletConversions.h" … … 57 57 this->bShadows_ = true; 58 58 59 if ( Core::showsGraphics())59 if (GameMode::showsGraphics()) 60 60 { 61 61 if (Ogre::Root::getSingletonPtr()) … … 99 99 Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_); 100 100 } 101 else if (! Core::showsGraphics())101 else if (!GameMode::showsGraphics()) 102 102 { 103 103 delete this->sceneManager_; … … 227 227 void Scene::tick(float dt) 228 228 { 229 if (! Core::showsGraphics())229 if (!GameMode::showsGraphics()) 230 230 { 231 231 // We need to update the scene nodes if we don't render … … 256 256 void Scene::setSkybox(const std::string& skybox) 257 257 { 258 if ( Core::showsGraphics() && this->sceneManager_)258 if (GameMode::showsGraphics() && this->sceneManager_) 259 259 this->sceneManager_->setSkyBox(true, skybox); 260 260 … … 264 264 void Scene::setAmbientLight(const ColourValue& colour) 265 265 { 266 if ( Core::showsGraphics() && this->sceneManager_)266 if (GameMode::showsGraphics() && this->sceneManager_) 267 267 this->sceneManager_->setAmbientLight(colour); 268 268 … … 272 272 void Scene::setShadow(bool bShadow) 273 273 { 274 if ( Core::showsGraphics() && this->sceneManager_)274 if (GameMode::showsGraphics() && this->sceneManager_) 275 275 { 276 276 if (bShadow) -
code/branches/gui/src/orxonox/objects/controllers/AIController.cc
r2662 r2848 30 30 #include "AIController.h" 31 31 32 #include "core/ Core.h"32 #include "core/GameMode.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/Executor.h" … … 45 45 RegisterObject(AIController); 46 46 47 if ( Core::isMaster())47 if (GameMode::isMaster()) 48 48 this->actionTimer_.setTimer(ACTION_INTERVAL, true, this, createExecutor(createFunctor(&AIController::action))); 49 49 } -
code/branches/gui/src/orxonox/objects/gametypes/Gametype.cc
r2710 r2848 36 36 #include "core/ConfigValueIncludes.h" 37 37 #include "core/Template.h" 38 #include "core/ Core.h"38 #include "core/GameMode.h" 39 39 #include "overlays/OverlayGroup.h" 40 40 #include "objects/infos/PlayerInfo.h" … … 69 69 70 70 // load the corresponding score board 71 if ( Core::showsGraphics() && this->scoreboardTemplate_ != "")71 if (GameMode::showsGraphics() && this->scoreboardTemplate_ != "") 72 72 { 73 73 this->scoreboard_ = new OverlayGroup(this); -
code/branches/gui/src/orxonox/objects/infos/Bot.cc
r2662 r2848 30 30 #include "Bot.h" 31 31 32 #include "core/ Core.h"32 #include "core/GameMode.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/ConfigValueIncludes.h" … … 46 46 47 47 this->bHumanPlayer_ = false; 48 this->bLocalPlayer_ = Core::isMaster();48 this->bLocalPlayer_ = GameMode::isMaster(); 49 49 this->bSetUnreadyAfterSpawn_ = false; 50 50 this->setReadyToSpawn(true); -
code/branches/gui/src/orxonox/objects/infos/HumanPlayer.cc
r2662 r2848 30 30 #include "HumanPlayer.h" 31 31 32 #include "core/ Core.h"32 #include "core/GameMode.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/ConfigValueIncludes.h" … … 47 47 RegisterObject(HumanPlayer); 48 48 49 this->server_initialized_ = Core::isMaster();49 this->server_initialized_ = GameMode::isMaster(); 50 50 this->client_initialized_ = false; 51 51 … … 82 82 this->synchronize_nick_ = this->nick_; 83 83 84 if ( Core::isMaster())84 if (GameMode::isMaster()) 85 85 this->setName(this->nick_); 86 86 } … … 105 105 this->client_initialized_ = true; 106 106 107 if (! Core::isMaster())107 if (!GameMode::isMaster()) 108 108 this->setObjectMode(objectDirection::bidirectional); 109 109 else -
code/branches/gui/src/orxonox/objects/items/MultiStateEngine.cc
r2782 r2848 30 30 #include "MultiStateEngine.h" 31 31 32 #include "core/ Core.h"32 #include "core/GameMode.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" … … 123 123 } 124 124 125 if ( Core::isMaster())125 if (GameMode::isMaster()) 126 126 { 127 127 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 32 32 #include <OgreBillboardSet.h> 33 33 34 #include "core/ Core.h"34 #include "core/GameMode.h" 35 35 #include "core/CoreIncludes.h" 36 36 #include "objects/Scene.h" … … 44 44 RegisterObject(BillboardProjectile); 45 45 46 if ( Core::showsGraphics())46 if (GameMode::showsGraphics()) 47 47 { 48 48 assert(this->getScene()->getSceneManager()); // getScene() was already checked by WorldEntity … … 56 56 BillboardProjectile::~BillboardProjectile() 57 57 { 58 if (this->isInitialized() && Core::showsGraphics() && this->billboard_.getBillboardSet())58 if (this->isInitialized() && GameMode::showsGraphics() && this->billboard_.getBillboardSet()) 59 59 this->detachOgreObject(this->billboard_.getBillboardSet()); 60 60 } -
code/branches/gui/src/orxonox/objects/weaponSystem/projectiles/ParticleProjectile.cc
r2662 r2848 33 33 #include <OgreParticleEmitter.h> 34 34 35 #include "core/ Core.h"35 #include "core/GameMode.h" 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/ConfigValueIncludes.h" … … 46 46 RegisterObject(ParticleProjectile); 47 47 48 if ( Core::showsGraphics())48 if (GameMode::showsGraphics()) 49 49 { 50 50 this->particles_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/shot3_small", LODParticle::normal); -
code/branches/gui/src/orxonox/objects/weaponSystem/projectiles/Projectile.cc
r2782 r2848 41 41 #include "objects/worldentities/ParticleSpawner.h" 42 42 #include "objects/collisionshapes/SphereCollisionShape.h" 43 #include "core/ Core.h"43 #include "core/GameMode.h" 44 44 45 45 namespace orxonox … … 55 55 // Get notification about collisions 56 56 57 if ( Core::isMaster())57 if (GameMode::isMaster()) 58 58 { 59 59 this->enableCollisionCallback(); … … 93 93 void Projectile::destroyObject() 94 94 { 95 if ( Core::isMaster())95 if (GameMode::isMaster()) 96 96 delete this; 97 97 } … … 99 99 bool Projectile::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint) 100 100 { 101 if (!this->bDestroy_ && Core::isMaster())101 if (!this->bDestroy_ && GameMode::isMaster()) 102 102 { 103 103 this->bDestroy_ = true; -
code/branches/gui/src/orxonox/objects/worldentities/Backlight.cc
r2782 r2848 33 33 #include <OgreSceneManager.h> 34 34 35 #include "core/ Core.h"35 #include "core/GameMode.h" 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/Executor.h" … … 58 58 this->tickcount_ = 0; 59 59 60 if ( Core::showsGraphics())60 if (GameMode::showsGraphics()) 61 61 { 62 62 if (!this->getScene()) -
code/branches/gui/src/orxonox/objects/worldentities/Billboard.cc
r2662 r2848 34 34 #include "core/CoreIncludes.h" 35 35 #include "core/XMLPort.h" 36 #include "core/ Core.h"36 #include "core/GameMode.h" 37 37 #include "objects/Scene.h" 38 38 … … 81 81 if (!this->billboard_.getBillboardSet()) 82 82 { 83 if (this->getScene() && Core::showsGraphics())83 if (this->getScene() && GameMode::showsGraphics()) 84 84 { 85 85 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1); … … 98 98 { 99 99 /* 100 if (this->getScene() && Core::showsGraphics() && (this->material_ != ""))100 if (this->getScene() && GameMode::showsGraphics() && (this->material_ != "")) 101 101 { 102 102 this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1); -
code/branches/gui/src/orxonox/objects/worldentities/BlinkingBillboard.cc
r2662 r2848 30 30 #include "BlinkingBillboard.h" 31 31 32 #include "core/ Core.h"32 #include "core/GameMode.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" … … 77 77 SUPER(BlinkingBillboard, tick, dt); 78 78 79 if ( Core::isMaster() && this->isActive())79 if (GameMode::isMaster() && this->isActive()) 80 80 { 81 81 this->time_ += dt; -
code/branches/gui/src/orxonox/objects/worldentities/ControllableEntity.cc
r2662 r2848 34 34 #include "core/CoreIncludes.h" 35 35 #include "core/ConfigValueIncludes.h" 36 #include "core/ Core.h"36 #include "core/GameMode.h" 37 37 #include "core/XMLPort.h" 38 38 #include "core/Template.h" … … 236 236 this->startLocalHumanControl(); 237 237 238 if (! Core::isMaster())238 if (!GameMode::isMaster()) 239 239 { 240 240 this->client_overwrite_ = this->server_overwrite_; … … 331 331 if (!this->isDynamic()) 332 332 { 333 if ( Core::isMaster())333 if (GameMode::isMaster()) 334 334 { 335 335 this->server_position_ = this->getPosition(); … … 446 446 void ControllableEntity::setPosition(const Vector3& position) 447 447 { 448 if ( Core::isMaster())448 if (GameMode::isMaster()) 449 449 { 450 450 MobileEntity::setPosition(position); … … 461 461 void ControllableEntity::setOrientation(const Quaternion& orientation) 462 462 { 463 if ( Core::isMaster())463 if (GameMode::isMaster()) 464 464 { 465 465 MobileEntity::setOrientation(orientation); … … 476 476 void ControllableEntity::setVelocity(const Vector3& velocity) 477 477 { 478 if ( Core::isMaster())478 if (GameMode::isMaster()) 479 479 { 480 480 MobileEntity::setVelocity(velocity); … … 491 491 void ControllableEntity::setAngularVelocity(const Vector3& velocity) 492 492 { 493 if ( Core::isMaster())493 if (GameMode::isMaster()) 494 494 { 495 495 MobileEntity::setAngularVelocity(velocity); … … 507 507 { 508 508 MobileEntity::setWorldTransform(worldTrans); 509 if ( Core::isMaster())509 if (GameMode::isMaster()) 510 510 { 511 511 this->server_position_ = this->getPosition(); -
code/branches/gui/src/orxonox/objects/worldentities/ExplosionChunk.cc
r2759 r2848 32 32 #include <OgreParticleSystem.h> 33 33 34 #include "core/ Core.h"34 #include "core/GameMode.h" 35 35 #include "core/CoreIncludes.h" 36 36 #include "core/Executor.h" … … 47 47 RegisterObject(ExplosionChunk); 48 48 49 if ( Core::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )49 if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) ) 50 50 ThrowException(AbortLoading, "Can't create ExplosionChunk, no scene or no scene manager given."); 51 51 … … 53 53 this->LOD_ = LODParticle::normal; 54 54 55 if ( Core::showsGraphics() )55 if ( GameMode::showsGraphics() ) 56 56 { 57 57 try … … 75 75 } 76 76 77 if ( Core::isMaster())77 if (GameMode::isMaster()) 78 78 { 79 79 Vector3 velocity(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1)); … … 132 132 this->smoke_->setEnabled(false); 133 133 134 if ( Core::isMaster())134 if (GameMode::isMaster()) 135 135 { 136 136 this->bStop_ = true; … … 148 148 static const unsigned int CHANGES_PER_SECOND = 5; 149 149 150 if ( Core::isMaster() && rnd() < dt*CHANGES_PER_SECOND)150 if (GameMode::isMaster() && rnd() < dt*CHANGES_PER_SECOND) 151 151 { 152 152 float length = this->getVelocity().length(); -
code/branches/gui/src/orxonox/objects/worldentities/Light.cc
r2662 r2848 37 37 #include "util/String.h" 38 38 #include "util/Exception.h" 39 #include "core/ Core.h"39 #include "core/GameMode.h" 40 40 #include "core/CoreIncludes.h" 41 41 #include "core/XMLPort.h" … … 57 57 this->spotlightRange_ = Vector3(40.0f, 30.0f, 1.0f); 58 58 59 if ( Core::showsGraphics())59 if (GameMode::showsGraphics()) 60 60 { 61 61 if (!this->getScene()) -
code/branches/gui/src/orxonox/objects/worldentities/Model.cc
r2799 r2848 31 31 #include <OgreEntity.h> 32 32 #include "Model.h" 33 #include "core/ Core.h"33 #include "core/GameMode.h" 34 34 #include "core/CoreIncludes.h" 35 35 #include "core/XMLPort.h" … … 71 71 void Model::changedMesh() 72 72 { 73 if ( Core::showsGraphics())73 if (GameMode::showsGraphics()) 74 74 { 75 75 if (this->mesh_.getEntity()) -
code/branches/gui/src/orxonox/objects/worldentities/MovableEntity.cc
r2662 r2848 34 34 #include "core/XMLPort.h" 35 35 #include "core/Executor.h" 36 #include "core/ Core.h"36 #include "core/GameMode.h" 37 37 38 38 namespace orxonox … … 89 89 void MovableEntity::resynchronize() 90 90 { 91 if ( Core::isMaster() && !this->continuousResynchroTimer_)91 if (GameMode::isMaster() && !this->continuousResynchroTimer_) 92 92 { 93 93 // Resynchronise every few seconds because we only work with velocities (no positions) -
code/branches/gui/src/orxonox/objects/worldentities/ParticleEmitter.cc
r2799 r2848 39 39 #include "tools/ParticleInterface.h" 40 40 #include "util/Exception.h" 41 #include "core/ Core.h"41 #include "core/GameMode.h" 42 42 #include "core/CoreIncludes.h" 43 43 #include "core/XMLPort.h" … … 52 52 RegisterObject(ParticleEmitter); 53 53 54 if ( Core::showsGraphics() && (!this->getScene() || !this->getScene()->getSceneManager()))54 if (GameMode::showsGraphics() && (!this->getScene() || !this->getScene()->getSceneManager())) 55 55 ThrowException(AbortLoading, "Can't create ParticleEmitter, no scene or no scene manager given."); 56 56 … … 108 108 } 109 109 110 if ( Core::showsGraphics() && this->getScene() && this->getScene()->getSceneManager())110 if (GameMode::showsGraphics() && this->getScene() && this->getScene()->getSceneManager()) 111 111 { 112 112 try -
code/branches/gui/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2782 r2848 30 30 #include "Pawn.h" 31 31 32 #include "core/ Core.h"32 #include "core/GameMode.h" 33 33 #include "core/CoreIncludes.h" 34 34 #include "core/XMLPort.h" … … 63 63 this->getPickUp().setPlayer(this); 64 64 65 if ( Core::isMaster())65 if (GameMode::isMaster()) 66 66 { 67 67 this->weaponSystem_ = new WeaponSystem(this); … … 187 187 this->getPlayer()->stopControl(this); 188 188 189 if ( Core::isMaster())189 if (GameMode::isMaster()) 190 190 this->deatheffect(); 191 191 } … … 234 234 { 235 235 this->setHealth(this->initialHealth_); 236 if ( Core::isMaster())236 if (GameMode::isMaster()) 237 237 this->spawneffect(); 238 238 } -
code/branches/gui/src/orxonox/objects/worldentities/pawns/Spectator.cc
r2662 r2848 34 34 #include "core/CoreIncludes.h" 35 35 #include "core/ConfigValueIncludes.h" 36 #include "core/ Core.h"36 #include "core/GameMode.h" 37 37 #include "objects/worldentities/Model.h" 38 38 #include "objects/Scene.h" … … 63 63 this->setDestroyWhenPlayerLeft(true); 64 64 65 if ( Core::showsGraphics())65 if (GameMode::showsGraphics()) 66 66 { 67 67 this->greetingFlare_ = new BillboardSet(); … … 206 206 this->bGreeting_ = !this->bGreeting_; 207 207 208 if ( Core::isMaster())208 if (GameMode::isMaster()) 209 209 { 210 210 this->bGreetingFlareVisible_ = this->bGreeting_; -
code/branches/gui/src/orxonox/objects/worldentities/triggers/Trigger.cc
r2710 r2848 36 36 #include "core/ConsoleCommand.h" 37 37 #include "core/XMLPort.h" 38 #include "core/ Core.h"38 #include "core/GameMode.h" 39 39 #include "objects/Scene.h" 40 40 … … 67 67 // this->bUpdating_ = false; 68 68 69 if (this->getScene() && Core::showsGraphics())69 if (this->getScene() && GameMode::showsGraphics()) 70 70 { 71 71 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 44 44 #include "util/Exception.h" 45 45 #include "util/String.h" 46 #include "core/ Core.h"46 #include "core/GameMode.h" 47 47 #include "core/CoreIncludes.h" 48 48 #include "core/XMLPort.h" … … 67 67 this->group_ = 0; 68 68 69 if (! Core::showsGraphics())69 if (!GameMode::showsGraphics()) 70 70 ThrowException(NoGraphics, "Can't create OrxonoxOverlay, graphics engine not initialized"); 71 71 -
code/branches/gui/src/orxonox/tools/BillboardSet.cc
r2662 r2848 37 37 #include <OgreBillboard.h> 38 38 39 #include "core/ Core.h"39 #include "core/GameMode.h" 40 40 #include "util/Convert.h" 41 41 #include "util/String.h" … … 72 72 try 73 73 { 74 if ( Core::showsGraphics())74 if (GameMode::showsGraphics()) 75 75 { 76 76 this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count); … … 95 95 try 96 96 { 97 if ( Core::showsGraphics())97 if (GameMode::showsGraphics()) 98 98 { 99 99 this->billboardSet_ = scenemanager->createBillboardSet("Billboard" + convertToString(BillboardSet::billboardSetCounter_s++), count); -
code/branches/gui/src/orxonox/tools/Mesh.cc
r2662 r2848 35 35 #include <cassert> 36 36 37 #include "core/ Core.h"37 #include "core/GameMode.h" 38 38 #include "util/Convert.h" 39 39 #include "util/String.h" … … 64 64 this->scenemanager_->destroyEntity(this->entity_); 65 65 66 if ( Core::showsGraphics())66 if (GameMode::showsGraphics()) 67 67 { 68 68 try -
code/branches/gui/src/orxonox/tools/ParticleInterface.cc
r2801 r2848 41 41 42 42 #include "GraphicsManager.h" 43 #include "core/ Core.h"43 #include "core/GameMode.h" 44 44 #include "core/CoreIncludes.h" 45 45 #include "util/Convert.h" … … 64 64 this->speedFactor_ = 1.0f; 65 65 66 if ( Core::showsGraphics())66 if (GameMode::showsGraphics()) 67 67 { 68 68 try … … 178 178 { 179 179 this->detaillevel_ = level; 180 if ( Core::showsGraphics())180 if (GameMode::showsGraphics()) 181 181 this->detailLevelChanged(GraphicsManager::getInstance().getDetailLevelParticle()); 182 182 } -
code/branches/gui/src/orxonox/tools/Shader.cc
r2801 r2848 36 36 #include <OgrePlugin.h> 37 37 38 #include "core/ Core.h"38 #include "core/GameMode.h" 39 39 #include "core/CoreIncludes.h" 40 40 #include "core/Executor.h" … … 59 59 this->compositorInstance_ = 0; 60 60 this->bVisible_ = true; 61 this->bLoadCompositor_ = Core::showsGraphics();61 this->bLoadCompositor_ = GameMode::showsGraphics(); 62 62 this->bViewportInitialized_ = false; 63 63 this->compositor_ = ""; … … 246 246 Shader::ParameterPointer* Shader::getParameterPointer(const std::string& material, size_t technique, size_t pass, const std::string& parameter) 247 247 { 248 if (! Core::showsGraphics() || !Shader::bLoadedCgPlugin_s)248 if (!GameMode::showsGraphics() || !Shader::bLoadedCgPlugin_s) 249 249 return 0; 250 250
Note: See TracChangeset
for help on using the changeset viewer.