Changeset 5922 for code/branches/core5/src/orxonox/gamestates
- Timestamp:
- Oct 9, 2009, 5:15:14 PM (15 years ago)
- Location:
- code/branches/core5/src/orxonox/gamestates
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/orxonox/gamestates/GSLevel.cc
r5910 r5922 150 150 void GSLevel::loadLevel() 151 151 { 152 for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it) 153 this->staticObjects_.insert(*it); 154 152 155 // call the loader 153 156 COUT(0) << "Loading level..." << std::endl; … … 160 163 Loader::unload(startFile_); 161 164 delete startFile_; 165 166 COUT(3) << "Unloaded level. Remaining objects:" << std::endl; 167 unsigned int i = 0; 168 for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it != ObjectList<BaseObject>::end(); ++it) 169 { 170 std::set<BaseObject*>::const_iterator find = this->staticObjects_.find(*it); 171 if (find == this->staticObjects_.end()) 172 { 173 COUT(3) << ++i << ": " << it->getIdentifier()->getName() << " (" << *it << ")" << std::endl; 174 } 175 } 176 COUT(3) << i << " objects remaining."; 177 if (i == 0) 178 COUT(3) << " Well done!" << std::endl; 179 else 180 COUT(3) << " Try harder!" << std::endl; 162 181 } 163 182 } -
code/branches/core5/src/orxonox/gamestates/GSLevel.h
r5876 r5922 33 33 34 34 #include <string> 35 #include <set> 35 36 #include "core/OrxonoxClass.h" 36 37 #include "core/GameState.h" … … 58 59 59 60 XMLFile* startFile_; 61 std::set<BaseObject*> staticObjects_; 60 62 }; 61 63 }
Note: See TracChangeset
for help on using the changeset viewer.