Changeset 10555 for code/branches/core7/src/orxonox/worldentities
- Timestamp:
- Aug 29, 2015, 5:35:59 PM (9 years ago)
- Location:
- code/branches/core7/src/orxonox/worldentities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/orxonox/worldentities/ControllableEntity.cc
r10478 r10555 108 108 this->camera_->destroy(); 109 109 110 for (std::list<S martPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)110 for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 111 111 (*it)->destroy(); 112 112 … … 165 165 { 166 166 unsigned int i = 0; 167 for (std::list<S martPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)167 for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 168 168 { 169 169 if (i == index) … … 180 180 181 181 unsigned int counter = 0; 182 for (std::list<S martPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)182 for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 183 183 { 184 184 if ((*it) == this->currentCameraPosition_) … … 219 219 else if (this->cameraPositions_.size() > 0) 220 220 { 221 for (std::list<S martPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)221 for (std::list<StrongPtr<CameraPosition> >::const_iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 222 222 { 223 223 if ((*it) == this->camera_->getParent()) … … 477 477 if (parent) 478 478 { 479 for (std::list<S martPtr<CameraPosition> >::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it)479 for (std::list<StrongPtr<CameraPosition> >::iterator it = this->cameraPositions_.begin(); it != this->cameraPositions_.end(); ++it) 480 480 if ((*it)->getIsAbsolute()) 481 481 parent->attach((*it)); -
code/branches/core7/src/orxonox/worldentities/ControllableEntity.h
r9667 r10555 114 114 void addCameraPosition(CameraPosition* position); 115 115 CameraPosition* getCameraPosition(unsigned int index) const; 116 inline const std::list<S martPtr<CameraPosition> >& getCameraPositions() const116 inline const std::list<StrongPtr<CameraPosition> >& getCameraPositions() const 117 117 { return this->cameraPositions_; } 118 118 unsigned int getCurrentCameraIndex() const; … … 235 235 bool bMouseLook_; 236 236 float mouseLookSpeed_; 237 std::list<S martPtr<CameraPosition> > cameraPositions_;237 std::list<StrongPtr<CameraPosition> > cameraPositions_; 238 238 CameraPosition* currentCameraPosition_; 239 239 std::string cameraPositionTemplate_; -
code/branches/core7/src/orxonox/worldentities/WorldEntity.cc
r10362 r10555 130 130 WorldEntity* entity = *it; 131 131 132 // do this for all children, because even if getDeleteWithParent() returns true a child might still stay active due to s martpointers pointing to it132 // do this for all children, because even if getDeleteWithParent() returns true a child might still stay active due to strong pointers pointing to it 133 133 entity->setPosition(entity->getWorldPosition()); 134 134 this->detach(entity); // detach also erases the element from the children set
Note: See TracChangeset
for help on using the changeset viewer.