Changeset 11071 for code/trunk/src/orxonox/infos/PlayerInfo.cc
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (8 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/infos/PlayerInfo.cc
r11052 r11071 51 51 this->bReadyToSpawn_ = false; 52 52 this->bSetUnreadyAfterSpawn_ = true; 53 this->controller_ = 0;54 this->controllableEntity_ = 0;53 this->controller_ = nullptr; 54 this->controllableEntity_ = nullptr; 55 55 this->controllableEntityID_ = OBJECTID_UNKNOWN; 56 56 57 this->gtinfo_ = 0;57 this->gtinfo_ = nullptr; 58 58 this->gtinfoID_ = OBJECTID_UNKNOWN; 59 59 this->updateGametypeInfo(this->getGametype()); … … 72 72 { 73 73 this->controller_->destroy(); 74 this->controller_ = 0;74 this->controller_ = nullptr; 75 75 } 76 76 … … 126 126 void PlayerInfo::updateGametypeInfo(Gametype* gametype) 127 127 { 128 this->gtinfo_ = 0;128 this->gtinfo_ = nullptr; 129 129 this->gtinfoID_ = OBJECTID_UNKNOWN; 130 130 … … 141 141 { 142 142 this->controller_->destroy(); 143 this->controller_ = 0;143 this->controller_ = nullptr; 144 144 } 145 145 this->controller_ = this->defaultController_.fabricate(this->getContext()); … … 181 181 182 182 RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity); 183 if (radarviewable != NULL)183 if (radarviewable != nullptr) 184 184 radarviewable->setRadarName(this->getName()); 185 185 } … … 218 218 return; 219 219 220 this->controllableEntity_->setController( 0);221 this->controllableEntity_ = 0;220 this->controllableEntity_->setController(nullptr); 221 this->controllableEntity_ = nullptr; 222 222 this->controllableEntityID_ = OBJECTID_UNKNOWN; 223 223 224 224 if (this->controller_) 225 this->controller_->setControllableEntity( 0);225 this->controller_->setControllableEntity(nullptr); 226 226 227 227 if ( GameMode::isMaster() ) … … 239 239 240 240 Controller* tmp =this->controllableEntity_->getController(); 241 if (tmp == NULL)242 { 243 orxout(verbose) << "PlayerInfo: pauseControl, Controller is NULL" << endl;241 if (tmp == nullptr) 242 { 243 orxout(verbose) << "PlayerInfo: pauseControl, Controller is nullptr " << endl; 244 244 return; 245 245 } 246 246 tmp->setActive(false); 247 //this->controllableEntity_->getController()->setControllableEntity( NULL);248 this->controllableEntity_->setController( 0);247 //this->controllableEntity_->getController()->setControllableEntity(nullptr); 248 this->controllableEntity_->setController(nullptr); 249 249 } 250 250 … … 253 253 ControllableEntity* entity = this->controllableEntity_; 254 254 255 assert(this->controllableEntity_ != NULL);255 assert(this->controllableEntity_ != nullptr); 256 256 if( !entity || this->previousControllableEntity_.size() == 0 ) 257 257 return; … … 259 259 entity->destroyHud(); // HACK-ish 260 260 261 this->controllableEntity_->setController( 0);261 this->controllableEntity_->setController(nullptr); 262 262 if(this->isHumanPlayer()) // TODO: Multiplayer? 263 263 this->controllableEntity_->destroyHud(); // HACK-ish … … 266 266 do { 267 267 this->controllableEntity_ = this->previousControllableEntity_.back(); 268 } while(this->controllableEntity_ == NULL&& this->previousControllableEntity_.size() > 0);268 } while(this->controllableEntity_ == nullptr && this->previousControllableEntity_.size() > 0); 269 269 this->controllableEntityID_ = this->controllableEntity_->getObjectID(); 270 270 this->previousControllableEntity_.pop_back(); 271 271 272 if ( this->controllableEntity_ != NULL && this->controller_ != NULL)272 if ( this->controllableEntity_ != nullptr && this->controller_ != nullptr) 273 273 this->controller_->setControllableEntity(this->controllableEntity_); 274 274 275 275 // HACK-ish 276 if(this->controllableEntity_ != NULL&& this->isHumanPlayer())276 if(this->controllableEntity_ != nullptr && this->isHumanPlayer()) 277 277 this->controllableEntity_->createHud(); 278 278
Note: See TracChangeset
for help on using the changeset viewer.