Changeset 7456 for code/trunk/src/modules/questsystem/QuestHint.cc
- Timestamp:
- Sep 15, 2010, 7:29:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/questsystem/QuestHint.cc
r7403 r7456 28 28 29 29 /** 30 @file 30 @file QuestHint.cc 31 31 @brief Implementation of the QuestHint class. 32 32 */ … … 36 36 #include "core/CoreIncludes.h" 37 37 #include "core/XMLPort.h" 38 39 #include "Quest.h" 40 #include "QuestDescription.h" 38 41 #include "QuestManager.h" 39 #include "QuestDescription.h"40 #include "Quest.h"41 42 42 43 namespace orxonox … … 71 72 SUPER(QuestHint, XMLPort, xmlelement, mode); 72 73 73 QuestManager::getInstance().registerHint(this); // !<Registers the QuestHint with the QuestManager.74 QuestManager::getInstance().registerHint(this); // Registers the QuestHint with the QuestManager. 74 75 75 76 COUT(4) << "New QuestHint {" << this->getId() << "} created." << std::endl; … … 89 90 bool QuestHint::isActive(const PlayerInfo* player) const 90 91 { 91 if(player == NULL) //!< NULL-Pointers are ugly! 92 //TODO: Replace with asser. 93 if(player == NULL) // NULL-Pointers are ugly! 92 94 { 93 95 ThrowException(Argument, "The input PlayerInfo* is NULL."); … … 95 97 } 96 98 97 // !Find the player.99 // Find the player. 98 100 std::map<const PlayerInfo*, QuestHintStatus::Value>::const_iterator it = this->playerStatus_.find(player); 99 if (it != this->playerStatus_.end()) //!< If the player is in the map. 100 { 101 if (it != this->playerStatus_.end()) // If the player is in the map. 101 102 return it->second; 102 }103 103 104 104 return QuestStatus::Inactive; … … 115 115 bool QuestHint::setActive(PlayerInfo* player) 116 116 { 117 if(this->quest_->isActive(player)) // !<For a hint to get activated the quest must be active.117 if(this->quest_->isActive(player)) // For a hint to get activated the quest must be active. 118 118 { 119 if(!(this->isActive(player))) // !<If the hint is already active, activation is pointless.119 if(!(this->isActive(player))) // If the hint is already active, activation is pointless. 120 120 { 121 121 this->playerStatus_[player] = QuestHintStatus::Active; … … 145 145 bool QuestHint::setQuest(Quest* quest) 146 146 { 147 if(quest == NULL) //!< NULL-Pointer. Again..? 147 //TODO: Replace with assert. 148 if(quest == NULL) // NULL-Pointer. Again..? 148 149 { 149 150 COUT(2) << "The input Quest* is NULL." << std::endl;
Note: See TracChangeset
for help on using the changeset viewer.