Changeset 3370 for code/trunk/src/orxonox/objects/quest/QuestManager.cc
- Timestamp:
- Jul 30, 2009, 2:10:44 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/resource (added) merged: 3328,3336-3340,3342-3350,3352-3366
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/quest/QuestManager.cc
r3325 r3370 36 36 #include "util/Exception.h" 37 37 #include "core/CoreIncludes.h" 38 #include "gui/GUIManager.h"39 38 40 39 #include "objects/infos/PlayerInfo.h" … … 48 47 { 49 48 //! Pointer to the current (and single) instance of this class. 50 /*static*/ QuestManager* QuestManager::singleton Ref_s = NULL;49 /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL; 51 50 52 51 /** … … 59 58 { 60 59 RegisterRootObject(QuestManager); 61 62 assert(singletonRef_s == 0);63 singletonRef_s = this;64 60 } 65 61 … … 71 67 { 72 68 73 }74 75 /**76 @brief77 Returns a reference to the current (and single) instance of the QuestManager, and creates one if there isn't one to begin with.78 @return79 Returns a reference to the single instance of the Quest Manager.80 */81 /*static*/ QuestManager & QuestManager::getInstance()82 {83 assert(singletonRef_s);84 return *singletonRef_s;85 69 } 86 70 … … 225 209 QuestContainer* QuestManager::getQuestTree(std::string & name) 226 210 { 227 GUIOverlay* gui = GUIManager::getInstance().getOverlay(name); 211 GUIOverlay* gui = NULL; 212 for (ObjectList<GUIOverlay>::iterator it = ObjectList<GUIOverlay>::begin(); it != ObjectList<GUIOverlay>::end(); ++it) 213 if (it->getGUIName() == name) 214 gui = *it; 228 215 229 216 PlayerInfo* player; … … 321 308 { 322 309 container->status = ""; 323 COUT(1) << "An error occur ed. A Quest of un-specified status wanted to be displayed." << std::endl;310 COUT(1) << "An error occurred. A Quest of un-specified status wanted to be displayed." << std::endl; 324 311 } 325 312
Note: See TracChangeset
for help on using the changeset viewer.