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/objects/worldentities
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • 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);
Note: See TracChangeset for help on using the changeset viewer.