Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2009, 2:10:44 PM (15 years ago)
Author:
rgrieder
Message:

Merged resource branch back to the trunk. Changes:

  • Automated graphics loading by evaluating whether a GameState requires it
  • Using native Tcl library (x3n)

Windows users: Update your dependency package!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/quest/QuestManager.cc

    r3325 r3370  
    3636#include "util/Exception.h"
    3737#include "core/CoreIncludes.h"
    38 #include "gui/GUIManager.h"
    3938
    4039#include "objects/infos/PlayerInfo.h"
     
    4847{
    4948    //! Pointer to the current (and single) instance of this class.
    50     /*static*/ QuestManager* QuestManager::singletonRef_s = NULL;
     49    /*static*/ QuestManager* QuestManager::singletonPtr_s = NULL;
    5150
    5251    /**
     
    5958    {
    6059        RegisterRootObject(QuestManager);
    61 
    62         assert(singletonRef_s == 0);
    63         singletonRef_s = this;
    6460    }
    6561
     
    7167    {
    7268
    73     }
    74 
    75     /**
    76     @brief
    77         Returns a reference to the current (and single) instance of the QuestManager, and creates one if there isn't one to begin with.
    78     @return
    79         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;
    8569    }
    8670
     
    225209    QuestContainer* QuestManager::getQuestTree(std::string & name)
    226210    {
    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;
    228215
    229216        PlayerInfo* player;
     
    321308        {
    322309            container->status = "";
    323             COUT(1) << "An error occured. 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;
    324311        }
    325312       
Note: See TracChangeset for help on using the changeset viewer.