Changeset 2908 for code/branches/questsystem5/src/orxonox/objects/Level.cc
- Timestamp:
- Apr 8, 2009, 12:58:47 AM (15 years ago)
- Location:
- code/branches/questsystem5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem5
- Property svn:mergeinfo changed
-
code/branches/questsystem5/src/orxonox/objects/Level.cc
- Property svn:mergeinfo changed
/code/branches/gui/src/orxonox/objects/Level.cc removed /code/branches/miniprojects/src/orxonox/objects/Level.cc removed /code/branches/weaponsystem/src/orxonox/objects/Level.cc removed
r2907 r2908 105 105 { 106 106 Identifier* identifier = ClassByString(gametype); 107 108 if (!identifier || !identifier->isA(Class(Gametype))) 107 if (identifier && identifier->isA(Class(Gametype))) 109 108 { 110 COUT(0) << "Error: \"" << gametype << "\" is not a valid gametype." << std::endl;111 identifier = Class(Gametype);112 this->gametype_ = "Gametype";113 }114 else115 109 this->gametype_ = gametype; 116 110 117 std::cout << "Load Gametype: " << this->gametype_ << std::endl; 111 Gametype* rootgametype = dynamic_cast<Gametype*>(identifier->fabricate(this)); 112 this->setGametype(rootgametype); 118 113 119 Gametype* rootgametype = dynamic_cast<Gametype*>(identifier->fabricate(this));120 this->setGametype(rootgametype);114 for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it) 115 (*it)->setGametype(rootgametype); 121 116 122 std::cout << "root gametype: " << rootgametype->getIdentifier()->getName() << std::endl; 123 124 for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it) 125 (*it)->setGametype(rootgametype); 126 127 if (LevelManager::getInstancePtr()) 128 LevelManager::getInstance().requestActivity(this); 117 if (LevelManager::getInstancePtr()) 118 LevelManager::getInstance().requestActivity(this); 119 } 129 120 } 130 121 - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.