- Timestamp:
- Dec 15, 2008, 7:40:25 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation/src/orxonox/objects/worldentities/Model.cc
r2459 r2468 68 68 void Model::changedMesh() 69 69 { 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()); 72 74 73 this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);75 this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_); 74 76 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 } 80 83 } 81 84 }
Note: See TracChangeset
for help on using the changeset viewer.