Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 12, 2011, 7:50:43 PM (13 years ago)
Author:
jo
Message:

Ai and tutorial improvements merged back to the trunk. AI features: all weapons are used, the ai-firestrength is configurable, bots are able to collect pickups . I've set the tutorial level as default level.

Location:
code/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/modules/questsystem/QuestItem.h

    r7552 r8891  
    105105            QuestDescription* description_; //!< The QuestDescription of the QuestItem.
    106106
    107             bool registered_;
     107            bool registered_; //!< Whether the QuestItem is registered with the QuestManager.
    108108
    109109    };
  • code/trunk/src/modules/questsystem/QuestManager.cc

    r8858 r8891  
    3535
    3636#include "util/Exception.h"
     37#include "util/OrxAssert.h"
    3738#include "util/ScopedSingletonManager.h"
    3839#include "core/command/ConsoleCommand.h"
     
    6061    {
    6162        RegisterRootObject(QuestManager);
    62 
    6363        orxout(internal_info, context::quests) << "QuestManager created." << endl;
    6464    }
     
    9595    bool QuestManager::registerQuest(Quest* quest)
    9696    {
    97         assert(quest);
     97        if(quest == NULL)
     98        {
     99            COUT(1) << "Quest pointer is NULL." << endl;
     100            return false;
     101        }
    98102
    99103        std::pair<std::map<std::string, Quest*>::iterator,bool> result;
     
    133137    bool QuestManager::registerHint(QuestHint* hint)
    134138    {
    135         assert(hint);
     139        if(hint == NULL)
     140        {
     141            COUT(1) << "Hint pointer is NULL." << endl;
     142            return false;
     143        }
    136144
    137145        std::pair<std::map<std::string, QuestHint*>::iterator,bool> result;
     
    361369    Quest* QuestManager::getParentQuest(Quest* quest)
    362370    {
     371        OrxAssert(quest, "The input Quest is NULL.");
    363372        return quest->getParentQuest();
    364373    }
     
    374383    QuestDescription* QuestManager::getDescription(Quest* item)
    375384    {
     385        OrxAssert(item, "The input Quest is NULL.");
    376386        return item->getDescription();
    377387    }
     
    387397    QuestDescription* QuestManager::getDescription(QuestHint* item)
    388398    {
     399        OrxAssert(item, "The input QuestHint is NULL.");
    389400        return item->getDescription();
    390401    }
     
    400411    const std::string QuestManager::getId(Quest* item) const
    401412    {
     413        OrxAssert(item, "The input Quest is NULL.");
    402414        return item->getId();
    403415    }
     
    413425    const std::string QuestManager::getId(QuestHint* item) const
    414426    {
     427        OrxAssert(item, "The input QuestHint is NULL.");
    415428        return item->getId();
    416429    }
Note: See TracChangeset for help on using the changeset viewer.