- Timestamp:
- May 28, 2011, 11:19:02 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/tutoriallevel3/src/orxonox/gametypes/Gametype.cc
r8453 r8634 58 58 59 59 this->defaultControllableEntity_ = Class(Spectator); 60 61 this->bFirstTick_ = true;62 60 63 61 this->bAutoStart_ = false; … … 114 112 SUPER(Gametype, tick, dt); 115 113 116 // Activate the GametypeInfo.117 if(this->bFirstTick_)118 {119 this->gtinfo_->setActive(true);120 this->bFirstTick_ = false;121 }122 123 114 //count timer 124 115 if (timerIsActive_) … … 134 125 135 126 if (!this->gtinfo_->hasStarted()) 127 { 128 for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it) 129 { 130 // Inform the GametypeInfo that the player is ready to spawn. 131 if(it->first->isHumanPlayer() && it->first->isReadyToSpawn()) 132 this->gtinfo_->playerReadyToSpawn(it->first); 133 } 134 136 135 this->checkStart(); 136 } 137 137 else if (!this->gtinfo_->hasEnded()) 138 138 this->spawnDeadPlayersIfRequested(); … … 182 182 { 183 183 this->players_[player].state_ = PlayerState::Joined; 184 this->gtinfo_->playerEntered(player); 184 185 } 185 186 … … 396 397 if (it->first->isHumanPlayer()) 397 398 hashumanplayers = true; 398 399 // Inform the GametypeInfo that the player is ready to spawn.400 // TODO: Can it happen, that that changes?401 if(it->first->isHumanPlayer() && it->first->isReadyToSpawn())402 this->gtinfo_->playerReadyToSpawn(it->first);403 399 } 404 400 if (allplayersready && hashumanplayers)
Note: See TracChangeset
for help on using the changeset viewer.