Changeset 2848 for code/branches/gui/src/orxonox/objects/worldentities
- Timestamp:
- Mar 25, 2009, 7:37:00 PM (16 years ago)
- Location:
- code/branches/gui/src/orxonox/objects/worldentities
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note: See TracChangeset
for help on using the changeset viewer.