Changeset 11071 for code/trunk/src/orxonox/gametypes/Mission.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/gametypes/Mission.cc
r10624 r11071 101 101 void Mission::setTeams() 102 102 { //Set pawn-colours 103 for ( ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it)103 for (Pawn* pawn : ObjectList<Pawn>()) 104 104 { 105 Pawn* pawn = static_cast<Pawn*>(*it);106 105 if (!pawn) 107 106 continue; … … 111 110 void Mission::endMission(bool accomplished) 112 111 { 113 for ( ObjectList<Mission>::iterator it = ObjectList<Mission>::begin(); it != ObjectList<Mission>::end(); ++it)112 for (Mission* mission : ObjectList<Mission>()) 114 113 { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would end ALL missions! 115 it->setMissionAccomplished(accomplished);116 it->end();114 mission->setMissionAccomplished(accomplished); 115 mission->end(); 117 116 } 118 117 } … … 120 119 void Mission::setLivesWrapper(unsigned int amount) 121 120 { 122 for ( ObjectList<Mission>::iterator it = ObjectList<Mission>::begin(); it != ObjectList<Mission>::end(); ++it)121 for (Mission* mission : ObjectList<Mission>()) 123 122 { //TODO: make sure that only the desired mission is ended !! This is a dirty HACK, that would affect ALL missions! 124 it->setLives(amount);123 mission->setLives(amount); 125 124 } 126 125 }
Note: See TracChangeset
for help on using the changeset viewer.