- Timestamp:
- Dec 13, 2008, 10:54:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy2/src/orxonox/objects/infos/HumanPlayer.cc
r2171 r2428 37 37 #include "objects/controllers/HumanController.h" 38 38 #include "objects/gametypes/Gametype.h" 39 #include "overlays/OverlayGroup.h" 39 40 40 41 namespace orxonox … … 63 64 { 64 65 SetConfigValue(nick_, "Player").callback(this, &HumanPlayer::configvaluecallback_changednick); 66 SetConfigValue(hudtemplate_, "defaultHUD").callback(this, &HumanPlayer::configvaluecallback_changedHUDTemplate); 65 67 } 66 68 … … 69 71 REGISTERSTRING(this->synchronize_nick_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick)); 70 72 71 REGISTERDATA(this->clientID_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));73 REGISTERDATA(this->clientID_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged)); 72 74 REGISTERDATA(this->server_initialized_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized)); 73 75 REGISTERDATA(this->client_initialized_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized)); … … 83 85 this->setName(this->nick_); 84 86 } 87 } 88 89 void HumanPlayer::configvaluecallback_changedHUDTemplate() 90 { 91 this->changedController(); 85 92 } 86 93 … … 138 145 this->networkcallback_clientIDchanged(); 139 146 } 147 148 void HumanPlayer::changedController() 149 { 150 if (this->getController()) 151 { 152 this->getController()->setHUDTemplate(this->hudtemplate_); 153 154 if (this->getController() && this->getController()->getHUD()) 155 this->getController()->getHUD()->setOwner(this->getControllableEntity()); 156 } 157 } 140 158 }
Note: See TracChangeset
for help on using the changeset viewer.