Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2537


Ignore:
Timestamp:
Dec 28, 2008, 7:21:17 PM (15 years ago)
Author:
rgrieder
Message:
  • Removed a const_const that could be easily replaced
  • getScene()→getSceneManager() is non zero again in dedicated mode

—> PLEASE ALWAYS USE Core::showsGraphics() TO IDENTIFY EXACTLY THAT, NOT this→getScene()→getSceneManager().

Location:
code/branches/presentation/src/orxonox/objects
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation/src/orxonox/objects/Scene.cc

    r2535 r2537  
    7373        {
    7474            // create a dummy SceneManager of our own since we don't have Ogre::Root.
    75             this->sceneManagerDedicated_ = new Ogre::DefaultSceneManager("");
    76             this->rootSceneNode_ = this->sceneManagerDedicated_->getRootSceneNode();
    77             this->sceneManager_ = 0;
     75            this->sceneManager_ = new Ogre::DefaultSceneManager("");
     76            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
    7877        }
    7978
     
    102101            else if (!Core::showsGraphics())
    103102            {
    104                 delete this->sceneManagerDedicated_;
     103                delete this->sceneManager_;
    105104            }
    106105
  • code/branches/presentation/src/orxonox/objects/Scene.h

    r2485 r2537  
    8080
    8181            Ogre::SceneManager*      sceneManager_;
    82             Ogre::SceneManager*      sceneManagerDedicated_;
    8382            Ogre::SceneNode*         rootSceneNode_;
    8483
  • code/branches/presentation/src/orxonox/objects/worldentities/Backlight.cc

    r2500 r2537  
    214214                this->update_trailmaterial();
    215215                if (this->ribbonTrail_)
    216                     this->ribbonTrail_->addNode(const_cast<Ogre::SceneNode*>(this->getNode()));
     216                    this->ribbonTrail_->addNode(this->node_);
    217217            }
    218218        }
  • code/branches/presentation/src/orxonox/objects/worldentities/Billboard.cc

    r2485 r2537  
    3434#include "core/CoreIncludes.h"
    3535#include "core/XMLPort.h"
     36#include "core/Core.h"
    3637#include "objects/Scene.h"
    3738
     
    8081        if (!this->billboard_.getBillboardSet())
    8182        {
    82             if (this->getScene() && this->getScene()->getSceneManager())
     83            if (this->getScene() && Core::showsGraphics())
    8384            {
    8485                this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1);
     
    9798        {
    9899/*
    99             if (this->getScene() && this->getScene()->getSceneManager() && (this->material_ != ""))
     100            if (this->getScene() && Core::showsGraphics() && (this->material_ != ""))
    100101            {
    101102                this->billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->material_, this->colour_, 1);
  • code/branches/presentation/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r2485 r2537  
    4747        RegisterObject(ExplosionChunk);
    4848
    49         if (!this->getScene() || !this->getScene()->getSceneManager())
     49        if (!this->getScene() || !Core::showsGraphics() || !this->getScene()->getSceneManager())
    5050            ThrowException(AbortLoading, "Can't create ExplosionChunk, no scene or no scene manager given.");
    5151
  • code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.cc

    r2497 r2537  
    107107        }
    108108
    109         if (this->getScene() && this->getScene()->getSceneManager())
     109        if (Core::showsGraphics() && this->getScene() && this->getScene()->getSceneManager())
    110110        {
    111111            try
  • code/branches/presentation/src/orxonox/objects/worldentities/triggers/Trigger.cc

    r2500 r2537  
    3636#include "core/ConsoleCommand.h"
    3737#include "core/XMLPort.h"
     38#include "core/Core.h"
    3839#include "objects/Scene.h"
    3940
     
    6667//    this->bUpdating_ = false;
    6768
    68     if (this->getScene() && this->getScene()->getSceneManager())
     69    if (this->getScene() && Core::showsGraphics())
    6970    {
    7071      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.