- Timestamp:
- Oct 24, 2008, 2:48:43 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc
r1993 r2006 38 38 39 39 #include "network/Host.h" 40 #include "network/ClientInformation.h" 40 41 41 42 #include "GraphicsEngine.h" … … 57 58 this->bHumanPlayer_ = false; 58 59 this->bFinishedSetup_ = false; 60 this->gametype_ = 0; 59 61 60 62 this->pawn_ = 0; … … 71 73 if (this->isInitialized()) 72 74 { 73 Gametype* gametype = Gametype::getCurrentGametype(); 74 if (gametype) 75 gametype->removePlayer(this); 75 if (this->gametype_) 76 this->gametype_->removePlayer(this); 76 77 77 78 if (this->controller_) … … 101 102 void PlayerInfo::changedName() 102 103 { 103 Gametype* gametype = Gametype::getCurrentGametype(); 104 if (gametype) 105 gametype->playerChangedName(this); 104 if (this->gametype_) 105 this->gametype_->playerChangedName(this); 106 106 } 107 107 … … 147 147 else if (this->bFinishedSetup_) 148 148 { 149 Gametype* gametype = Gametype::getCurrentGametype(); 150 if (gametype) 151 gametype->addPlayer(this); 149 if (this->gametype_) 150 this->gametype_->addPlayer(this); 152 151 } 153 152 } … … 165 164 void PlayerInfo::stopControl() 166 165 { 167 this->pawn_->removePlayer(); 166 if (this->pawn_) 167 this->pawn_->removePlayer(); 168 168 this->pawn_ = 0; 169 169 this->pawnID_ = network::OBJECTID_UNKNOWN;
Note: See TracChangeset
for help on using the changeset viewer.