- Timestamp:
- Mar 22, 2009, 9:59:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/miniprojects/src/orxonox/objects/infos/PlayerInfo.cc
r2789 r2819 35 35 #include "network/ClientInformation.h" 36 36 #include "objects/gametypes/Gametype.h" 37 #include "overlays/OverlayGroup.h"38 37 39 38 namespace orxonox … … 51 50 this->controllableEntity_ = 0; 52 51 this->controllableEntityID_ = CLIENTID_UNKNOWN; 53 this->gametypeHud_ = 0;54 52 55 53 this->registerVariables(); … … 70 68 if (this->getGametype()) 71 69 this->getGametype()->playerLeft(this); 72 73 if (this->BaseObject::isInitialized() && this->gametypeHud_)74 delete this->gametypeHud_;75 70 } 76 71 } … … 109 104 else 110 105 this->getGametype()->playerEntered(this); 111 112 if (this->isLocalPlayer() && this->isHumanPlayer())113 if (this->getGametype()->getHUDTemplate() != "")114 this->setGametypeHUDTemplate(this->getGametype()->getHUDTemplate());115 106 } 116 107 } … … 185 176 } 186 177 } 187 188 void PlayerInfo::changedControllableEntity()189 {190 if (this->gametypeHud_)191 this->gametypeHud_->setOwner(this->getControllableEntity());192 }193 194 void PlayerInfo::updateGametypeHUD()195 {196 if (this->gametypeHud_)197 {198 delete this->gametypeHud_;199 this->gametypeHud_ = 0;200 }201 202 if (this->isLocalPlayer() && this->isHumanPlayer() && this->gametypeHudTemplate_ != "")203 {204 this->gametypeHud_ = new OverlayGroup(this);205 this->gametypeHud_->addTemplate(this->gametypeHudTemplate_);206 this->gametypeHud_->setOwner(this->getControllableEntity());207 }208 }209 178 }
Note: See TracChangeset
for help on using the changeset viewer.