Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

File:
1 edited

Legend:

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