Changeset 2438 for code/branches/objecthierarchy2/src/orxonox/objects/worldentities/ControllableEntity.cc
- Timestamp:
- Dec 14, 2008, 3:53:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy2/src/orxonox/objects/worldentities/ControllableEntity.cc
r2428 r2438 81 81 if (this->isInitialized()) 82 82 { 83 if (this->bHasLocalController_ )83 if (this->bHasLocalController_ && this->bHasHumanController_) 84 84 this->stopLocalHumanControl(); 85 85 … … 250 250 void ControllableEntity::stopLocalHumanControl() 251 251 { 252 this->camera_->detachFromParent(); 253 delete this->camera_; 254 this->camera_ = 0; 255 256 delete this->hud_; 257 this->hud_ = 0; 252 if (this->camera_) 253 { 254 this->camera_->detachFromParent(); 255 delete this->camera_; 256 this->camera_ = 0; 257 } 258 259 if (this->hud_) 260 { 261 delete this->hud_; 262 this->hud_ = 0; 263 } 258 264 } 259 265
Note: See TracChangeset
for help on using the changeset viewer.