- Timestamp:
- Mar 16, 2009, 2:11:14 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/miniprojects/src/orxonox/objects/infos/HumanPlayer.cc
r2662 r2789 53 53 this->defaultController_ = Class(HumanController); 54 54 55 this->humanHud_ = 0; 56 55 57 this->setConfigValues(); 56 58 this->registerVariables(); … … 59 61 HumanPlayer::~HumanPlayer() 60 62 { 63 if (this->isInitialized() && this->humanHud_) 64 delete this->humanHud_; 61 65 } 62 66 … … 89 93 void HumanPlayer::configvaluecallback_changedHUDTemplate() 90 94 { 91 this-> changedController();95 this->setHumanHUDTemplate(this->hudtemplate_); 92 96 } 93 97 … … 146 150 } 147 151 148 void HumanPlayer::changedControll er()152 void HumanPlayer::changedControllableEntity() 149 153 { 150 if (this->getController()) 154 PlayerInfo::changedControllableEntity(); 155 156 if (this->humanHud_) 157 this->humanHud_->setOwner(this->getControllableEntity()); 158 } 159 160 void HumanPlayer::updateHumanHUD() 161 { 162 if (this->humanHud_) 151 163 { 152 this->getController()->setHUDTemplate(this->hudtemplate_); 164 delete this->humanHud_; 165 this->humanHud_ = 0; 166 } 153 167 154 if (this->getController() && this->getController()->getHUD()) 155 this->getController()->getHUD()->setOwner(this->getControllableEntity()); 168 if (this->humanHudTemplate_ != "") 169 { 170 this->humanHud_ = new OverlayGroup(this); 171 this->humanHud_->addTemplate(this->humanHudTemplate_); 172 this->humanHud_->setOwner(this->getControllableEntity()); 156 173 } 157 174 }
Note: See TracChangeset
for help on using the changeset viewer.