Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2468


Ignore:
Timestamp:
Dec 15, 2008, 7:40:25 PM (16 years ago)
Author:
rgrieder
Message:

Bugfix for dedicated mode. Should work now except for an exception with an OrxonoxOverlay. Was that there before too?

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

Legend:

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

    r2466 r2468  
    7474        {
    7575            // create a dummy SceneManager of our own since we don't have Ogre::Root.
    76             this->sceneManager_ = new Ogre::DefaultSceneManager("");
    77             this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
     76            this->sceneManagerDedicated_ = new Ogre::DefaultSceneManager("");
     77            this->rootSceneNode_ = this->sceneManagerDedicated_->getRootSceneNode();
     78            this->sceneManager_ = 0;
    7879        }
    7980
     
    114115            else if (!Core::showsGraphics())
    115116            {
    116                 delete this->sceneManager_;
     117                delete this->sceneManagerDedicated_;
    117118            }
    118119
  • code/branches/presentation/src/orxonox/objects/Scene.h

    r2466 r2468  
    7878
    7979            Ogre::SceneManager*      sceneManager_;
     80            Ogre::SceneManager*      sceneManagerDedicated_;
    8081            Ogre::SceneNode*         rootSceneNode_;
    8182
  • code/branches/presentation/src/orxonox/objects/worldentities/Model.cc

    r2459 r2468  
    6868    void Model::changedMesh()
    6969    {
    70         if (this->mesh_.getEntity())
    71             this->detachOgreObject(this->mesh_.getEntity());
     70        if (Core::showsGraphics())
     71        {
     72            if (this->mesh_.getEntity())
     73                this->detachOgreObject(this->mesh_.getEntity());
    7274
    73         this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
     75            this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
    7476
    75         if (this->mesh_.getEntity())
    76         {
    77             this->attachOgreObject(this->mesh_.getEntity());
    78             this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
    79             this->mesh_.setVisible(this->isVisible());
     77            if (this->mesh_.getEntity())
     78            {
     79                this->attachOgreObject(this->mesh_.getEntity());
     80                this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
     81                this->mesh_.setVisible(this->isVisible());
     82            }
    8083        }
    8184    }
  • code/branches/presentation/src/orxonox/objects/worldentities/ParticleEmitter.cc

    r2459 r2468  
    5151        RegisterObject(ParticleEmitter);
    5252
    53         if (!this->getScene() || !this->getScene()->getSceneManager())
     53        if (Core::showsGraphics() && (!this->getScene() || !this->getScene()->getSceneManager()))
    5454            ThrowException(AbortLoading, "Can't create Camera, no scene or no scene manager given.");
    5555
Note: See TracChangeset for help on using the changeset viewer.