Changeset 7865
- Timestamp:
- Feb 12, 2011, 3:08:59 PM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/data/levels/pong.oxw
r7863 r7865 1 <LevelInfo 2 name = "Pong" 3 description = "Pong in space!" 4 tags = "" 5 /> 6 1 7 <?lua 2 8 include("HUDTemplates3.oxo") … … 52 58 53 59 <WorldAmbientSound source="mainmenu.ogg" playOnLoad=true /> 60 61 <PongBot /> 54 62 55 63 <Scene -
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.