Changeset 6961 for code/branches/presentation3/src/orxonox
- Timestamp:
- May 21, 2010, 6:50:07 PM (14 years ago)
- Location:
- code/branches/presentation3/src/orxonox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/orxonox/Level.cc
r6926 r6961 127 127 this->objects_.push_back(object); 128 128 object->setGametype(this->getGametype()); 129 object->setLevel(this);129 object->setLevel(this); 130 130 } 131 131 -
code/branches/presentation3/src/orxonox/Scene.cc
r6417 r6961 47 47 #include "Radar.h" 48 48 #include "worldentities/WorldEntity.h" 49 #include "Level.h" 49 50 50 51 namespace orxonox … … 133 134 registerVariable(this->bHasPhysics_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_hasPhysics)); 134 135 registerVariable(this->bShadows_, VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows)); 136 registerVariable(this->getLevel(), VariableDirection::ToClient, new NetworkCallback<Scene>(this, &Scene::changedLevel)); 135 137 } 136 138 -
code/branches/presentation3/src/orxonox/graphics/Model.cc
r6942 r6961 115 115 Level* level_ = this->getLevel(); 116 116 117 MeshLodInformation* lodInfo = level_->getLodInfo(this->meshSrc_); 118 119 if(lodInfo!=0) 120 setLodLevel(lodInfo->getLodLevel()); 117 // TODO: make this also working on the client (there is currently no level pointer in the baseobject on the client) 118 if( level_ != 0 && level_->getLodInfo(this->meshSrc_)!=0 ) 119 setLodLevel(level_->getLodInfo(this->meshSrc_)->getLodLevel()); 121 120 122 121 COUT(4) << "Setting lodLevel for " << this->meshSrc_<< " with lodLevel_: " << this->lodLevel_ <<" and scale: "<< scaleFactor << ":" << std::endl; -
code/branches/presentation3/src/orxonox/interfaces/RadarViewable.cc
r6942 r6961 31 31 #include "util/StringUtils.h" 32 32 #include "core/CoreIncludes.h" 33 #include "core/GameMode.h" 33 34 #include "worldentities/WorldEntity.h" 34 35 #include "Radar.h" … … 52 53 53 54 this->uniqueId_=getUniqueNumberString(); 54 this->radar_ = this->creator_->getScene()->getRadar(); 55 this->radar_->addRadarObject(this); 55 if( GameMode::showsGraphics() ) 56 { 57 this->radar_ = this->creator_->getScene()->getRadar(); 58 this->radar_->addRadarObject(this); 59 } 56 60 this->bInitialized_ = true; 57 61 } … … 60 64 RadarViewable::~RadarViewable() 61 65 { 66 62 67 if( this->bInitialized_ ) 63 this->radar_->removeRadarObject(this); 68 { 69 if( GameMode::showsGraphics() ) 70 { 71 this->radar_->removeRadarObject(this); 72 } 73 } 64 74 } 65 75 … … 101 111 void RadarViewable::settingsChanged() 102 112 { 103 this->radar_->radarObjectChanged(this); 113 if( GameMode::showsGraphics() ) 114 { 115 this->radar_->radarObjectChanged(this); 116 } 104 117 } 105 118 }
Note: See TracChangeset
for help on using the changeset viewer.