Index: code/trunk/src/orxonox/objects/quest/QuestHint.cc
===================================================================
--- code/trunk/src/orxonox/objects/quest/QuestHint.cc	(revision 2105)
+++ code/trunk/src/orxonox/objects/quest/QuestHint.cc	(revision 2261)
@@ -26,4 +26,10 @@
  *
  */
+ 
+/**
+    @file QuestHint.cc
+    @brief
+    Implementation of the QuestHint class.
+*/
 
 #include "OrxonoxStableHeaders.h"
@@ -33,4 +39,6 @@
 #include "util/Exception.h"
 
+#include "orxonox/objects/infos/PlayerInfo.h"
+#include "QuestManager.h"
 #include "Quest.h"
 
@@ -41,11 +49,9 @@
     /**
     @brief
-        Constructor.
+        Constructor. Registers the object.
     */
     QuestHint::QuestHint(BaseObject* creator) : QuestItem(creator)
     {
         RegisterObject(QuestHint);
-
-        this->initialize();
     }
 
@@ -59,13 +65,14 @@
     }
 
-    void QuestHint::initialize(void)
-    {
-        RegisterObject(QuestHint);
-    }
-
+    /**
+    @brief
+        Method for creating a QuestHint object through XML.
+    */
     void QuestHint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
         SUPER(QuestHint, XMLPort, xmlelement, mode);
 
+        QuestManager::registerHint(this); //!< Registers the QuestHint with the QuestManager.
+        
         COUT(3) << "New QuestHint {" << this->getId() << "} created." << std::endl;
     }
@@ -74,5 +81,5 @@
     /**
     @brief
-        Checks whether the hint is active for a specific player.
+        Checks whether the QuestHint is active for a specific player.
     @param player
         The player.
@@ -80,19 +87,21 @@
         Throws an Argument Exception if the input Player-pointer is NULL.
     @return
-        Returns true if the hint is active for the specified player.
+        Returns true if the QuestHint is active for the specified player.
     */
-    bool QuestHint::isActive(Player* player)
+    bool QuestHint::isActive(const PlayerInfo* player) const
     {
-        if(player == NULL)
+        if(player == NULL) //!< NULL-Pointers are ugly!
         {
-            ThrowException(Argument, "The input Player* is NULL.");
+            ThrowException(Argument, "The input PlayerInfo* is NULL.");
             return false;
         }
 
-        std::map<Player*, questHintStatus::Enum>::iterator it = this->playerStatus_.find(player);
-        if (it != this->playerStatus_.end())
+        //! Find the player.
+        std::map<const PlayerInfo*, questHintStatus::Enum>::const_iterator it = this->playerStatus_.find(player);
+        if (it != this->playerStatus_.end()) //!< If the player is in the map.
         {
             return it->second;
         }
+        
         return questStatus::inactive;
     }
@@ -106,9 +115,9 @@
         Returns true if the activation was successful, false if there were problems.
     */
-    bool QuestHint::activate(Player* player)
+    bool QuestHint::setActive(PlayerInfo* player)
     {
-        if(this->quest_->isActive(player))
+        if(this->quest_->isActive(player)) //!< For a hint to get activated the quest must be active.
         {
-            if(!(this->isActive(player)))
+            if(!(this->isActive(player)))  //!< If the hint is already active, activation is pointless.
             {
                 this->playerStatus_[player] = questHintStatus::active;
@@ -121,4 +130,5 @@
             }
         }
+        
         COUT(2) << "A hint of a non-active quest was trying to get activated." << std::endl;
         return false;
@@ -127,11 +137,13 @@
     /**
     @brief
-        Sets the quest the QuestHitn belongs to.
+        Sets the Quest the QuestHint belongs to.
     @param quest
+        The Quest to be set as Quest the QuestHint is attached to.
     @return
+        Returns true if successful.
     */
     bool QuestHint::setQuest(Quest* quest)
     {
-        if(quest == NULL)
+        if(quest == NULL) //!< NULL-Pointer. Again..?
         {
             COUT(2) << "The input Quest* is NULL." << std::endl;
