Changeset 7493 for code/trunk/src/orxonox/worldentities
- Timestamp:
- Sep 27, 2010, 7:53:30 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/worldentities/WorldEntity.cc
r7401 r7493 214 214 SUPER(WorldEntity, changedActivity); 215 215 216 for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++) 217 { 218 if(!this->isActive()) 219 { 220 (*it)->bActiveMem_ = (*it)->isActive(); 221 (*it)->setActive(this->isActive()); 222 } 223 else 224 { 225 (*it)->setActive((*it)->bActiveMem_); 216 if(GameMode::isMaster()) 217 { 218 for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++) 219 { 220 if(!this->isActive()) 221 { 222 (*it)->bActiveMem_ = (*it)->isActive(); 223 (*it)->setActive(this->isActive()); 224 } 225 else 226 { 227 (*it)->setActive((*it)->bActiveMem_); 228 } 226 229 } 227 230 } … … 236 239 SUPER(WorldEntity, changedVisibility); 237 240 238 for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++) 239 { 240 if(!this->isVisible()) 241 { 242 (*it)->bVisibleMem_ = (*it)->isVisible(); 243 (*it)->setVisible(this->isVisible()); 244 } 245 else 246 { 247 (*it)->setVisible((*it)->bVisibleMem_); 241 if(GameMode::isMaster()) 242 { 243 for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++) 244 { 245 if(!this->isVisible()) 246 { 247 (*it)->bVisibleMem_ = (*it)->isVisible(); 248 (*it)->setVisible(this->isVisible()); 249 } 250 else 251 { 252 (*it)->setVisible((*it)->bVisibleMem_); 253 } 248 254 } 249 255 }
Note: See TracChangeset
for help on using the changeset viewer.