Changeset 7865 for code/trunk/src/modules
- Timestamp:
- Feb 12, 2011, 3:08:59 PM (14 years ago)
- Location:
- code/trunk/src/modules/pong
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pong/Pong.cc
r7284 r7865 132 132 } 133 133 134 void Pong::spawnPlayersIfRequested() 135 { 136 // first spawn human players to assign always the left bat to the player in singleplayer 137 for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it) 138 if (it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_)) 139 this->spawnPlayer(it->first); 140 // now spawn bots 141 for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it) 142 if (!it->first->isHumanPlayer() && (it->first->isReadyToSpawn() || this->bForceSpawn_)) 143 this->spawnPlayer(it->first); 144 } 145 134 146 void Pong::spawnPlayer(PlayerInfo* player) 135 147 { -
code/trunk/src/modules/pong/Pong.h
r7852 r7865 57 57 58 58 protected: 59 virtual void spawnPlayersIfRequested(); 60 59 61 void startBall(); 60 62
Note: See TracChangeset
for help on using the changeset viewer.