Index: /code/branches/portals/data/levels/portals.oxw
===================================================================
--- /code/branches/portals/data/levels/portals.oxw	(revision 8453)
+++ /code/branches/portals/data/levels/portals.oxw	(revision 8454)
@@ -10,4 +10,5 @@
   include("stats.oxo")
   include("templates/spaceshipAssff.oxt")
+  include("templates/pickupRepresentationTemplates.oxt")
   include("templates/lodInformation.oxt")
 ?>
@@ -26,16 +27,22 @@
   >
 
-    <Template name=portalDefault>
+    <Template name=PortalDefault>
         <PortalEndPoint>
             <attached>
-                <Billboard material="Examples/Flare" />
+                <Billboard material="Portals/Default" />
             </attached>
         </PortalEndPoint>
     </Template>
 
-    <PortalEndPoint position="0,0,0" id="1" distance="40" target="MobileEntity" design="portalDefault" eventTemplate="portalEventTemplate" />
-    <PortalEndPoint position="-400,0,0" id="2" distance="40" lookat="0,100,0" target="MobileEntity" design="portalDefault" />
+    <PortalEndPoint position="0,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/>
+    <PortalEndPoint position="-90,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/>
     <PortalLink fromID="1" toID="2" />
     <PortalLink fromID="2" toID="1" />
+
+    <PickupSpawner position="-100,0,0" triggerDistance="10" respawnTime="10" maxSpawnedItems="10">
+      <pickup>
+        <DronePickup template=dronepickup />
+      </pickup>
+    </PickupSpawner>
 
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
Index: /code/branches/portals/src/modules/portals/PortalEndPoint.cc
===================================================================
--- /code/branches/portals/src/modules/portals/PortalEndPoint.cc	(revision 8453)
+++ /code/branches/portals/src/modules/portals/PortalEndPoint.cc	(revision 8454)
@@ -53,4 +53,7 @@
     bool PortalEndPoint::execute(bool bTriggered, BaseObject* trigger)
     {
+        if(!this->isActive())
+            return true;
+        
         MultiTriggerContainer * cont = orxonox_cast<MultiTriggerContainer *>(trigger);
         if(cont == 0)
@@ -64,7 +67,4 @@
         }
         
-        if(this->getAttachedObjects().find(orxonox_cast<WorldEntity *>(originatingTrigger)) == this->getAttachedObjects().end())  // only necessary if events have the same name
-            return true;
-        
         MobileEntity * entity = orxonox_cast<MobileEntity *>(cont->getData());
         if(entity == 0)
@@ -73,5 +73,5 @@
         if(bTriggered)
         {
-            if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end())  // only enter the portal if not recently jumped out of it
+            if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end())  // only enter the portal if not just jumped out of it
             {
                 PortalLink::use(entity, this);
@@ -89,7 +89,9 @@
     {
         this->recentlyJumpedOut_.insert(entity);
+        
         entity->setPosition(this->getWorldPosition());
         entity->rotate(this->getWorldOrientation());
         entity->setVelocity(this->getWorldOrientation() * entity->getVelocity());
+        entity->setVelocity(entity->getVelocity() * 1.5);
     }
 
Index: /code/branches/portals/src/modules/portals/PortalEndPoint.h
===================================================================
--- /code/branches/portals/src/modules/portals/PortalEndPoint.h	(revision 8453)
+++ /code/branches/portals/src/modules/portals/PortalEndPoint.h	(revision 8454)
@@ -21,5 +21,5 @@
             virtual ~PortalEndPoint();
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            inline void setTargets(const std::string & targets)
+            inline void setTargets(const std::string & targets)                 //!< set types which are allowed to activate the PortalEndPoint 
             {
                 this->trigger_->addTargets(targets);
@@ -27,5 +27,5 @@
             
             void XMLEventPort(Element& xmlelement, XMLPort::Mode mode);
-            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints
+            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< Maps the id of each PortalEndPoint to a pointer to that PortalEndPoint
             inline void setID(unsigned int id)
             {
@@ -37,4 +37,6 @@
                 return this->id_;
             }
+            
+            /// \brief Set templateName_ (the name of the design Template) and add that Template to this Object
             inline void setTemplate(const std::string & name)
             {
@@ -42,18 +44,30 @@
                 this->addTemplate(name);
             }
+
+            /// \brief Get the name of the attached design template
             inline const std::string & getTemplate()
             {
                 return this->templateName_;
             }
+
+            /*! \brief This function is called each time the DistanceMultiTrigger of this PortalEndPoint changed
+             * \param bTriggered true if the trigger was triggered on, false if the trigger has switched to off
+             * \param trigger the MultiTriggerContainer containing the triggering BaseObject (and trigger_ the portal's MultiDistanceTrigger which we already know)
+             * 
+             * if bTriggered is \c true the triggering entity enters this portal (if it is an entrance)
+             * otherwise the triggering entity is removed from the set of entities who recently jumped out of this portal */
             bool execute(bool bTriggered, BaseObject* trigger);
+
+            /*! \brief Let an Entity jump out of this portal no matter where it was before
+             * \param entity The Entity which should jump out of this portal */
             void jumpOut(MobileEntity * entity);
         protected:
             
         private:
-            static const std::string EVENTFUNCTIONNAME;
+            static const std::string EVENTFUNCTIONNAME; //!< = "execute"
             
-            unsigned int id_;
-            DistanceMultiTrigger * trigger_;
-            std::string templateName_;
+            unsigned int id_;            //!< the hopefully (depends on the writer of the levelfile) unique id, which is used to establish links between PortalEndPoints
+            DistanceMultiTrigger * trigger_;      //!< the DistanceMultiTrigger which notices near entities of the defined type
+            std::string templateName_;            //!< The name of the design template used for this endpoint
 
             std::set<MobileEntity *> recentlyJumpedOut_; //!< Entities which recently jumped out of this EndPoint, hence they shouldn't be pulled in again if the endpoint is the beginning of a link
