Index: code/branches/bugger/src/network/NetworkPrereqs.h
===================================================================
--- code/branches/bugger/src/network/NetworkPrereqs.h	(revision 2532)
+++ code/branches/bugger/src/network/NetworkPrereqs.h	(revision 2533)
@@ -61,4 +61,13 @@
 #include "util/Integers.h"
 
+//-----------------------------------------------------------------------
+// Library global contants
+//-----------------------------------------------------------------------
+namespace orxonox
+{
+  static const unsigned int GAMESTATEID_INITIAL = (unsigned int)-1;
+  static const unsigned int CLIENTID_UNKNOWN    = (unsigned int)-2;
+  static const uint32_t     OBJECTID_UNKNOWN    = (uint32_t)(-1);
+}
 
 //-----------------------------------------------------------------------
@@ -67,15 +76,4 @@
 namespace orxonox
 {
-
-// Constants definition
-
-  static const unsigned int GAMESTATEID_INITIAL = (unsigned int)-1;
-  static const unsigned int CLIENTID_UNKNOWN = (unsigned int)-2;
-  static const uint32_t OBJECTID_UNKNOWN = static_cast<uint32_t>(-1);
-  static const unsigned int SCHED_PRIORITY_OFFSET = -5;
-
-  
-
-  
   class Client;
   class ClientConnection;
@@ -103,5 +101,7 @@
   class obj;
   class objInfo;
-  namespace packet{
+
+  namespace packet
+  {
     class Gamestate;
     class Packet;
Index: code/branches/bugger/src/network/Server.cc
===================================================================
--- code/branches/bugger/src/network/Server.cc	(revision 2532)
+++ code/branches/bugger/src/network/Server.cc	(revision 2533)
@@ -63,6 +63,4 @@
 {
   const unsigned int MAX_FAILURES = 20;
-  const unsigned int NETWORK_FREQUENCY = 25;
-  const float NETWORK_PERIOD = (float)1/NETWORK_FREQUENCY;
 
   /**
Index: code/branches/bugger/src/network/Server.h
===================================================================
--- code/branches/bugger/src/network/Server.h	(revision 2532)
+++ code/branches/bugger/src/network/Server.h	(revision 2533)
@@ -52,4 +52,6 @@
 {
   const int CLIENTID_SERVER = 0;
+  const unsigned int NETWORK_FREQUENCY = 25;
+  const float NETWORK_PERIOD = 1./NETWORK_FREQUENCY;
 
   /**
Index: code/branches/bugger/src/network/TrafficControl.cc
===================================================================
--- code/branches/bugger/src/network/TrafficControl.cc	(revision 2532)
+++ code/branches/bugger/src/network/TrafficControl.cc	(revision 2533)
@@ -36,4 +36,6 @@
 
 namespace orxonox {
+  
+  static const unsigned int SCHED_PRIORITY_OFFSET = -1;
 
   objInfo::objInfo(uint32_t ID, uint32_t creatorID, int32_t curGsID, int32_t diffGsID, uint32_t size, unsigned int prioperm, unsigned int priosched)
@@ -68,9 +70,8 @@
 	TrafficControl::TrafficControl()
 	{
-    RegisterRootObject(TrafficControl);
+    RegisterObject(TrafficControl);
 	  assert(instance_==0);
 	  instance_=this;
-//     targetSize = 2500;//5000bytes
-    SetConfigValue ( targetSize, 28000./25. );
+    this->setConfigValues();
 	}
 	
@@ -79,8 +80,6 @@
 	*/
 	TrafficControl::~TrafficControl()
-	{ 
-	  //was macht das genau? da instance ja gleich this ist im moment
+	{
 	  instance_=0;
-	  //muss ich alles deallozieren was ich im constructor aufgebaut habe?
 	}
 
@@ -89,20 +88,14 @@
 */
 
+  void TrafficControl::setConfigValues()
+  {
+    SetConfigValue ( bActive_, true );
+    SetConfigValue ( targetSize, 5000 );
+  }
+  
   /**
-          *eigener sortieralgorithmus
+  * sort-algorithm for sorting the objectlist after priorities
   */
-//   bool TrafficControl::priodiffer(obj i, obj j)
-//   {
-//     std::map<unsigned int, objInfo>::iterator iti;
-//     std::map<unsigned int, objInfo>::iterator itj;
-//     iti=listToProcess_.find(i.objID);
-//     itj=listToProcess_.find(j.objID);
-//     return iti->second.objValuePerm < itj->second.objValuePerm;
-//   }
-  
-  /**
-  * eigener sortieralgorithmus
-  */
-  bool TrafficControl::priodiffer(uint32_t clientID, obj i, obj j)
+  bool TrafficControl::prioritySort(uint32_t clientID, obj i, obj j)
   {
     assert(clientListPerm_.find(clientID) != clientListPerm_.end());  //make sure the client exists in our list
@@ -112,10 +105,18 @@
     int prio1 = clientListPerm_[clientID][i.objID].objValuePerm + clientListPerm_[clientID][i.objID].objValueSched;
     int prio2 = clientListPerm_[clientID][j.objID].objValuePerm + clientListPerm_[clientID][j.objID].objValueSched;
-//     int prio1 = clientListPerm_[clientID][i.objID].objID;
-//     int prio2 = clientListPerm_[clientID][j.objID].objID;
-    // NOTE: smaller priority is better
     return prio1 < prio2;
   }
 
+  /**
+  * sort-algorithm for sorting the objectList after position in original data stream
+  */
+  bool TrafficControl::dataSort(obj i, obj j)
+  {
+    int pos1 = i.objDataOffset;
+    int pos2 = j.objDataOffset;
+    return pos1 < pos2;
+  }
+
+  
 
 	void TrafficControl::processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj> *list)
@@ -125,7 +126,4 @@
 	  currentGamestateID=gamestateID;
 	  evaluateList(clientID, list);
-	  //list hatte vorher ja vielmehr elemente, nach zuweisung nicht mehr... speicherplatz??
-// 	  *list=copiedVector;
-    //später wird copiedVector ja überschrieben, ist das ein problem für list-dh. für gamestatemanager?
 	  return;
 	}
@@ -169,42 +167,5 @@
 *Definition of private members
 */
-	
-	
-	/**
-	*copyList gets list of Gamestate Manager and turns it to *listToProcess
-	*/
-// 	void TrafficControl::copyList(std::list<obj> *list)
-// 	{
-// 	  std::list<obj>::iterator itvec;
-// 	  for(itvec = (*list).begin(); itvec != (*list).end(); itvec++)
-// 	  {
-// 	    objInfo objectA;
-// 	    objectA.objCreatorID=(*itvec).objCreatorID;
-// 	    objectA.objSize = (*itvec).objSize;
-// 	    listToProcess_.insert(std::pair<currentClientID, map<(*itvec).objID,objectA>>);//unsicher: ob map<...> so richtig ist
-// 	  }
-// 	}
-	/**
-	*updateReferenceList compares the sent list by GSmanager with the current *reference list and updates it.
-	*returns void
-	*/
-// 	void TrafficControl::updateReferenceList(std::map<unsigned int, objInfo> *list)
-// 	{
-// 	  std::map<unsigned int, Synchronisable*>::iterator itref;
-// 	  std::map<unsigned int, objInfo>::iterator itproc;
-// 	  for(itproc=listToProcess_.begin(); itproc != listToProcess_.end(); itproc++)
-// 	  {
-// 	    //itproc->first=objectid that is looked for
-// 	    if(referenceList_->find(itproc->first))
-// 	    {
-// 	      continue;
-// 	    }
-// 	    else
-// 	    {
-// 	      (*referenceList_).insert(pair<unsigned int,          Synchronisable*>((*itproc).first,Synchronisable::getSynchronisable((*itproc).first)));//important: how to get adress of an object!
-// 	      insertinClientListPerm(currentClientID,itproc->first,itproc->second);
-// 	    }
-// 	  }
-// 	}
+
 	/**
 	*updateClientListPerm
@@ -229,13 +190,4 @@
   {
     clientListTemp_[currentClientID][currentGamestateID] = std::list<obj>(*list);
-//     std::list<obj>::iterator itvec;
-//     std::map<unsigned int,std::map<unsigned int, obj> >::iterator ittemp;
-//     std::map<unsigned int, obj>::iterator ittempgs;
-//     ittemp = clientListTemp_.find(currentClientID);
-//     ittempgs = (*ittemp).find(currentGamestateID);
-//     for(itvec = list.begin(); itvec!=list.end(), itvec++)
-//     {
-//       ittempgs.insert(itvec);static
-//     }
   }
 
@@ -252,8 +204,6 @@
     {
       assert( (*itvec).objSize < 1000);
-//       COUT(0) << "==targetsize==  " << targetsize << endl;
       if ( ( size + (*itvec).objSize ) < targetsize )
       {
-//         COUT(0) << "no cut" << endl;
         size += (*itvec).objSize;//objSize is given in bytes
         ++itvec;
@@ -261,9 +211,6 @@
       else
       {
-//         COUT(0) << "cut" << endl;
         clientListPerm_[currentClientID][(*itvec).objID].objValueSched += SCHED_PRIORITY_OFFSET; // NOTE: SCHED_PRIORITY_OFFSET is negative
-//         ittemp = itvec;
         list->erase(itvec++);
-//         itvec = ittemp;
       }
 //       printList(list, currentClientID);
@@ -278,5 +225,4 @@
 	void TrafficControl::evaluateList(unsigned int clientID, std::list<obj> *list)
 	{
-	  //copyList(list);
 	
 	  //now the sorting
@@ -284,11 +230,7 @@
 	  //compare listToProcess vs clientListPerm
     //if listToProcess contains new Objects, add them to clientListPerm
-// 	  std::map<unsigned int, objInfo>::iterator itproc;
     std::list<obj>::iterator itvec;
-// 	  std::map<unsigned int, std::map<unsigned int, objInfo> >::iterator itperm;
-// 	  std::map<unsigned int, objInfo>::iterator itpermobj;
 	  for( itvec=list->begin(); itvec != list->end(); itvec++)
 	  {
-// 	    itperm = clientListPerm_.find(clientID);
 	    if ( clientListPerm_[clientID].find( (*itvec).objID) != clientListPerm_[clientID].end() )
       {
@@ -296,8 +238,4 @@
         //obj bleibt in liste und permanente prio wird berechnet
         clientListPerm_[clientID][(*itvec).objID].objDiffGS = currentGamestateID - clientListPerm_[clientID][(*itvec).objID].objCurGS;
-//         ((*itpermobj).second).objDiffGS = ((*itpermobj).second).objCurGS - currentGamestateID;
-//         permprio = clientListPerm_[clientID][(*itproc).first].objValuePerm;
-//         itpermprio = (permObjPrio_).find((*itproc).first);
-//         ((*itpermobj).second).objValuePerm = ((*itpermobj).second).objDiffGS * (*itpermprio).second;
         continue;//check next objId
       }
@@ -306,64 +244,29 @@
         // insert the object into clientListPerm
         insertinClientListPerm(clientID,*itvec);
-//         itpermobj=(*itperm).find((*itproc).first)
-//         ((*itpermobj).second).objDiffGS = ((*itpermobj).second).objCurGS - currentGamestateID;
-//         itpermprio = (permObjPrio_).find((*itproc).first);
-//         ((*itpermobj).second).objValuePerm = ((*itpermobj).second).objDiffGS * (*itpermprio).second;
         continue;//check next objId
       }
     }
 	  //end compare listToProcess vs clientListPerm
-	
-    //listToProc vs clientListTemp
-    //TODO: uncomment it again and change some things
-    /*
-    std::map<unsigned int, std::map<unsigned int, unsigned int> >::iterator ittemp;
-    std::map<unsigned int, unsigned int>::iterator ittempgs;
-    for( itproc=listToProcess_.begin(); itproc != listToProcess_.end();itproc++)
+    
+    if( bActive_ )
     {
-      ittemp = clientListTemp_->find(currentClientID);
-      if( ittempgs = (*ittemp).find(currentGamestateID))
-      {
-        if((*itproc).first == (*ittempgs).find((*itproc).first))//ja, dann ist objekt schon in der zu sendenden liste-muss nicht nochmal gesendet werden
-        {
-          (listToProcess_).erase (itproc);
-        }
-        else
-          continue;
-      }
-      else
-        continue;
-    }*/
-    //end listToProc vs clientListTemp
-    
-    //TODO: check whether we need this, cause i don't think so.
-    //listToProcess contains obj to send now, and since we give gsmanager the copiedlist and not listToProcess shorten copiedlist therefor too.
-    /*std::list<obj>::iterator itvec;
-    for(itvec = copiedVector.begin(); itvec != copiedVector.end(); itvec++)
-    {
-      if ( listToProcess_.find(itvec->objID) )
-      {
-        continue;//therefore object wasnt thrown out yet and has to be sent back to gsmanager
-      }
-      else
-      {
-        copiedVector.remove(itvec);
-      }
-    }*/
-    //sort copied list aufgrund der objprioperm in clientlistperm
-    // use boost bind here because we need to pass a memberfunction to stl sort
-    list->sort(boost::bind(&TrafficControl::priodiffer, this, clientID, _1, _2) );
-    
-    //now we check, that the creator of an object always exists on a client
-//     printList(list, clientID);
-    std::list<obj>::iterator itcreator;
-    for(itvec = list->begin(); itvec != list->end(); itvec++)
-    { 
-      fixCreatorDependencies(itvec, list, clientID);
+      //sort copied list according to priorities
+      // use boost bind here because we need to pass a memberfunction to stl sort
+      list->sort(boost::bind(&TrafficControl::prioritySort, this, clientID, _1, _2) );
+      
+      //now we check, that the creator of an object always exists on a client
+      std::list<obj>::iterator itcreator;
+      for(itvec = list->begin(); itvec != list->end(); itvec++)
+      { 
+        fixCreatorDependencies(itvec, list, clientID);
+      }
+      //end of sorting
+      //now the cutting, work the same obj out in processobjectlist and copiedlist, compression rate muss noch festgelegt werden. 
+//       printList(list, clientID);
+      cut(list, targetSize);
+      
+      //now sort again after objDataOffset
+      list->sort(boost::bind(&TrafficControl::dataSort, this, _1, _2) );
     }
-    //end of sorting
-    //now the cutting, work the same obj out in processobjectlist and copiedlist, compression rate muss noch festgelegt werden. 
-    cut(list, targetSize);
-//     printList(list, clientID);
     //diese Funktion updateClientList muss noch gemacht werden
     updateClientListTemp(list);
@@ -398,14 +301,12 @@
     }
   }
-
-
-/*
-void bvlabla(list *a){
-//sort a
-list *cache;
-cache = new list<unsigned int>(*a);
-return a;
-}
-*/
+  
+  void TrafficControl::clientDisconnected(unsigned int clientID)
+  {
+    assert(clientListTemp_.find(clientID) != clientListTemp_.end() );
+    assert(clientListPerm_.find(clientID) != clientListPerm_.end() );
+    clientListTemp_.erase(clientListTemp_.find(clientID));
+    clientListPerm_.erase(clientListPerm_.find(clientID));
+  }
 
 
Index: code/branches/bugger/src/network/TrafficControl.h
===================================================================
--- code/branches/bugger/src/network/TrafficControl.h	(revision 2532)
+++ code/branches/bugger/src/network/TrafficControl.h	(revision 2533)
@@ -38,4 +38,5 @@
 #include "util/Integers.h"
 #include "core/OrxonoxClass.h"
+#include "network/ClientConnectionListener.h"
 
 namespace orxonox {
@@ -79,5 +80,5 @@
 *
 */
-class TrafficControl : public OrxonoxClass{
+class TrafficControl : public ClientConnectionListener {
   private:
 
@@ -122,4 +123,5 @@
     unsigned int currentClientID;
     unsigned int targetSize;
+    bool         bActive_;
     /**
     *copiedVector is a copy of the given Vector by the GSmanager, on this list all manipulations are performed
@@ -141,5 +143,10 @@
     void evaluateList(unsigned int clientID, std::list<obj> *list);//done    
     void ack(unsigned int clientID, unsigned int gamestateID);  // this function gets called when the server receives an ack from the client
+    
+    //ClientConnectionListener functions
+    virtual void clientConnected(unsigned int clientID){};
+    virtual void clientDisconnected(unsigned int clientID);
 
+ 
   protected:
     static TrafficControl *instance_;
@@ -154,4 +161,5 @@
     *Elements of struct i are therefore: *list[i].objID
     */
+    void setConfigValues();
     static TrafficControl *getInstance();
     void processObjectList(unsigned int clientID, unsigned int gamestateID, std::list<obj>* list); //gets a pointer to the list (containing objectIDs) and sorts it
@@ -162,5 +170,6 @@
     void deleteObject(unsigned int objectID);				// this function gets called when an object has been deleted (in order to clean up lists and maps)
     
-    bool priodiffer(uint32_t clientID, obj i, obj j);
+    bool prioritySort(uint32_t clientID, obj i, obj j);
+    bool dataSort(obj i, obj j);
     void printList(std::list<obj> *list, unsigned int clientID);
     void fixCreatorDependencies(std::list<obj>::iterator it, std::list<obj> *list, unsigned int clientID);
Index: code/branches/bugger/src/network/packet/Gamestate.cc
===================================================================
--- code/branches/bugger/src/network/packet/Gamestate.cc	(revision 2532)
+++ code/branches/bugger/src/network/packet/Gamestate.cc	(revision 2533)
@@ -349,5 +349,5 @@
   Gamestate *gs = new Gamestate(gdata);
   uint8_t *newdata = gdata + sizeof(GamestateHeader);
-//   uint8_t *origdata = GAMESTATE_START(data_);
+  uint8_t *origdata = GAMESTATE_START(data_);
 
   //copy the GamestateHeader
@@ -357,5 +357,6 @@
   uint32_t objectOffset;
   unsigned int objectsize, destsize=0;
-  Synchronisable *object;
+  // TODO: Why is this variable not used?
+  //Synchronisable *object;
 
   //call TrafficControl
@@ -366,24 +367,26 @@
     if((*it).objSize==0)
       continue;
-    oldobjectheader = (synchronisableHeader*)(data_ + (*it).objDataOffset);
+    oldobjectheader = (synchronisableHeader*)origdata;
     newobjectheader = (synchronisableHeader*)newdata;
-    object = Synchronisable::getSynchronisable( (*it).objID );
-    assert(object->objectID == oldobjectheader->objectID);
+//     object = Synchronisable::getSynchronisable( (*it).objID );
+//     assert(object->objectID == oldobjectheader->objectID);
     objectsize = oldobjectheader->size;
-    *newobjectheader = *oldobjectheader;
     objectOffset=sizeof(synchronisableHeader); //skip the size and the availableData variables in the objectheader
-    if ( /*object->doSelection(HEADER->id)*/true ){
+    if ( (*it).objID == oldobjectheader->objectID ){
+      memcpy(newdata, origdata, objectsize);
       assert(newobjectheader->dataAvailable==true);
-      memcpy(newdata+objectOffset, data_ + (*it).objDataOffset + objectOffset, objectsize-objectOffset);
+      ++it;
     }else{
+      *newobjectheader = *oldobjectheader;
       newobjectheader->dataAvailable=false;
       memset(newdata+objectOffset, 0, objectsize-objectOffset);
-      assert(objectOffset==objectsize);
     }
     newdata += objectsize;
+    origdata += objectsize;
     destsize += objectsize;
 //     origdata += objectsize;
   }
   ((GamestateHeader*)gdata)->datasize = destsize;
+  assert(destsize==HEADER->datasize);
   assert(destsize!=0);
   return gs;
Index: code/branches/bugger/src/network/synchronisable/Synchronisable.cc
===================================================================
--- code/branches/bugger/src/network/synchronisable/Synchronisable.cc	(revision 2532)
+++ code/branches/bugger/src/network/synchronisable/Synchronisable.cc	(revision 2533)
@@ -66,5 +66,4 @@
     RegisterRootObject(Synchronisable);
     static uint32_t idCounter=0;
-    objectFrequency_=1;
     objectMode_=0x1; // by default do not send data to server
     if ( !Host::running() || ( Host::running() && Host::isServer() ) )
@@ -78,16 +77,20 @@
     classID = static_cast<uint32_t>(-1);
 
-
-//#ifndef NDEBUG
-//    ObjectList<Synchronisable>::iterator it;
-//    for(it = ObjectList<Synchronisable>::begin(); it!=ObjectList<Synchronisable>::end(); ++it){
-//        if(!(*it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0)))
-//        {
-//            COUT(1) << "Assertion failed: *it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0)" << std::endl;
-//            COUT(1) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << std::endl;
-//            abort();
-//        }
-//    }
-//#endif
+    // set standard priority
+    this->setPriority( priority::normal );
+
+    
+    // get creator id
+#ifndef NDEBUG
+    ObjectList<Synchronisable>::iterator it;
+    for(it = ObjectList<Synchronisable>::begin(); it!=ObjectList<Synchronisable>::end(); ++it){
+      if( it->getObjectID()==this->objectID )
+        if(!(*it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0))){
+          COUT(1) << "Assertion failed: *it==this || (it->objectID==OBJECTID_UNKNOWN && it->objectMode_==0x0)" << std::endl;
+          COUT(1) << "Possible reason for this error: Client created a synchronized object without the Server's approval." << std::endl;
+          abort();
+        }
+    }
+#endif
 
     this->creatorID = OBJECTID_UNKNOWN;
@@ -177,4 +180,5 @@
       {
         mem += header->size; //.TODO: this suckz.... remove size from header
+        assert(0);
         return 0;
       }
@@ -360,4 +364,5 @@
     //assert( (mode ^ objectMode_) != 0);
     if(syncList.empty()){
+      assert(0);
       COUT(4) << "Synchronisable::updateData syncList is empty" << std::endl;
       return false;
Index: code/branches/bugger/src/network/synchronisable/Synchronisable.h
===================================================================
--- code/branches/bugger/src/network/synchronisable/Synchronisable.h	(revision 2532)
+++ code/branches/bugger/src/network/synchronisable/Synchronisable.h	(revision 2533)
@@ -61,4 +61,14 @@
     };
   }
+  
+  namespace priority{
+    enum prio{
+      very_high   = -100,
+      high        = -15,
+      normal      = 0,
+      low         = 15,
+      very_low    = 100
+    };
+  }
 
   struct _NetworkExport synchronisableHeader{
@@ -101,5 +111,5 @@
     template <class T> void unregisterVariable(T& var);
     void setObjectMode(uint8_t mode);
-    void setObjectPriority(unsigned int freq){ objectFrequency_ = freq; }
+    void setPriority(unsigned int freq){ objectFrequency_ = freq; }
 
 
Index: code/branches/bugger/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- code/branches/bugger/src/orxonox/OrxonoxPrereqs.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/OrxonoxPrereqs.h	(revision 2533)
@@ -103,4 +103,5 @@
     class QuestHint;
     class QuestItem;
+    class QuestListener;
     class QuestManager;
     class Rewardable;
@@ -186,4 +187,7 @@
     class HUDHealthBar;
     class InGameConsole;
+    class Notification;
+    class NotificationManager;
+    class NotificationQueue;
     class OrxonoxOverlay;
     class OverlayGroup;
Index: code/branches/bugger/src/orxonox/gamestates/GSDedicated.cc
===================================================================
--- code/branches/bugger/src/orxonox/gamestates/GSDedicated.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/gamestates/GSDedicated.cc	(revision 2533)
@@ -38,4 +38,5 @@
 #include "network/Server.h"
 #include "objects/Tickable.h"
+#include "util/Sleep.h"
 
 const unsigned int  DEFAULT_DEDICATED_SERVER_TICKRATE = 25;
Index: code/branches/bugger/src/orxonox/objects/quest/AddQuest.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/AddQuest.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/AddQuest.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file AddQuest.cc
-    @brief
-    Implementation of the AddQuest class.
+    @file
+    @brief Implementation of the AddQuest class.
 */
 
@@ -45,6 +44,6 @@
 #include "Quest.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(AddQuest);
 
@@ -109,5 +108,5 @@
         }
 
-        COUT(3) << "Quest {" << this->getQuestId() << "} successfully added to player." << std::endl;
+        COUT(3) << "Quest {" << this->getQuestId() << "} successfully added to player: " << player << " ." << std::endl;
         return true;
     }
Index: code/branches/bugger/src/orxonox/objects/quest/AddQuest.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/AddQuest.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/AddQuest.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file AddQuest.h
-    @brief
-    Definition of the AddQuest class.
+    @file
+    @brief Definition of the AddQuest class.
 */
 
@@ -43,6 +42,6 @@
 #include "ChangeQuestStatus.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -58,10 +57,10 @@
     {
         public:
-            AddQuest(BaseObject* creator);
-            virtual ~AddQuest();
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddQuest object through XML.
-
-            virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
+        AddQuest(BaseObject* creator);
+        virtual ~AddQuest();
+    
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a AddQuest object through XML.
+    
+        virtual bool invoke(PlayerInfo* player); //!< Invokes the QuestEffect.
 
     };
Index: code/branches/bugger/src/orxonox/objects/quest/AddQuestHint.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/AddQuestHint.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/AddQuestHint.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file AddQuestHint.cc
-    @brief
-    Implementation of the AddQuestHint class.
+    @file
+    @brief Implementation of the AddQuestHint class.
 */
 
@@ -44,6 +43,6 @@
 #include "QuestHint.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(AddQuestHint);
 
@@ -130,5 +129,5 @@
         }
 
-        COUT(3) << "QuestHint {" << this->getHintId() << "} successfully added to player." << std::endl;
+        COUT(3) << "QuestHint {" << this->getHintId() << "} successfully added to player: " << player << " ." << std::endl;
         return true;
 
Index: code/branches/bugger/src/orxonox/objects/quest/AddQuestHint.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/AddQuestHint.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/AddQuestHint.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file AddQuestHint.h
-    @brief
-    Definition of the AddQuestHint class.
+    @file
+    @brief Definition of the AddQuestHint class.
 */
 
@@ -42,6 +41,6 @@
 #include "QuestEffect.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -73,4 +72,5 @@
             inline const std::string & getHintId(void) const
                 { return this->hintId_; }
+            
             bool setHintId(const std::string & id); //!< Sets the id of the QuestHint.
 
Index: code/branches/bugger/src/orxonox/objects/quest/AddReward.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/AddReward.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/AddReward.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file AddReward.cc
-    @brief
-    Implementation of the AddReward class.
+    @file
+    @brief Implementation of the AddReward class.
 */
 
@@ -41,6 +40,6 @@
 #include "Rewardable.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(AddReward);
 
@@ -106,4 +105,6 @@
     bool AddReward::invoke(PlayerInfo* player)
     {
+        COUT(3) << "AddReward on player: " << player << " ." << std::endl;
+        
         bool check = true;
         for ( std::list<Rewardable*>::iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward )
@@ -111,4 +112,6 @@
             check = check && (*reward)->reward(player);
         }
+        
+        COUT(3) << "Rewardable successfully added to player." << player << " ." << std::endl;
 
         return check;
Index: code/branches/bugger/src/orxonox/objects/quest/AddReward.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/AddReward.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/AddReward.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file AddReward.h
-    @brief
-    Definition of the AddReward class.
+    @file
+    @brief Definition of the AddReward class.
 */
 
@@ -43,6 +42,6 @@
 #include "QuestEffect.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -78,4 +77,5 @@
             inline void addRewardable(Rewardable* reward)
                 { this->rewards_.push_back(reward); }
+        
             const Rewardable* getRewardables(unsigned int index) const; //!< Returns the Rewardable object at the given index.
 
Index: code/branches/bugger/src/orxonox/objects/quest/CMakeLists.txt
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/CMakeLists.txt	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/CMakeLists.txt	(revision 2533)
@@ -14,4 +14,5 @@
   QuestHint.cc
   QuestItem.cc
+  QuestListener.cc
   QuestManager.cc
   Rewardable.cc
Index: code/branches/bugger/src/orxonox/objects/quest/ChangeQuestStatus.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/ChangeQuestStatus.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/ChangeQuestStatus.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file ChangeQuestStatus.cc
-    @brief
-    Implementation of the ChangeQuestStatus class.
+    @file
+    @brief Implementation of the ChangeQuestStatus class.
 */
 
@@ -40,6 +39,6 @@
 #include "QuestItem.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
Index: code/branches/bugger/src/orxonox/objects/quest/ChangeQuestStatus.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/ChangeQuestStatus.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/ChangeQuestStatus.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file ChangeQuestStatus.h
-    @brief
-    Definition of the ChangeQuestStatus class.
+    @file
+    @brief Definition of the ChangeQuestStatus class.
 */
 
@@ -43,6 +42,6 @@
 #include "QuestEffect.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -63,6 +62,6 @@
         protected:
             /**
-                @brief Returns the id of the Quest.
-                @return Returns the id of the Quest.
+            @brief Returns the id of the Quest.
+            @return Returns the id of the Quest.
             */
             inline const std::string & getQuestId(void) const
Index: code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.cc	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file CompleteQuest.cc
-    @brief
-    Implementation of the CompleteQuest class.
+    @file
+    @brief Implementation of the CompleteQuest class.
 */
 
@@ -43,6 +42,6 @@
 #include "Quest.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(CompleteQuest);
 
Index: code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file CompleteQuest.h
-    @brief
-    Definition of the CompleteQuest class.
+    @file
+    @brief Definition of the CompleteQuest class.
 */
 
@@ -43,6 +42,6 @@
 #include "ChangeQuestStatus.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
Index: code/branches/bugger/src/orxonox/objects/quest/FailQuest.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/FailQuest.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/FailQuest.cc	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file FailQuest.cc
-    @brief
-    Implementation of the FailQuest class.
+    @file
+    @brief Implementation of the FailQuest class.
 */
 
@@ -43,6 +42,6 @@
 #include "Quest.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(FailQuest);
 
Index: code/branches/bugger/src/orxonox/objects/quest/FailQuest.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/FailQuest.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/FailQuest.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file FailQuest.h
-    @brief
-    Definition of the FailQuest class.
+    @file
+    @brief Definition of the FailQuest class.
 */
 
@@ -43,6 +42,6 @@
 #include "ChangeQuestStatus.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
Index: code/branches/bugger/src/orxonox/objects/quest/GlobalQuest.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/GlobalQuest.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/GlobalQuest.cc	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file GlobalQuest.cc
-    @brief
-    Implementation of the GlobalQuest class.
+    @file
+    @brief Implementation of the GlobalQuest class.
 */
 
@@ -38,10 +37,11 @@
 #include "orxonox/objects/infos/PlayerInfo.h"
 #include "core/CoreIncludes.h"
+#include "core/Super.h"
 #include "util/Exception.h"
 
 #include "QuestEffect.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(GlobalQuest);
 
@@ -88,19 +88,19 @@
     bool GlobalQuest::fail(PlayerInfo* player)
     {
-        if(this->isFailable(player)) //!< Check whether the Quest can be failed.
-        {
-            this->setStatus(player, questStatus::failed);
-            
-            //! Iterate through all players possessing this Quest.
-            for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
-            {
-                QuestEffect::invokeEffects(*it, this->getFailEffectList());
-            }
-
-            return true;
-        }
-        
-        COUT(4) << "A non-completable quest was trying to be failed." << std::endl;
-        return false;
+        if(!this->isFailable(player)) //!< Check whether the Quest can be failed.
+        {
+            COUT(4) << "A non-completable quest was trying to be failed." << std::endl;
+            return false;
+        }
+        
+        Quest::fail(player);
+    
+    //! Iterate through all players possessing this Quest.
+    for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
+    {
+        QuestEffect::invokeEffects(*it, this->getFailEffectList());
+    }
+
+    return true;
     }
 
@@ -117,20 +117,20 @@
     bool GlobalQuest::complete(PlayerInfo* player)
     {
-        if(this->isCompletable(player)) //!< Check whether the Quest can be completed.
-        {
-            this->setStatus(player, questStatus::completed);
-            
-            //! Iterate through all players possessing the Quest.
-            for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
-            {
-                QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
-            }
-            
-            QuestEffect::invokeEffects(player, this->rewards_); //!< Invoke reward QuestEffects on the player completing the Quest.
-            return true;
-        }
-        
-        COUT(4) << "A non-completable quest was trying to be completed." << std::endl;
-        return false;
+        if(!this->isCompletable(player)) //!< Check whether the Quest can be completed.
+        {
+            COUT(4) << "A non-completable quest was trying to be completed." << std::endl;
+            return false;
+        }
+        
+        //! Iterate through all players possessing the Quest.
+        for(std::set<PlayerInfo*>::const_iterator it = players_.begin(); it != players_.end(); it++)
+        {
+            QuestEffect::invokeEffects(*it, this->getCompleteEffectList());
+        }
+    
+        Quest::complete(player);
+    
+        QuestEffect::invokeEffects(player, this->rewards_); //!< Invoke reward QuestEffects on the player completing the Quest.
+        return true;
     }
 
@@ -207,5 +207,5 @@
         }
 
-    return questStatus::inactive;
+        return questStatus::inactive;
     }
 
Index: code/branches/bugger/src/orxonox/objects/quest/GlobalQuest.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/GlobalQuest.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/GlobalQuest.h	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file GlobalQuest.h
-    @brief
-    Definition of the GlobalQuest class.
+    @file
+    @brief Definition of the GlobalQuest class.
 */
 
@@ -44,6 +43,6 @@
 #include "Quest.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -56,13 +55,13 @@
             <QuestDescription title="Title" description="Description." /> //The description of the quest.
             <subquests>
-        <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well.
-        ...
-        <Quest id="questIdn" />
-        </subquests>
-        <hints>
-        <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those.
-        ...
-        <QuestHint id="hintIdn" />
-        </hints>
+                <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well.
+                ...
+                <Quest id="questIdn" />
+            </subquests>
+            <hints>
+                <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those.
+                ...
+                <QuestHint id="hintIdn" />
+            </hints>
             <fail-effects>
                 <QuestEffect /> //A list of QuestEffects, invoked on all players possessing this quest, when the Quest is failed, see QuestEffect for the full XML representation.
Index: code/branches/bugger/src/orxonox/objects/quest/LocalQuest.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/LocalQuest.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/LocalQuest.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file LocalQuest.cc
-    @brief
-    Implementation of the LocalQuest class.
+    @file
+    @brief Implementation of the LocalQuest class.
 */
 
@@ -37,4 +36,5 @@
 
 #include "core/CoreIncludes.h"
+#include "core/Super.h"
 #include "util/Exception.h"
 
@@ -42,6 +42,6 @@
 #include "QuestEffect.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(LocalQuest);
 
@@ -86,13 +86,14 @@
     bool LocalQuest::fail(PlayerInfo* player)
     {
-        if(this->isFailable(player)) //!< Checks whether the quest can be failed.
-        {
-            this->setStatus(player, questStatus::failed);
-            QuestEffect::invokeEffects(player, this->getFailEffectList()); //!< Invoke the failEffects.
-            return true;
-        }
-        
-        COUT(4) << "A non-failable quest was trying to be failed." << std::endl;
-        return false;
+        if(!this->isFailable(player)) //!< Checks whether the quest can be failed.
+        {
+            COUT(4) << "A non-failable quest was trying to be failed." << std::endl;
+            return false;
+        }
+        
+        Quest::fail(player);
+        
+        QuestEffect::invokeEffects(player, this->getFailEffectList()); //!< Invoke the failEffects.
+        return true;
     }
 
@@ -108,13 +109,14 @@
     bool LocalQuest::complete(PlayerInfo* player)
     {
-        if(this->isCompletable(player)) //!< Checks whether the Quest can be completed.
-        {
-            this->setStatus(player, questStatus::completed);
-            QuestEffect::invokeEffects(player, this->getCompleteEffectList()); //!< Invoke the complete QuestEffects.
-            return true;
-        }
-        
-        COUT(4) << "A non-completable quest was trying to be completed." << std::endl;
-        return false;
+        if(!this->isCompletable(player)) //!< Checks whether the Quest can be completed.
+        {
+            COUT(4) << "A non-completable quest was trying to be completed." << std::endl;
+            return false;
+        }
+        
+        Quest::complete(player);
+        
+        QuestEffect::invokeEffects(player, this->getCompleteEffectList()); //!< Invoke the complete QuestEffects.
+        return true;
     }
 
Index: code/branches/bugger/src/orxonox/objects/quest/LocalQuest.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/LocalQuest.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/LocalQuest.h	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file LocalQuest.h
-    @brief
-    Definition of the LocalQuest class.
+    @file
+    @brief Definition of the LocalQuest class.
 */
 
@@ -44,6 +43,6 @@
 #include "Quest.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -56,13 +55,13 @@
             <QuestDescription title="Title" description="Description." /> //The description of the quest.
             <subquests>
-        <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well.
-        ...
-        <Quest id="questIdn" />
-        </subquests>
-        <hints>
-        <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those.
-        ...
-        <QuestHint id="hintIdn" />
-        </hints>
+                <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well.
+                ...
+                <Quest id="questIdn" />
+                </subquests>
+                <hints>
+                <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those.
+                ...
+                <QuestHint id="hintIdn" />
+                </hints>
             <fail-effects>
                 <QuestEffect /> //A list of QuestEffects, invoked when the Quest is failed, see QuestEffect for the full XML representation.
Index: code/branches/bugger/src/orxonox/objects/quest/Quest.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/Quest.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/Quest.cc	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file Quest.cc
-    @brief
-    Implementation of the Quest class.
+    @file
+    @brief Implementation of the Quest class.
 */
 
@@ -43,7 +42,8 @@
 #include "QuestHint.h"
 #include "QuestEffect.h"
-
-namespace orxonox {
-
+#include "QuestListener.h"
+
+namespace orxonox
+{
     /**
     @brief
@@ -363,4 +363,42 @@
         return this->getStatus(player) == questStatus::completed;
     }
+    
+    /**
+    @brief
+        Fails the Quest for an input player.
+    @param player
+        The player.
+    @return
+        Returns true if the Quest could be failed, false if not.
+    */
+    bool Quest::fail(PlayerInfo* player)
+    {
+        QuestListener::advertiseStatusChange(this->listeners_, "fail"); //!< Tells the QuestListeners, that the status has changed to failed.
+        this->setStatus(player, questStatus::failed);
+        
+        COUT(4) << "Quest {" << this->getId() << "} is failed for player: " << player << " ." <<std::endl;
+        
+        this->getDescription()->sendFailQuestNotification();
+        return true;
+    }
+    
+    /**
+    @brief
+        Completes the Quest for an input player.
+    @param player
+        The player.
+    @return
+        Returns true if the Quest could be completed, false if not.
+    */
+    bool Quest::complete(PlayerInfo* player)
+    {
+        QuestListener::advertiseStatusChange(this->listeners_, "complete"); //!< Tells the QuestListeners, that the status has changed to completed.
+        this->setStatus(player, questStatus::completed);
+        
+        COUT(4) << "Quest {" << this->getId() << "} is completed for player: " << player << " ." <<std::endl;
+        
+        this->getDescription()->sendCompleteQuestNotification();
+        return true;
+    }
 
     /**
@@ -374,12 +412,38 @@
     bool Quest::start(PlayerInfo* player)
     {
-        if(this->isStartable(player)) //!< Checks whether the quest can be started.
-        {
-            this->setStatus(player, questStatus::active);
-            return true;
-        }
-        
-        COUT(4) << "A non-startable quest was trying to be started." << std::endl;
-        return false;
+        if(!this->isStartable(player)) //!< Checks whether the quest can be started.
+        {
+            COUT(4) << "A non-startable quest was trying to be started." << std::endl;
+            return false;
+        }
+        
+        COUT(4) << "Quest {" << this->getId() << "} is started for player: " << player << " ." <<std::endl;
+        
+        QuestListener::advertiseStatusChange(this->listeners_, "start"); //!< Tells the QuestListeners, that the status has changed to active.
+        
+        this->setStatus(player, questStatus::active);
+        
+        this->getDescription()->sendAddQuestNotification();
+        return true;
+    }
+    
+    /**
+    @brief
+        Adds a QuestListener to the list of QuestListeners listening to this Quest.
+    @param listener
+        The QuestListener to be added.
+    @return
+        Returns true if successful, false if not.
+    */
+    bool Quest::addListener(QuestListener* listener)
+    {
+        if(listener == NULL)
+        {
+            COUT(2) << "A NULL-QuestListener was trying to be added to a Quests listeners." << std::endl;
+            return false;
+        }
+        
+        this->listeners_.push_back(listener);
+        return true;
     }
 
Index: code/branches/bugger/src/orxonox/objects/quest/Quest.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/Quest.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/Quest.h	(revision 2533)
@@ -28,9 +28,7 @@
  
 /**
-    @file Quest.h
-    @brief
-    Definition of the Quest class.
-    
-    The Quest is the parent class of LocalQuest and GlobalQuest.
+    @file
+    @brief Definition of the Quest class.
+        The Quest is the parent class of LocalQuest and GlobalQuest.
 */
  
@@ -47,19 +45,19 @@
 #include "QuestItem.h"
 
-namespace questStatus
+namespace orxonox
 {
+    namespace questStatus
+    {
 
-    //!Different states of a Quest.
-    enum Enum
-    {
-        inactive,
-        active,
-        failed,
-        completed
-    };
+        //!Different states of a Quest.
+        enum Enum
+        {
+            inactive,
+            active,
+            failed,
+            completed
+        };
 
-}
-
-namespace orxonox {
+    }
 
     /**
@@ -90,26 +88,28 @@
                 { return this->parentQuest_; }
                 
-	    /**
-	    @brief Returns the list of subquests.
-	    @return Returns a reference to the list of subquests of the quest.
-	    */
-	    inline const std::list<Quest*> & getSubQuestList(void) const
-		{ return this->subQuests_; }
-		    
-	    /**
-	    @brief Returns the list of all QuestHints of this Quest.
-	    @return Returns a reference to the list of QuestHints of the Quest.
-	    */
-	    inline const std::list<QuestHint*> & getHintsList(void) const
-		{ return this->hints_; }
-	    
-	    bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
-	    bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'.
-	    bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
-	    bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
-	    
-	    bool start(PlayerInfo* player); //!< Sets a Quest to active.
-	    virtual bool fail(PlayerInfo* player) = 0; //!< Fails the Quest.
-	    virtual bool complete(PlayerInfo* player) = 0; //!< Completes the Quest.
+            /**
+            @brief Returns the list of subquests.
+            @return Returns a reference to the list of subquests of the quest.
+            */
+            inline const std::list<Quest*> & getSubQuestList(void) const
+                { return this->subQuests_; }
+
+            /**
+            @brief Returns the list of all QuestHints of this Quest.
+            @return Returns a reference to the list of QuestHints of the Quest.
+            */
+            inline const std::list<QuestHint*> & getHintsList(void) const
+                { return this->hints_; }
+        
+            bool isInactive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'inactive'.
+            bool isActive(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'active'.
+            bool isFailed(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'failed'.
+            bool isCompleted(const PlayerInfo* player) const; //!< Returns true if the quest status for the specific player is 'completed'.
+        
+            bool start(PlayerInfo* player); //!< Sets a Quest to active.
+            virtual bool fail(PlayerInfo* player); //!< Fails the Quest.
+            virtual bool complete(PlayerInfo* player); //!< Completes the Quest.
+        
+            bool addListener(QuestListener* listener); //!< Adds a QuestListener to the list of QuestListeners listening to this Quest.
 
         protected:
@@ -131,9 +131,9 @@
                 { return this->failEffects_; }
                 
-	    /**
-	    @brief Returns the list of complete QuestEffects.
-	    @return Returns a reference to the list of complete QuestEffects.
-	    */
-	    inline std::list<QuestEffect*> & getCompleteEffectList(void)
+            /**
+            @brief Returns the list of complete QuestEffects.
+            @return Returns a reference to the list of complete QuestEffects.
+            */
+            inline std::list<QuestEffect*> & getCompleteEffectList(void)
                 { return this->completeEffects_; }
 
@@ -141,5 +141,5 @@
             virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
             
-    private:
+        private:
             Quest* parentQuest_; //!< Pointer to the parentquest.
             std::list<Quest*> subQuests_; //!< List of all the subquests.
@@ -149,4 +149,6 @@
             std::list<QuestEffect*> failEffects_; //!< A list of all QuestEffects to be invoked, when the Quest has been failed.
             std::list<QuestEffect*> completeEffects_; //!< A list of QuestEffects to be invoked, when the Quest has been completed.
+            
+            std::list<QuestListener*> listeners_; //!< A list of QuestListeners, that listen to what exactly happens with this Quest.
             
             bool setParentQuest(Quest* quest); //!< Sets the parentquest of the Quest.
Index: code/branches/bugger/src/orxonox/objects/quest/QuestDescription.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestDescription.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestDescription.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file QuestDescription.cc
-    @brief
-    Implementation of the QuestDescription class.
+    @file
+    @brief Implementation of the QuestDescription class.
 */
 
@@ -38,7 +37,8 @@
 
 #include "core/CoreIncludes.h"
+#include "orxonox/overlays/notifications/Notification.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(QuestDescription);
 
@@ -74,6 +74,61 @@
         XMLPortParam(QuestDescription, "title", setTitle, getTitle, xmlelement, mode);
         XMLPortParam(QuestDescription, "description", setDescription, getDescription, xmlelement, mode);
+        XMLPortParam(QuestDescription, "failMessage", setFailMessage, getFailMessage, xmlelement, mode);
+        XMLPortParam(QuestDescription, "completeMessage", setCompleteMessage, getCompleteMessage, xmlelement, mode);
 
         COUT(3) << "New QuestDescription with title '" << this->getTitle() << "' created." << std::endl;
+    }
+    
+    /**
+    @brief
+        This method is a helper for sending QuestDescriptions as Notifications.
+    @param item
+        The item the QuestDescription is for.
+    @param status
+        The status the QuestDescription us for.
+    @return
+        Returns true if successful.
+    */
+    bool QuestDescription::notificationHelper(const std::string & item, const std::string & status) const
+    {
+        std::string message = "";
+        std::string title = "";
+        if(item == "hint")
+        {
+            title = "You received a hint: '" + this->title_ + "'";
+            message = this->description_;
+        }
+        else if(item == "quest")
+        {
+            if(status == "start")
+            {
+                title = "You received a new quest: '" + this->title_ + "'";
+                message = this->description_;
+            }
+            else if(status == "fail")
+            {
+                title = "You failed the quest: '" + this->title_ + "'";
+                message = this->failMessage_;
+            }
+            else if(status == "complete")
+            {
+                title = "You successfully completed the quest: '" + this->title_ + "'";
+                message = this->completeMessage_;
+            }
+            else
+            {
+                COUT(2) << "Bad input in notificationHelper, this should not be happening!" << std::endl;
+                return false;
+            }
+        }
+        else
+        {
+            COUT(2) << "Bad input in notificationHelper, this should not be happening!" << std::endl;
+            return false;
+        }
+        
+        Notification* notification = new Notification(0, message, title, 30);
+        notification->send();
+        return true;
     }
 
Index: code/branches/bugger/src/orxonox/objects/quest/QuestDescription.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestDescription.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestDescription.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file QuestDescription.h
-    @brief
-    Definition of the QuestDescription class.
+    @file
+    @brief Definition of the QuestDescription class.
 */
 
@@ -43,6 +42,6 @@
 #include "core/XMLPort.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -52,10 +51,10 @@
         Creating a QuestDescription through XML goes as follows:
         
-        <QuestDescription title="Title" description="Description Text" />
+        <QuestDescription title="Title" description="Description Text" failMessage="You fail." completeMessage="You win!" />
     @author
         Damian 'Mozork' Frick
     */
-    class _OrxonoxExport QuestDescription : public BaseObject {
-
+    class _OrxonoxExport QuestDescription : public BaseObject
+    {
         public:
             QuestDescription(BaseObject* creator);
@@ -64,21 +63,67 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestDescription object through XML.
 
-        /**
-        @brief Returns the title.
-        @return Returns a string containing the title of the QuestDescription.
-        */
+            /**
+            @brief Returns the title.
+            @return Returns a string containing the title of the QuestDescription.
+            */
             inline const std::string & getTitle(void) const
                 { return this->title_; }
         
-        /**
-        @brief Returns the description text.
-        @return Returns a string containing the description text of the QuestDescription.
-        */
+            /**
+            @brief Returns the description text.
+            @return Returns a string containing the description text of the QuestDescription.
+            */
             inline const std::string & getDescription(void) const
                 { return this->description_; }
+        
+            /**
+            @brief Returns the fail message.
+            @return Returns a string containing the fail message of the QuestDescription.
+            */
+            inline const std::string & getFailMessage(void) const
+                { return this->failMessage_; }
+        
+            /**
+            @brief Returns the complete message.
+            @return Returns a string containing the complete message of the QuestDescription.
+            */
+            inline const std::string & getCompleteMessage(void) const
+                { return this->completeMessage_; }
+        
+            /**
+            @brief Sends a Notification displaying that a QuestHint was added.
+            @return Returns true if successful.
+            */
+            inline bool sendAddHintNotification(void) const
+                { return notificationHelper("hint", ""); }
+        
+            /**
+            @brief Sends a Notification displaying that a Quest was added.
+            @return Returns true if successful.
+            */
+            inline bool sendAddQuestNotification(void) const
+                { return notificationHelper("quest", "start"); }
+        
+            /**
+            @brief Sends a Notification displaying that a Quest was failed.
+            @return Returns true if successful.
+            */
+            inline bool sendFailQuestNotification(void) const
+                { return notificationHelper("quest", "fail"); }
+        
+            /**
+            @brief Sends a Notification displaying that a Quest was completed.
+            @return Returns true if successful.
+            */
+            inline bool sendCompleteQuestNotification(void) const
+                { return notificationHelper("quest", "complete"); }
 
         private:
             std::string title_; //!< The title.
             std::string description_; //!< The description.
+            std::string failMessage_; //!< The message displayed when the Quest is failed.
+            std::string completeMessage_; //!< The message displayed when the Quest is completed.
+
+            bool notificationHelper(const std::string & item, const std::string & status) const; //!< Helper for sending QuestDescriptions as Notifications.
 
             /**
@@ -89,5 +134,5 @@
                 { this->title_ = title; }
                 
-        /**
+            /**
             @brief Sets the description text.
             @param description The description text to be set.
@@ -96,4 +141,18 @@
                 { this->description_ = description; }
 
+            /**
+            @brief Sets the fail message.
+            @param message The fail message to be set.
+            */
+            inline void setFailMessage(const std::string & message)
+                { this->failMessage_ = message; }
+                
+            /**
+            @brief Sets the complete message.
+            @param message The complete message to be set.
+            */
+            inline void setCompleteMessage(const std::string & message)
+                { this->completeMessage_ = message; }
+
     };
 
Index: code/branches/bugger/src/orxonox/objects/quest/QuestEffect.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestEffect.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestEffect.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file QuestEffect.cc
-    @brief
-    Implementation of the QuestEffect class.
+    @file
+    @brief Implementation of the QuestEffect class.
 */
 
@@ -40,6 +39,6 @@
 #include "orxonox/objects/infos/PlayerInfo.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -71,7 +70,9 @@
         Returns false if there was an error, view console of log for further detail.
     */
-    bool QuestEffect::invokeEffects(PlayerInfo* player, std::list<QuestEffect*> & effects)
+    /*static*/ bool QuestEffect::invokeEffects(PlayerInfo* player, std::list<QuestEffect*> & effects)
     {
         bool check = true;
+        
+        COUT(4) << "Invoking QuestEffects on player: " << player << " ."  << std::endl;
 
         for (std::list<QuestEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
Index: code/branches/bugger/src/orxonox/objects/quest/QuestEffect.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestEffect.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestEffect.h	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file QuestEffect.h
-    @brief
-    Definition of the QuestEffect class.
+    @file
+    @brief Definition of the QuestEffect class.
 */
 
@@ -42,6 +41,6 @@
 #include "core/BaseObject.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
Index: code/branches/bugger/src/orxonox/objects/quest/QuestEffectBeacon.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestEffectBeacon.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestEffectBeacon.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file QuestEffectBeacon.cc
-    @brief
-    Implementation of the QuestEffectBeacon class.
+    @file
+    @brief Implementation of the QuestEffectBeacon class.
 */
 
@@ -46,6 +45,6 @@
 #include "QuestEffect.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(QuestEffectBeacon);
 
@@ -59,5 +58,5 @@
         
         this->status_ = QuestEffectBeaconStatus::active;
-        this->times_ = INFINITE;
+        this->times_ = INFINITE_TIME;
     }
 
@@ -91,5 +90,5 @@
         SUPER(QuestEffectBeacon, processEvent, event);
     
-    SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
+        SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
     }
     
@@ -145,7 +144,7 @@
             this->decrementTimes(); //!< Decrement the number of times the beacon can be used.
             return true;
-    }
-
-    return false;
+        }
+
+        return false;
     }
     
@@ -187,5 +186,5 @@
             return false;
         }
-        if(this->getTimes() == INFINITE) //!< If times is infinity the QuestEffectBeacon can be executed an infinite number fo times.
+        if(this->getTimes() == INFINITE_TIME) //!< If times is infinity the QuestEffectBeacon can be executed an infinite number fo times.
         {
             return true;
@@ -193,8 +192,8 @@
         
         this->times_ = this->times_ - 1; //!< Decrement number of times the QuestEffectBeacon can be executed.
-    if(this->getTimes() == 0) //!< Set the QuestEffectBeacon to inactive when the number of times it can be executed is reduced to 0.
-    {
+        if(this->getTimes() == 0) //!< Set the QuestEffectBeacon to inactive when the number of times it can be executed is reduced to 0.
+        {
             this->status_ = QuestEffectBeaconStatus::inactive;
-    }
+        }
         
         return true;
@@ -213,5 +212,5 @@
     bool QuestEffectBeacon::setTimes(const int & n)
     {
-        if(n < 0 && n != INFINITE)
+        if(n < 0 && n != INFINITE_TIME)
         {
             return false;
Index: code/branches/bugger/src/orxonox/objects/quest/QuestEffectBeacon.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestEffectBeacon.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestEffectBeacon.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file QuestEffectBeacon.h
-    @brief
-    Definition of the QuestEffectBeacon class.
+    @file
+    @brief Definition of the QuestEffectBeacon class.
 */
 
@@ -40,17 +39,17 @@
 #include "orxonox/objects/worldentities/PositionableEntity.h"
 
-namespace QuestEffectBeaconStatus
+namespace orxonox
 {
+    namespace QuestEffectBeaconStatus
+    {
 
-    //! The status of the beacon, can be either active or inactive.
-    enum Enum
-    {
-        inactive,
-        active
-    };
+        //! The status of the beacon, can be either active or inactive.
+        enum Enum
+        {
+            inactive,
+            active
+        };
 
-}
-
-namespace orxonox {
+    }
 
     /**
@@ -61,7 +60,7 @@
         A QuestEffectBeacon can be inactive or active.
         
-    Creating a QuestEffectBeacon through XML goes as follows:
-    
-    <QuestEffectBeacon times=n> //Where 'n' is eighter a number >= 0, which means the QuestEffectBeacon can be executed n times. Or n = -1, which means the QuestEffectBeacon can be executed an infinite number of times.
+        Creating a QuestEffectBeacon through XML goes as follows:
+        
+        <QuestEffectBeacon times=n> //Where 'n' is eighter a number >= 0, which means the QuestEffectBeacon can be executed n times. Or n = -1, which means the QuestEffectBeacon can be executed an infinite number of times.
             <effects>
                 <QuestEffect /> //A list of QuestEffects, invoked when the QuestEffectBeacon is executed, see QuestEffect for the full XML representation.
@@ -70,12 +69,12 @@
             </effects>
             <events>
-        <execute>
-            <EventListener event=eventIdString />
-        </execute>
-        </events>
-        <attached>
-           <PlayerTrigger name=eventIdString /> //A PlayerTrigger triggering the execution of the QuestEffectBeacon.
-        </attached>
-    </QuestEffectBeacon>
+                <execute>
+                    <EventListener event=eventIdString />
+                </execute>
+            </events>
+            <attached>
+                <PlayerTrigger name=eventIdString /> //A PlayerTrigger triggering the execution of the QuestEffectBeacon.
+            </attached>
+        </QuestEffectBeacon>
     @author
         Damian 'Mozork' Frick
@@ -83,24 +82,24 @@
     class _OrxonoxExport QuestEffectBeacon : public PositionableEntity
     {
-    public:
-        QuestEffectBeacon(BaseObject* creator);
-        virtual ~QuestEffectBeacon();
-        
-        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestEffectBeacon object through XML.
-        
-        virtual void processEvent(Event& event); //!< Processes an event for this QuestEffectBeacon.
-        
-        bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon.
-        
-        /**
-        @brief Tests whether the QuestEffectBeacon is active.
-        @return Returns true if the QuestEffectBeacon is active, fals if not.
-        */
-        inline bool isActive(void)
-           { return this->status_ == QuestEffectBeaconStatus::active; }
-        
-        bool setActive(bool activate); //!< Set the status of the QuestEffectBeacon.
-        
-    protected:
+        public:
+            QuestEffectBeacon(BaseObject* creator);
+            virtual ~QuestEffectBeacon();
+            
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestEffectBeacon object through XML.
+            
+            virtual void processEvent(Event& event); //!< Processes an event for this QuestEffectBeacon.
+            
+            bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon.
+            
+            /**
+            @brief Tests whether the QuestEffectBeacon is active.
+            @return Returns true if the QuestEffectBeacon is active, fals if not.
+            */
+            inline bool isActive(void)
+            { return this->status_ == QuestEffectBeaconStatus::active; }
+            
+            bool setActive(bool activate); //!< Set the status of the QuestEffectBeacon.
+            
+        protected:
             bool decrementTimes(void); //!< Decrement the number of times the QuestEffectBeacon can still be executed.
             
@@ -111,8 +110,8 @@
             inline const int & getTimes(void) const
                 { return this->times_; }
-
+    
         private:
-            //static const int INFINITE = -1; //!< Constant to avoid using magic numbers.
-        
+            static const int INFINITE_TIME = -1; //!< Constant to avoid using magic numbers.
+            
             std::list<QuestEffect*> effects_; //!< The list of QuestEffects to be invoked on the executing player.
             int times_; //!< Number of times the beacon can be exectued.
Index: code/branches/bugger/src/orxonox/objects/quest/QuestHint.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestHint.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestHint.cc	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file QuestHint.cc
-    @brief
-    Implementation of the QuestHint class.
+    @file
+    @brief Implementation of the QuestHint class.
 */
 
@@ -41,8 +40,9 @@
 #include "orxonox/objects/infos/PlayerInfo.h"
 #include "QuestManager.h"
+#include "QuestDescription.h"
 #include "Quest.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     CreateFactory(QuestHint);
 
@@ -122,4 +122,6 @@
             {
                 this->playerStatus_[player] = questHintStatus::active;
+                
+                this->getDescription()->sendAddHintNotification();
                 return true;
             }
Index: code/branches/bugger/src/orxonox/objects/quest/QuestHint.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestHint.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestHint.h	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file QuestHint.h
-    @brief
-    Definition of the QuestHint class.
+    @file
+    @brief Definition of the QuestHint class.
 */
 
@@ -44,18 +43,17 @@
 #include "QuestItem.h"
 
-namespace questHintStatus
-{
-
-    //! The status of the hint.
-    enum Enum
-    {
-        inactive,
-        active
-    };
-
-}
-
 namespace orxonox
 {
+    namespace questHintStatus
+    {
+
+        //! The state of the hint.
+        enum Enum
+        {
+            inactive,
+            active
+        };
+
+    }
 
     /**
@@ -96,5 +94,5 @@
         private:
             Quest* quest_; //!< The Quest the QuestHint belongs to.
-            std::map<const PlayerInfo*, questHintStatus::Enum> playerStatus_; //!< List of the status for each player, with the Player-pointer as key.
+            std::map<const PlayerInfo*, questHintStatus::Enum> playerStatus_; //!< List of the states for each player, with the Player-pointer as key.
 
     };
Index: code/branches/bugger/src/orxonox/objects/quest/QuestItem.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestItem.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestItem.cc	(revision 2533)
@@ -28,7 +28,6 @@
  
 /**
-    @file QuestItem.cc
-    @brief
-    Implementation of the QuestItem class.
+    @file
+    @brief Implementation of the QuestItem class.
 */
 
@@ -40,6 +39,6 @@
 #include "QuestDescription.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -99,8 +98,6 @@
     @return
         Returns true if the string is likely to be of the required form.
-    @todo
-        Clarify form, more vigorous checks.
     */
-    bool QuestItem::isId(const std::string & id)
+    /*static*/ bool QuestItem::isId(const std::string & id)
     {
         return id.size() >= 32;
Index: code/branches/bugger/src/orxonox/objects/quest/QuestItem.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestItem.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestItem.h	(revision 2533)
@@ -28,9 +28,7 @@
  
 /**
-    @file QuestItem.h
-    @brief
-    Definition of the QuestItem class.
-    
-    The QuestItem is the parent class of Quest and QuestHint.
+    @file
+    @brief Definition of the QuestItem class.
+        The QuestItem is the parent class of Quest and QuestHint.
 */
 
@@ -46,7 +44,6 @@
 #include "core/XMLPort.h"
 
-namespace orxonox {
-
-
+namespace orxonox
+{
     /**
     @brief
@@ -67,12 +64,13 @@
             /**
             @brief Returns the id of this QuestItem.
-        @return Returns the id of the QuestItem.
+            @return Returns the id of the QuestItem.
             */
             inline const std::string & getId(void) const
                 { return this->id_; }
-        /**
-        @brief Returns the QuestDescription of the QuestItem.
-        @return Returns a pointer to the QuestDescription object of the QuestItem.
-        */
+            
+            /**
+            @brief Returns the QuestDescription of the QuestItem.
+            @return Returns a pointer to the QuestDescription object of the QuestItem.
+            */
             inline const QuestDescription* getDescription(void) const
                 { return this->description_; }
Index: code/branches/bugger/src/orxonox/objects/quest/QuestListener.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestListener.cc	(revision 2533)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestListener.cc	(revision 2533)
@@ -0,0 +1,204 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Implementation of the QuestListener class.
+*/
+
+#include "OrxonoxStableHeaders.h"
+#include "QuestListener.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "util/Exception.h"
+
+#include "Quest.h"
+#include "QuestManager.h"
+
+namespace orxonox
+{
+    CreateFactory(QuestListener);
+
+    /**
+    @brief
+        Constructor. Registers the object and initializes variables.
+    */
+    QuestListener::QuestListener(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(QuestListener);
+        
+        this->mode_ = questListenerMode::all;
+        this->quest_ = NULL;
+    }
+    
+    /**
+    @brief
+        Destructor.
+    */
+    QuestListener::~QuestListener()
+    {
+    }
+    
+    /**
+    @brief
+        Method for creating a Quest object through XML.
+    */
+    void QuestListener::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(QuestListener, XMLPort, xmlelement, mode);
+
+        XMLPortParam(QuestListener, "questId", setQuestId, getQuestId, xmlelement, mode);
+        XMLPortParam(QuestListener, "mode", setMode, getMode, xmlelement, mode);
+
+        this->quest_->addListener(this); //!< Adds the QuestListener to the Quests list of listeners.
+        
+        COUT(3) << "QuestListener created for quest: {" << this->quest_->getId() << "} with mode '" << this->getMode() << "'." << std::endl;
+    }
+    
+    /**
+    @brief
+        Makes all QuestListener in the list aware that a certain status change has occured and executes them if the status change affects them.
+    @param listeners
+        The list of QuestListeners that have to be made aware of the status change.
+    @param status
+        The status that has changed. Can be 'start' (if the Quest was started), 'complete' (if the Quest was completed) or 'fail' (if the Quest was failed).
+    */
+    /* static */ void QuestListener::advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status)
+    {
+        for (std::list<QuestListener*>::iterator it = listeners.begin(); it != listeners.end(); ++it) //!< Iterate through all QuestListeners
+        {
+            QuestListener* listener = *it;
+            if(listener->getMode() == status || listener->getMode() == "all") //!< Check whether the status change affects the give QuestListener.
+            {
+                listener->execute();
+            }
+        }
+    }
+    
+    /**
+    @brief
+        Sets the questId of the Quest the QuestListener reacts to.
+    @param id
+        The questId of the Quest the QUestListener reacts to.
+    @return
+        Returns true if successful.
+    */
+    bool QuestListener::setQuestId(const std::string & id)
+    {
+        this->quest_ = QuestManager::findQuest(id); //!< Find the Quest corresponding to the given questId.
+        
+        if(this->quest_ == NULL) //!< If there is no such Quest.
+        {
+            ThrowException(Argument, "This is bad! The QuestListener has not found a Quest with a corresponding id..");
+            return false;
+        }
+        
+        return true;
+    }
+    
+    /**
+    @brief
+        Sets the mode of the QuestListener.
+    @param mode
+        The mode to be set. Can be eighter 'all', 'start', 'fail' or 'complete'.
+    @return
+        Returns true if successful.
+    */
+    bool QuestListener::setMode(const std::string & mode)
+    {
+        if(mode == "all")
+        {
+            this->mode_ = questListenerMode::all;
+        }
+        else if(mode == "start")
+        {
+            this->mode_ = questListenerMode::start;
+        }
+        else if(mode == "fail")
+        {
+            this->mode_ = questListenerMode::fail;
+        }
+        else if(mode == "complete")
+        {
+            this->mode_ = questListenerMode::complete;
+        }
+        else
+        {
+            COUT(2) << "QuestListener with invalid mode '" << mode << "' created. Mode set to 'all'." << std::endl;
+        this->mode_ = questListenerMode::all;
+        return false;
+        }
+        
+        return true;
+    }
+    
+    /**
+    @brief
+        Get the mode of the QuestListener.
+    @return
+        Return the mode of the QuestListener. Can be eighter 'all', 'start', 'fail' or 'complete'.
+    */
+    const std::string QuestListener::getMode(void)
+    {
+        if(this->mode_ == questListenerMode::all)
+        {
+            return "all";
+        }
+        else if(this->mode_ == questListenerMode::start)
+        {
+            return "start";
+        }
+        else if(this->mode_ == questListenerMode::fail)
+        {
+            return "fail";
+        }
+        else if(this->mode_ == questListenerMode::complete)
+        {
+            return "complete";
+        }
+        else
+        {
+            COUT(1) << "An unforseen, never to happen, Error has occured. This is impossible!" << std::endl;
+        return "";
+        }
+    }
+
+    /**
+    @brief
+        Executes the QuestListener, resp. fires an Event.
+    @return
+        Returns true if successful.
+    */
+    bool QuestListener::execute()
+    {
+        this->fireEvent(true);
+        return true;
+    }
+
+}
Index: code/branches/bugger/src/orxonox/objects/quest/QuestListener.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestListener.h	(revision 2533)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestListener.h	(revision 2533)
@@ -0,0 +1,111 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file
+    @brief Definition of the QuestListener class.
+*/
+
+#ifndef _QuestListener_H__
+#define _QuestListener_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+#include <list>
+
+#include "core/BaseObject.h"
+
+#include "Quest.h"
+
+namespace orxonox
+{
+    namespace questListenerMode
+    {
+
+        //! The mode of the QuestListener.
+        enum Enum
+        {
+            all,
+            start,
+            fail,
+            complete
+        };
+
+    }
+
+    /**
+    @brief
+        Provides a way to react to the starting, completing and failing of Quests.
+        
+        The XML representation goes as follows:
+        You can use the QuestListener as if it were a Trigger or EventListener, that fires an Event when the status (depending on the set mode) of the given Quest changes.
+        
+        <BaseObject> // The object that should react to the status change of a Quest.
+            <events>
+                <function> // Where function is the method of the object that schould be executed. Normally this would be visibility or activity.
+                    <QuestListener questId="someQuestId" mode="someMode" /> // Where someQuestId is the identifier for the Quest the QuestListener is reacting to, and someMode is the kind of status change the QUestListener reacts to (all, start, complete or fail).
+                </function>
+            </events>
+        </BaseObject>
+    @author
+    Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport QuestListener : public BaseObject
+    {
+    public:
+        QuestListener(BaseObject* creator);
+        virtual ~QuestListener();
+        
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestListener object through XML.
+        
+        static void advertiseStatusChange(std::list<QuestListener*> & listeners, const std::string & status); //!< Makes all QuestListener in the list aware that a certain status change has occured.
+        
+        bool setQuestId(const std::string & id); //!< Sets the questId of the Quest the QuestListener reacts to.
+        bool setMode(const std::string & mode); //!< Sets the mode of the QuestListener.
+        
+        const std::string getMode(void); //!< Get the mode of the QuestListener.
+        
+        /**
+        @brief Get the questId of the Quest the QuestListener reacts to.
+        @return Returns the questId of the Quest the QuestListener reacts to.
+        */
+        inline const std::string & getQuestId(void)
+                { return this->quest_->getId(); }
+        
+        bool execute(void); //!< Executes the QuestListener, resp. fires an Event.
+        
+    private:
+        questListenerMode::Enum mode_; //!< The mode of the QuestListener.
+        Quest* quest_; //!< A pointer to the Quest the QuestListener is reacting to.
+    
+    };
+
+}
+
+#endif /* _QuestListener_H__ */
Index: code/branches/bugger/src/orxonox/objects/quest/QuestManager.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestManager.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestManager.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file QuestManager.cc
-    @brief
-    Implementation of the QuestManager class.
+    @file
+    @brief Implementation of the QuestManager class.
 */
 
@@ -42,6 +41,6 @@
 #include "QuestHint.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     //! All Quests registered by their id's.
     std::map<std::string, Quest*> QuestManager::questMap_s;
@@ -76,5 +75,5 @@
         Returns true if successful, false if not.
     */
-    bool QuestManager::registerQuest(Quest* quest)
+    /*static*/ bool QuestManager::registerQuest(Quest* quest)
     {
         if(quest == NULL) //!< Doh! Just as if there were actual quests behind NULL-pointers.
@@ -108,5 +107,5 @@
         Returns true if successful, false if not.
     */
-    bool QuestManager::registerHint(QuestHint* hint)
+    /*static*/ bool QuestManager::registerHint(QuestHint* hint)
     {
         if(hint == NULL) //!< Still not liking NULL-pointers.
@@ -142,5 +141,5 @@
         Throws an exception if the given questId is invalid.
     */
-    Quest* QuestManager::findQuest(const std::string & questId)
+    /*static*/ Quest* QuestManager::findQuest(const std::string & questId)
     {
         if(!QuestItem::isId(questId)) //!< Check vor validity of the given id.
@@ -176,5 +175,5 @@
         Throws an exception if the given hintId is invalid.
     */
-    QuestHint* QuestManager::findHint(const std::string & hintId)
+    /*static*/ QuestHint* QuestManager::findHint(const std::string & hintId)
     {
         if(!QuestItem::isId(hintId)) //!< Check vor validity of the given id.
Index: code/branches/bugger/src/orxonox/objects/quest/QuestManager.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/QuestManager.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/QuestManager.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file QuestManager.h
-    @brief
-    Definition of the QuestManager class.
+    @file
+    @brief Definition of the QuestManager class.
 */
 
@@ -43,6 +42,6 @@
 #include "core/BaseObject.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
Index: code/branches/bugger/src/orxonox/objects/quest/Rewardable.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/Rewardable.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/Rewardable.cc	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file Rewardable.cc
-    @brief
-    Implementation of the Rewardable class.
+    @file
+    @brief Implementation of the Rewardable class.
 */
 
@@ -38,6 +37,6 @@
 #include "core/CoreIncludes.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
Index: code/branches/bugger/src/orxonox/objects/quest/Rewardable.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/quest/Rewardable.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/quest/Rewardable.h	(revision 2533)
@@ -28,7 +28,6 @@
 
 /**
-    @file Rewardable.h
-    @brief
-    Definition of the Rewardable class.
+    @file
+    @brief Definition of the Rewardable class.
 */
 
@@ -40,6 +39,6 @@
 #include "core/BaseObject.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -52,5 +51,4 @@
     class _OrxonoxExport Rewardable : public BaseObject
     {
-
         public:
             Rewardable(BaseObject* creator);
@@ -61,10 +59,10 @@
                 Method to transcribe a rewardable object to the player.
                 Must be implemented by every class inheriting from Rewardable.
-        @param player
+            @param player
                 A pointer to the ControllableEntity, do whatever you want with it.
-        @return
+            @return
                 Return true if successful.
             */
-            virtual bool reward(PlayerInfo* player) = 0; //!<
+            virtual bool reward(PlayerInfo* player) = 0;
 
     };
Index: code/branches/bugger/src/orxonox/objects/worldentities/CMakeLists.txt
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 2533)
@@ -16,4 +16,5 @@
   ParticleEmitter.cc
   ParticleSpawner.cc
+  Planet.cc
   SpawnPoint.cc
 )
Index: code/branches/bugger/src/orxonox/objects/worldentities/ControllableEntity.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/worldentities/ControllableEntity.cc	(revision 2533)
@@ -80,4 +80,6 @@
         this->server_orientation_ = Quaternion::IDENTITY;
         this->client_orientation_ = Quaternion::IDENTITY;
+        
+        this->setPriority( priority::very_high );
 
         this->setConfigValues();
Index: code/branches/bugger/src/orxonox/objects/worldentities/Model.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/Model.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/worldentities/Model.cc	(revision 2533)
@@ -40,5 +40,4 @@
     Model::Model(BaseObject* creator) : PositionableEntity(creator)
     {
-        static unsigned int i=10;
         RegisterObject(Model);
 
@@ -46,5 +45,4 @@
 
         this->registerVariables();
-        this->setObjectPriority(i++);
     }
 
Index: code/branches/bugger/src/orxonox/objects/worldentities/MovableEntity.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/worldentities/MovableEntity.cc	(revision 2533)
@@ -52,4 +52,6 @@
         this->overwrite_position_ = Vector3::ZERO;
         this->overwrite_orientation_ = Quaternion::IDENTITY;
+        
+        this->setPriority( priority::low );
 
         this->registerVariables();
Index: code/branches/bugger/src/orxonox/objects/worldentities/Planet.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/Planet.cc	(revision 2533)
+++ code/branches/bugger/src/orxonox/objects/worldentities/Planet.cc	(revision 2533)
@@ -0,0 +1,173 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Marian Runo
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "Planet.h"
+
+#include <math.h>
+
+#include <OgreEntity.h>
+#include <OgreMesh.h>
+#include <OgreHardwareVertexBuffer.h>
+#include <OgreMeshManager.h>
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "objects/Scene.h"
+#include "CameraManager.h"
+#include "Camera.h"
+#include "GraphicsEngine.h"
+
+namespace orxonox
+{
+    CreateFactory(Planet);    
+
+    /**
+     * @brief Constructor
+     */
+    Planet::Planet(BaseObject* creator): MovableEntity(creator)
+    {
+        RegisterObject(Planet);
+        this->registerVariables();
+    }
+
+    /**
+     * @brief Destructor
+     */
+    Planet::~Planet()
+    {
+        if (this->isInitialized() && this->mesh_.getEntity())
+            this->getNode()->detachObject(this->mesh_.getEntity());
+    }    
+
+    void Planet::tick(float dt)
+    {
+        if(!this->isVisible())
+            return;
+
+        Camera* activeCamera = CameraManager::getInstance().getActiveCamera();
+        if(activeCamera)
+        {
+            Real distance = this->getPosition().distance( activeCamera->getWorldPosition() );
+            //             COUT(2) << distance << std::endl;
+            Real planetRadius = this->getScale();
+
+            Real newScale = 2 * distance / sqrt(distance*distance - planetRadius*planetRadius);
+            Real tempTest = newScale*(1+Real(this->atmosphereSize)/Real(this->imageSize));
+            newScale = tempTest;
+
+            this->billboard_.getBillboardSet()->setDefaultDimensions(newScale, newScale);
+        }
+
+        SUPER(Planet, tick, dt);
+    }
+
+    void Planet::init()
+    {
+        Real scaleFactor = this->getScale();
+
+        this->distList.push_back(10.0*scaleFactor);
+        this->distList.push_back(19.0*scaleFactor);
+        this->distList.push_back(27.0*scaleFactor);
+        this->distList.push_back(34.0*scaleFactor);
+        this->distList.push_back(40.0*scaleFactor);
+        this->distList.push_back(45.0*scaleFactor);
+        this->distList.push_back(49.0*scaleFactor);
+        this->distList.push_back(52.0*scaleFactor);
+        this->distList.push_back(54.0*scaleFactor);
+        this->distList.push_back(55.0*scaleFactor);
+
+        Real reductionValue = 0.2;
+
+        this->mesh_.getEntity()->getMesh()->generateLodLevels(distList, Ogre::ProgressiveMesh::VRQ_PROPORTIONAL, reductionValue);
+        billboard_.setBillboardSet(this->getScene()->getSceneManager(), this->atmosphere_, Vector3(0,0,0));
+
+        this->getNode()->attachObject(this->billboard_.getBillboardSet());    
+        this->billboard_.getBillboardSet()->setUseAccurateFacing(true);
+        this->setCastShadows(true);
+        this->billboard_.getBillboardSet()->setRenderQueueGroup(this->mesh_.getEntity()->getRenderQueueGroup());
+        this->mesh_.setCastShadows(true);
+    }
+
+    void Planet::changedMesh()
+    {
+        if (this->mesh_.getEntity())
+            this->getNode()->detachObject(this->mesh_.getEntity());
+
+        this->mesh_.setMeshSource(this->getScene()->getSceneManager(), this->meshSrc_);
+
+        if (this->mesh_.getEntity())
+        {
+            this->getNode()->attachObject(this->mesh_.getEntity());
+            this->mesh_.getEntity()->setCastShadows(this->bCastShadows_);
+            this->mesh_.setVisible(this->isVisible());
+        }
+        this->init();
+    }
+
+    void Planet::changedShadows()
+    {
+        this->mesh_.setCastShadows(this->bCastShadows_);
+    }
+
+    /**
+        @brief XML loading and saving.
+        @param xmlelement The XML-element
+        @param loading Loading (true) or saving (false)
+        @return The XML-element
+    */
+    void Planet::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(Planet, XMLPort, xmlelement, mode);
+
+        XMLPortParam(Planet, "atmosphere", setAtmosphere, getAtmosphere, xmlelement, mode).defaultValues("planet/Atmosphere");
+        XMLPortParam(Planet, "atmospheresize", setAtmosphereSize, getAtmosphereSize, xmlelement,mode);     
+        XMLPortParam(Planet, "imagesize", setImageSize, getImageSize, xmlelement,mode);         
+        XMLPortParam(Planet, "mesh", setMeshSource, getMeshSource, xmlelement, mode);
+        XMLPortParam(Planet, "shadow", setCastShadows, getCastShadows, xmlelement, mode).defaultValues(true);
+    }
+
+    void Planet::registerVariables()
+    {
+        registerVariable(this->atmosphere_, variableDirection::toclient);
+        registerVariable(this->meshSrc_, variableDirection::toclient, new NetworkCallback<Planet>(this, &Planet::changedMesh));
+        registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Planet>(this, &Planet::changedShadows));
+        registerVariable(this->atmosphereSize, variableDirection::toclient);
+        registerVariable(this->imageSize, variableDirection::toclient);
+    }
+
+    void Planet::changedVisibility()
+    {
+        SUPER(Planet, changedVisibility);
+        if (this->isInitialized())
+        {
+            this->mesh_.setVisible(this->isVisible());
+            this->billboard_.setVisible(this->isVisible());
+        }
+    }
+}
Index: code/branches/bugger/src/orxonox/objects/worldentities/Planet.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/Planet.h	(revision 2533)
+++ code/branches/bugger/src/orxonox/objects/worldentities/Planet.h	(revision 2533)
@@ -0,0 +1,116 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Marian Runo
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Planet_H__
+#define _Planet_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "tools/BillboardSet.h"
+#include "tools/Mesh.h"
+#include "MovableEntity.h"
+#include "objects/Tickable.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Planet : public MovableEntity
+    {
+        public:
+            Planet(BaseObject* creator);
+            
+            virtual ~Planet();
+            
+            void init();
+            virtual void tick(float dt);
+            
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            
+            virtual void changedVisibility();
+            
+            inline void setMeshSource(const std::string& meshname)
+                { this->meshSrc_ = meshname; this->changedMesh(); }
+                
+            inline const std::string& getMeshSource() const
+                { return this->meshSrc_; }
+
+            inline void setCastShadows(bool bCastShadows)
+                { this->bCastShadows_ = bCastShadows; this->changedShadows(); }
+                
+            inline bool getCastShadows() const
+                { return this->bCastShadows_; }            
+            
+            inline const std::string& getMesh() const{
+                return this->meshSrc_;
+            }
+            
+            inline void setAtmosphereSize(Real size){
+                this->atmosphereSize = size;
+            }
+            
+            inline Real getAtmosphereSize(){
+                return this->atmosphereSize;
+            }
+            
+            inline void setAtmosphere(const std::string& atmosphere){
+                this->atmosphere_ = atmosphere;
+            }
+            
+            inline const std::string& getAtmosphere(){
+                return this->atmosphere_;
+            }
+            
+            inline void setImageSize(Real size){
+                this->imageSize = size;
+            }
+            
+            inline Real getImageSize(){
+                return this->imageSize;
+            }
+
+        protected:
+            void registerVariables();
+
+        private:
+        
+            void changedMesh();
+            void changedShadows();
+            
+            std::string meshSrc_;
+            std::string atmosphere_;
+            Mesh mesh_;
+            Real atmosphereSize;
+            Real imageSize;
+            Ogre::Mesh::LodDistanceList distList;
+            BillboardSet billboard_;
+            bool bCastShadows_;
+
+    };
+}
+
+#endif
+
Index: code/branches/bugger/src/orxonox/objects/worldentities/PositionableEntity.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/PositionableEntity.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/worldentities/PositionableEntity.cc	(revision 2533)
@@ -38,4 +38,6 @@
     {
         RegisterObject(PositionableEntity);
+        
+        this->setPriority( priority::very_low );
 
         this->registerVariables();
Index: code/branches/bugger/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/worldentities/triggers/PlayerTrigger.cc	(revision 2533)
@@ -28,7 +28,7 @@
 
 /**
-    @file PlayerTrigger.cc
+    @file
     @brief
-	Implementation of the PlayerTrigger class.
+    Implementation of the PlayerTrigger class.
 */
 
@@ -38,6 +38,6 @@
 #include "core/CoreIncludes.h"
 
-namespace orxonox {
-
+namespace orxonox
+{
     /**
     @brief
@@ -47,9 +47,9 @@
     {
         RegisterObject(PlayerTrigger);
-        
+
         this->player_ = NULL;
         this->isForPlayer_ = true;
     }
-    
+
     /**
     @brief
@@ -66,6 +66,5 @@
     void PlayerTrigger::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
-	SUPER(PlayerTrigger, XMLPort, xmlelement, mode);
+        SUPER(PlayerTrigger, XMLPort, xmlelement, mode);
     }
-
 }
Index: code/branches/bugger/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h
===================================================================
--- code/branches/bugger/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h	(revision 2532)
+++ code/branches/bugger/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h	(revision 2533)
@@ -28,7 +28,7 @@
 
 /**
-    @file PlayerTrigger.h
+    @file
     @brief
-	Definition of the PlayerTrigger class.
+    Definition of the PlayerTrigger class.
 */
 
@@ -40,6 +40,6 @@
 #include "Trigger.h"
 
-namespace orxonox {
-    
+namespace orxonox
+{
     /**
     @brief
@@ -50,33 +50,33 @@
     class _OrxonoxExport PlayerTrigger : public Trigger
     {
-	public:
-	    PlayerTrigger(BaseObject* creator);
-	    virtual ~PlayerTrigger();
-	    
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a PlayerTrigger object through XML.
+    public:
+        PlayerTrigger(BaseObject* creator);
+        virtual ~PlayerTrigger();
+        
+        virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a PlayerTrigger object through XML.
+        
+        /**
+        @brief Returns the player that triggered the PlayerTrigger.
+        @return Returns a pointer to the ControllableEntity that triggered the PlayerTrigger.
+        */
+        inline ControllableEntity* getTriggeringPlayer(void) const
+            { return this->player_; }
+        
+        /**
+        @brief Checks whether the PlayerTrigger normally returns a ControllableEntity.
+        @return Returns true if the PlayerTrigger normally returns a ControllableEntity.
+        */
+        inline bool isForPlayer(void) const
+           { return this->isForPlayer_; }
             
-            /**
-            @brief Returns the player that triggered the PlayerTrigger.
-            @return Returns a pointer to the ControllableEntity that triggered the PlayerTrigger.
-            */
-            inline ControllableEntity* getTriggeringPlayer(void) const
-                { return this->player_; }
-	    
-	    /**
-	    @brief Checks whether the PlayerTrigger normally returns a ControllableEntity.
-	    @return Returns true if the PlayerTrigger normally returns a ControllableEntity.
-	    */
-	    inline bool isForPlayer(void) const
-	       { return this->isForPlayer_; }
-            
-	protected:
-	    virtual bool isTriggered(TriggerMode mode) = 0;
-	    
-	    /**
-	    @brief Set the player that triggered the PlayerTrigger. This is normally done by classes inheriting vom PlayerTrigger.
-	    @param player A pointer to the ControllableEntity that triggered the PlayerTrigger.
-	    */
-	    inline void setTriggeringPlayer(ControllableEntity* player)
-	       { this->player_ = player; }
+    protected:
+        virtual bool isTriggered(TriggerMode mode) = 0;
+        
+        /**
+        @brief Set the player that triggered the PlayerTrigger. This is normally done by classes inheriting vom PlayerTrigger.
+        @param player A pointer to the ControllableEntity that triggered the PlayerTrigger.
+        */
+        inline void setTriggeringPlayer(ControllableEntity* player)
+           { this->player_ = player; }
 
             /**
@@ -84,11 +84,11 @@
             @param isForPlayer Should be true when the PlayerTrigger schould be set to normally be triggered by ControllableEntities, false if not.
             */
-	    inline void setForPlayer(bool isForPlayer)
-	       { this->isForPlayer_ = isForPlayer; }
-	    
-	private:
-	    ControllableEntity* player_; //!< The player that triggered the PlayerTrigger.
-	    bool isForPlayer_; //!< Is true when the PlayerTrigger schould be set to normally be triggered by ControllableEntities.
-	
+        inline void setForPlayer(bool isForPlayer)
+           { this->isForPlayer_ = isForPlayer; }
+        
+    private:
+        ControllableEntity* player_; //!< The player that triggered the PlayerTrigger.
+        bool isForPlayer_; //!< Is true when the PlayerTrigger schould be set to normally be triggered by ControllableEntities.
+    
     };
 
Index: code/branches/bugger/src/orxonox/overlays/CMakeLists.txt
===================================================================
--- code/branches/bugger/src/orxonox/overlays/CMakeLists.txt	(revision 2532)
+++ code/branches/bugger/src/orxonox/overlays/CMakeLists.txt	(revision 2533)
@@ -8,4 +8,5 @@
 ADD_SOURCE_DIRECTORY(SRC_FILES debug)
 ADD_SOURCE_DIRECTORY(SRC_FILES hud)
+ADD_SOURCE_DIRECTORY(SRC_FILES notifications)
 
 ADD_SOURCE_FILES(SRC_FILES)
Index: code/branches/bugger/src/orxonox/overlays/notifications/CMakeLists.txt
===================================================================
--- code/branches/bugger/src/orxonox/overlays/notifications/CMakeLists.txt	(revision 2533)
+++ code/branches/bugger/src/orxonox/overlays/notifications/CMakeLists.txt	(revision 2533)
@@ -0,0 +1,7 @@
+SET( SRC_FILES
+  Notification.cc
+  NotificationManager.cc
+  NotificationQueue.cc
+)
+
+ADD_SOURCE_FILES(SRC_FILES)
Index: code/branches/bugger/src/orxonox/overlays/notifications/Notification.cc
===================================================================
--- code/branches/bugger/src/orxonox/overlays/notifications/Notification.cc	(revision 2533)
+++ code/branches/bugger/src/orxonox/overlays/notifications/Notification.cc	(revision 2533)
@@ -0,0 +1,102 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See thes
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "Notification.h"
+
+#include "core/CoreIncludes.h"
+
+#include "NotificationManager.h"
+
+namespace orxonox
+{
+    Notification::Notification(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(Notification);
+    }
+    
+    Notification::Notification(BaseObject* creator, const std::string & message, const std::string & title, float time) : BaseObject(creator)
+    {
+        this->title_ = title;
+        this->message_ = message;
+        if(time > 0)
+            this->displayTime_ = time;
+    }
+    
+    Notification::~Notification()
+    {
+    }
+    
+    void Notification::initialize(void)
+    {
+        RegisterObject(Notification);
+        
+        this->title_ = "";
+        this->message_ = "";
+        this->displayTime_ = NOTIFICATION_DISPLAY_TIME;
+        this->sent_ = false;
+    }
+    
+    bool Notification::send(void)
+    {
+        bool successful = NotificationManager::insertNotification(this);
+        if(successful)
+            this->sent_ = true;
+        return successful;
+    }
+    
+    bool Notification::setTitle(const std::string & title)
+    {
+        if(this->isSent())
+            return false;
+        this->title_ = title;
+        return true;
+    }
+    
+    bool Notification::setMessage(const std::string & message)
+    {
+        if(this->isSent())
+            return false;
+        this->message_ = message;
+        return true;
+    }
+    
+    bool Notification::setDisplayTime(float time)
+    {
+        if(this->isSent())
+        {
+            return false;
+        }
+        if(time > 0)
+        {
+            this->displayTime_ = time;
+            return true;
+        }
+        return false;
+    }
+}
Index: code/branches/bugger/src/orxonox/overlays/notifications/Notification.h
===================================================================
--- code/branches/bugger/src/orxonox/overlays/notifications/Notification.h	(revision 2533)
+++ code/branches/bugger/src/orxonox/overlays/notifications/Notification.h	(revision 2533)
@@ -0,0 +1,80 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Notification_H__
+#define _Notification_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <string>
+
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    static const float NOTIFICATION_DISPLAY_TIME = 4.0;
+
+    /**
+    @brief
+        This is rather temporary, so don't start relying on it, some better version will come soon but the Interface will not likely be the same.
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport Notification : public BaseObject
+    {
+    public:
+        Notification(BaseObject* creator);
+        Notification(BaseObject* creator, const std::string & message, const std::string & title = "", float time = NOTIFICATION_DISPLAY_TIME);
+        virtual ~Notification();
+        
+        bool send(void);
+        
+        inline bool isSent(void) const
+            { return this->sent_; }
+        inline const std::string & getTitle(void) const
+            { return this->title_; }
+        inline const std::string & getMessage(void) const
+            { return this->message_; }
+        inline const float getDisplayTime(void) const
+            { return displayTime_; }
+        
+        bool setTitle(const std::string & title);
+        bool setMessage(const std::string & message);
+        bool setDisplayTime(float time);
+        
+    private:
+        std::string title_; //!< The title of the Notification.
+        std::string message_; //!< The Notification message.
+        float displayTime_; //!< The time duration the Notification is displayed in seconds.
+        bool sent_; //!< Whether Notification has been sent, if so it cannot be changed.
+        
+        void initialize(void);
+    };
+}
+
+#endif /* _Notification_H__ */
Index: code/branches/bugger/src/orxonox/overlays/notifications/NotificationManager.cc
===================================================================
--- code/branches/bugger/src/orxonox/overlays/notifications/NotificationManager.cc	(revision 2533)
+++ code/branches/bugger/src/orxonox/overlays/notifications/NotificationManager.cc	(revision 2533)
@@ -0,0 +1,171 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "NotificationManager.h"
+
+#include "core/CoreIncludes.h"
+
+#include "Notification.h"
+
+#include "NotificationQueue.h"
+
+namespace orxonox
+{
+    std::list<NotificationContainer*> NotificationManager::notifications_s;
+
+    NotificationManager::NotificationManager(BaseObject* creator) : BaseObject(creator)
+    {
+        RegisterObject(NotificationManager);
+    }
+
+    NotificationManager::~NotificationManager()
+    {
+        //TDO: Destroy the containers
+    }
+    
+    void NotificationManager::tick(float dt)
+    {
+        bool update = false;
+    
+        for (std::list<NotificationContainer*>::iterator notification = notifications_s.begin(); notification != notifications_s.end(); ++notification)
+        {
+            NotificationContainer* container = *notification;
+            if(container->remainingTime == 0)
+            {
+                continue;
+            }
+            else if(container->remainingTime - dt <= 0)
+            {
+                container->remainingTime = 0;
+                update = true;
+            }
+            else
+            {
+                container->remainingTime = container->remainingTime -dt;
+            }
+        }
+    
+        if(update)
+            updateQueue();
+    }
+    
+    bool NotificationManager::insertNotification(Notification* notification)
+    {
+        if(notification == NULL)
+            return false;
+            
+        NotificationContainer* container = new NotificationContainer;
+        container->notification = notification;
+        container->remainingTime = notification->getDisplayTime();
+        notifications_s.push_front(container);
+        
+        updateQueue();
+        
+        COUT(4) << "Notification inserted. Title: " << notification->getTitle() << std::endl;
+        
+        return true;
+    }
+    
+    void NotificationManager::updateQueue(void)
+    {
+        std::string text = "";
+        
+        int i = NotificationQueue::queue_s->getLength();
+        for (std::list<NotificationContainer*>::iterator notification = notifications_s.begin(); notification != notifications_s.end() && i > 0; ++notification)
+        {
+            i--;
+            NotificationContainer* container = *notification;
+            if(container->remainingTime == 0.0)
+                continue;
+            
+            text = text + "\n\n\n------------\n\n" + clipMessage(container->notification->getTitle()) + "\n\n" + clipMessage(container->notification->getMessage());
+        }
+        
+        NotificationQueue::queue_s->setQueueText(text);
+    }
+    
+    const std::string NotificationManager::clipMessage(const std::string & str)
+    {
+    
+        std::string message = str;
+        unsigned int i = 0;
+        
+        unsigned int found = message.find("\\n", i);
+        while(found != std::string::npos)
+        {
+            message.replace(found, 2, "\n");
+            i = found+2;
+            found = message.find("\\n", i);
+        }
+    
+        std::string clippedMessage = "";
+        int wordLength = 0;
+        i = 0;
+        int widthLeft = NotificationQueue::queue_s->getWidth();
+        while(i < message.length())
+        {
+            while(i < message.length() && message[i] != ' ' && message[i] != '\n')
+            {
+                i++;
+                wordLength++;
+            }
+            
+            if(wordLength <= widthLeft)
+            {
+                clippedMessage = clippedMessage + message.substr(i-wordLength, wordLength);
+                if(i < message.length())
+                {
+                    clippedMessage = clippedMessage + message.substr(i,1);
+                }
+                widthLeft -= (wordLength+1);
+                if(message[i] == '\n')
+                {
+                    widthLeft = NotificationQueue::queue_s->getWidth() - (wordLength+1);
+                }
+                wordLength = 0;
+                i++;
+            }
+            else
+            {
+                clippedMessage.push_back('\n');
+                clippedMessage = clippedMessage + message.substr(i-wordLength, wordLength);
+                if(i < message.length())
+                {
+                    clippedMessage = clippedMessage + message.substr(i,1);
+                }
+                widthLeft = NotificationQueue::queue_s->getWidth() - (wordLength+1);
+                i++;
+                wordLength = 0;
+            }
+        }
+        
+        return clippedMessage;
+    }
+
+}
Index: code/branches/bugger/src/orxonox/overlays/notifications/NotificationManager.h
===================================================================
--- code/branches/bugger/src/orxonox/overlays/notifications/NotificationManager.h	(revision 2533)
+++ code/branches/bugger/src/orxonox/overlays/notifications/NotificationManager.h	(revision 2533)
@@ -0,0 +1,74 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _NotificationManager_H__
+#define _NotificationManager_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+#include <list>
+#include <string>
+
+namespace orxonox
+{
+    struct NotificationContainer
+    {
+        Notification* notification;
+        float remainingTime;
+    };
+
+    /**
+    @brief
+        
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport NotificationManager : public BaseObject
+    {
+    
+    public:
+        NotificationManager(BaseObject* creator);
+        virtual ~NotificationManager();
+        
+        static bool insertNotification(Notification* notification);
+        
+        static void tick(float dt);
+        
+    private:
+        static std::list<NotificationContainer*> notifications_s;
+        
+        static void updateQueue(void);
+        static const std::string clipMessage(const std::string & message);
+
+    };
+
+}
+
+#endif /* _NotificationManager_H__ */
Index: code/branches/bugger/src/orxonox/overlays/notifications/NotificationQueue.cc
===================================================================
--- code/branches/bugger/src/orxonox/overlays/notifications/NotificationQueue.cc	(revision 2533)
+++ code/branches/bugger/src/orxonox/overlays/notifications/NotificationQueue.cc	(revision 2533)
@@ -0,0 +1,110 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "NotificationQueue.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+#include "NotificationManager.h"
+
+namespace orxonox
+{
+    NotificationQueue* NotificationQueue::queue_s = 0;
+    
+    CreateFactory(NotificationQueue);
+
+    NotificationQueue::NotificationQueue(BaseObject* creator) : OverlayText(creator)
+    {
+        RegisterObject(NotificationQueue);
+        //TDO: Does this work?
+        if(queue_s != NULL)
+        {
+                COUT(2) << "There is now more than one NotificationQueue, this shouldn't happen, since only the first NotificationQueue will be targeted by the NotificationManager." << std::endl;
+        }
+        else
+        {
+                queue_s = this;
+        }
+        
+        this->length_ = 3;
+        this->width_ = 50;
+    }
+    
+    NotificationQueue::~NotificationQueue()
+    {
+        
+    }
+    
+    void NotificationQueue::XMLPort(Element& xmlElement, XMLPort::Mode mode)
+    {
+        SUPER(NotificationQueue, XMLPort, xmlElement, mode);
+        
+        XMLPortParam(NotificationQueue, "length", setLength, getLength, xmlElement, mode);
+        XMLPortParam(NotificationQueue, "width", setWidth, getWidth, xmlElement, mode);
+    }
+    
+    void NotificationQueue::tick(float dt)
+    {
+        NotificationManager::tick(dt);
+        
+        update();
+    }
+    
+    bool NotificationQueue::setLength(int length)
+    {
+        if(length > 0)
+        {
+            this->length_ = length;
+            return true;
+        }
+        return false;
+    }
+    
+    bool NotificationQueue::setWidth(int width)
+    {
+        if(width > 0)
+        {
+            this->width_ = width;
+            return true;
+        }
+        return false;
+    }
+    
+    void NotificationQueue::setQueueText(const std::string & text)
+    {
+        this->queueText_ = text;
+    }
+    
+    void NotificationQueue::update(void)
+    {
+        this->text_->setCaption(queueText_);
+    }
+
+}
Index: code/branches/bugger/src/orxonox/overlays/notifications/NotificationQueue.h
===================================================================
--- code/branches/bugger/src/orxonox/overlays/notifications/NotificationQueue.h	(revision 2533)
+++ code/branches/bugger/src/orxonox/overlays/notifications/NotificationQueue.h	(revision 2533)
@@ -0,0 +1,80 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Damian 'Mozork' Frick
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _NotificationOueue_H__
+#define _NotificationOueue_H__
+
+#include "OrxonoxPrereqs.h"
+#include <OgreTextAreaOverlayElement.h>
+
+#include "orxonox/overlays/OverlayText.h"
+#include "orxonox/objects/Tickable.h"
+
+#include <string>
+
+namespace orxonox
+{
+    /**
+    @brief
+        
+    @author
+        Damian 'Mozork' Frick
+    */
+    class _OrxonoxExport NotificationQueue : public OverlayText, public Tickable
+    {
+    public:
+        NotificationQueue(BaseObject* creator);
+        virtual ~NotificationQueue();
+        
+        static NotificationQueue* queue_s; //TDO Singleton? oder im level.
+        
+        virtual void XMLPort(Element& xmlElement, XMLPort::Mode mode);
+        
+        virtual void tick(float dt);
+        
+        void update(void);
+        
+        int getLength(void) const
+                { return this->length_; }
+        int getWidth(void) const
+                { return this->width_; }
+        
+        void setQueueText(const std::string & text);
+        bool setLength(int length);
+        bool setWidth(int width);
+        
+    private:
+        Ogre::UTFString queueText_;
+        int length_;
+        int width_;
+    
+    };
+
+}
+
+#endif /* _NotificationOverlay_H__ */
