Index: code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.cc	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.cc	(revision 8706)
@@ -53,5 +53,5 @@
         Default Constructor. Registers the object and initializes default values.
     */
-    DistanceMultiTrigger::DistanceMultiTrigger(BaseObject* creator) : MultiTrigger(creator), beaconMask_(NULL)
+    DistanceMultiTrigger::DistanceMultiTrigger(BaseObject* creator) : MultiTrigger(creator)
     {
         RegisterObject(DistanceMultiTrigger);
@@ -60,4 +60,6 @@
         this->setBeaconModeDirect(distanceMultiTriggerBeaconMode::off);
         this->targetName_ = "";
+        this->beaconMask_.exclude(Class(BaseObject));
+        this->beaconMask_.include(Class(DistanceTriggerBeacon));
     }
 
@@ -68,6 +70,5 @@
     DistanceMultiTrigger::~DistanceMultiTrigger()
     {
-        if(this->beaconMask_ != NULL)
-            delete this->beaconMask_;
+
     }
 
@@ -135,5 +136,5 @@
         // If we are in identify-mode another target mask has to be applies to find the DistanceTriggerBeacons.
         if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify)
-            targetMask = *this->beaconMask_;
+            targetMask = this->beaconMask_;
 
         // Iterate through all objects that are targets of the DistanceMultiTrigger.
@@ -207,10 +208,4 @@
     {
         this->beaconMode_ = mode;
-        if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify && this->beaconMask_ == NULL)
-        {
-            this->beaconMask_ = new ClassTreeMask();
-            this->beaconMask_->exclude(Class(BaseObject));
-            this->beaconMask_->include(Class(DistanceTriggerBeacon));
-        }
     }
     
Index: code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h	(revision 8706)
@@ -152,5 +152,5 @@
             distanceMultiTriggerBeaconMode::Value beaconMode_; //!< The beacon mode, the DistanceMultiTrigger is in.
             std::string targetName_; //!< The target name, used in <em>single-target</em> mode.
-            ClassTreeMask* beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
+            ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
 
             std::map<WorldEntity*, WeakPtr<WorldEntity>* > range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger.
Index: code/trunk/src/modules/objects/triggers/DistanceTrigger.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/DistanceTrigger.cc	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/DistanceTrigger.cc	(revision 8706)
@@ -57,5 +57,5 @@
         The creator of this trigger.
     */
-    DistanceTrigger::DistanceTrigger(BaseObject* creator) : Trigger(creator), beaconMask_(NULL)
+    DistanceTrigger::DistanceTrigger(BaseObject* creator) : Trigger(creator)
     {
         RegisterObject(DistanceTrigger);
@@ -64,4 +64,6 @@
         this->targetMask_.exclude(Class(BaseObject));
         this->targetName_ = "";
+        this->beaconMask_.exclude(Class(BaseObject));
+        this->beaconMask_.include(Class(DistanceTriggerBeacon));
     }
 
@@ -72,7 +74,5 @@
     DistanceTrigger::~DistanceTrigger()
     {
-        // Delete the beacon mask if it exists.
-        if(this->beaconMask_ != NULL)
-            delete this->beaconMask_;
+
     }
 
@@ -159,5 +159,5 @@
         // If we are in identify-mode another target mask has to be applies to find the DistanceTriggerBeacons.
         if(this->beaconMode_ == distanceTriggerBeaconMode::identify)
-            targetMask = *this->beaconMask_;
+            targetMask = this->beaconMask_;
 
         // Iterate through all objects that are targets of the DistanceTrigger.
@@ -205,6 +205,9 @@
                         entity = entity->getParent();
 
-                    Pawn* player = orxonox_cast<Pawn*>(entity);
-                    this->setTriggeringPlayer(player);
+                    Pawn* pawn = orxonox_cast<Pawn*>(entity);
+                    if(pawn != NULL)
+                        this->setTriggeringPawn(pawn);
+                    else
+                        CCOUT(2) << "Pawn was NULL." << endl;
                 }
                 
@@ -228,10 +231,4 @@
     {
         this->beaconMode_ = mode;
-        if(this->beaconMode_ == distanceTriggerBeaconMode::identify && this->beaconMask_ == NULL)
-        {
-            this->beaconMask_ = new ClassTreeMask();
-            this->beaconMask_->exclude(Class(BaseObject));
-            this->beaconMask_->include(Class(DistanceTriggerBeacon));
-        }
     }
 
@@ -280,5 +277,7 @@
         Check whether the DistanceTrigger is triggered.
         It is triggered if it is triggered according only to its mode (i.e. its sub-triggers) and if a target is in range.
-    @param
+    @param mode
+        The mode for which it is tested, whether the DistanceTrigger is triggered.
+    @return
         Returns true if it is triggered ,false if not.
     */
Index: code/trunk/src/modules/objects/triggers/DistanceTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/DistanceTrigger.h	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/DistanceTrigger.h	(revision 8706)
@@ -71,5 +71,5 @@
         - @b target Which specifies the class of objects that can trigger the DistanceTrigger. Default is <code>"Pawn"</code>.
         - @b beaconMode Which specifies, whether the DistanceTrigger operates on @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacons" or not. If <em>off</em> the DistanceMultiTrigger works as usual. If set to <em>identify</em> the DistanceTrigger is only triggered by objects that have a @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon", with the same name as specified in <em>targetname</em>, attached to them. If set to <em>exclude</em> the DistanceTrigger is only triggered by objects that don't have a @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacon", with the same name as specified in <em>targetname</em>, attached to them. Default is <em>off</em>.
-        - @b targetname Which specifies the name @ref oroxnox::DistanceTriggerBeacon "DistanceTriggerBeacons" need to have to make the DistanceTrigger react to them if it is in <em>beacon-mode</em> (the beaconMode is not <em>off</em>).
+        - @b targetname Which specifies the name @ref orxonox::DistanceTriggerBeacon "DistanceTriggerBeacons" need to have to make the DistanceTrigger react to them if it is in <em>beacon-mode</em> (the beaconMode is not <em>off</em>).
 
         A simple DistanceTrigger could look like this:
@@ -162,5 +162,5 @@
             distanceTriggerBeaconMode::Value beaconMode_; //!< The beacon mode.
             std::string targetName_; //!< The name a DistanceTriggerBeacon needs to have to make the DistanceTrigger react to it if in beacon-mode.
-            ClassTreeMask* beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
+            ClassTreeMask beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons.
             
             WeakPtr<WorldEntity> cache_; //!< Caches the entity that triggered the DistanceTrigger last.
Index: code/trunk/src/modules/objects/triggers/EventTrigger.h
===================================================================
--- code/trunk/src/modules/objects/triggers/EventTrigger.h	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/EventTrigger.h	(revision 8706)
@@ -60,5 +60,5 @@
 
     @see Trigger
-        For more information on @ref oroxnox::Trigger "Triggers".
+        For more information on @ref orxonox::Trigger "Triggers".
 
     @author
Index: code/trunk/src/modules/objects/triggers/MultiTrigger.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/MultiTrigger.cc	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/MultiTrigger.cc	(revision 8706)
@@ -63,5 +63,5 @@
         this->bMultiTrigger_ = true;
 
-        this->setSyncMode(0x0);
+        this->setSyncMode(ObjectDirection::None);
     }
 
@@ -198,5 +198,4 @@
                         if(bActive ^ this->isActive(state->originator))
                         {
-
                             bool bFire = true;
 
@@ -312,5 +311,4 @@
 
         // We only want WorldEntities
-        //TODO: Really?
         ClassTreeMask WEMask;
         WEMask.include(Class(WorldEntity));
Index: code/trunk/src/modules/objects/triggers/MultiTriggerContainer.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/MultiTriggerContainer.cc	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/MultiTriggerContainer.cc	(revision 8706)
@@ -73,5 +73,5 @@
         {
             this->setForPlayer(true);
-            this->setTriggeringPlayer(pawn);
+            this->setTriggeringPawn(pawn);
         }
     }
Index: code/trunk/src/modules/objects/triggers/Trigger.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/Trigger.cc	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/Trigger.cc	(revision 8706)
@@ -76,5 +76,5 @@
         }
 
-        this->setSyncMode(0x0);
+        this->setSyncMode(ObjectDirection::None);
     }
 
Index: code/trunk/src/modules/objects/triggers/TriggerBase.cc
===================================================================
--- code/trunk/src/modules/objects/triggers/TriggerBase.cc	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/TriggerBase.cc	(revision 8706)
@@ -71,5 +71,5 @@
         this->bMultiTrigger_ = false;
 
-        this->setSyncMode(0x0);
+        this->setSyncMode(ObjectDirection::None);
     }
 
Index: code/trunk/src/modules/objects/triggers/TriggerBase.h
===================================================================
--- code/trunk/src/modules/objects/triggers/TriggerBase.h	(revision 8457)
+++ code/trunk/src/modules/objects/triggers/TriggerBase.h	(revision 8706)
@@ -133,4 +133,10 @@
             inline int getActivations(void) const
                 { return this->remainingActivations_; }
+            /**
+            @brief Check whether the trigger has still at least one remaining activation.
+            @return Returns true if the trigger has remaining activations (i.e. the number of remaining activations is not zero).
+            */
+            inline bool hasRemainingActivations(void) const
+                { return this->remainingActivations_ > 0 || this->remainingActivations_ == INF_s; }
 
             /**
