Index: code/branches/portals/data/levels/portals.oxw
===================================================================
--- code/branches/portals/data/levels/portals.oxw	(revision 8199)
+++ code/branches/portals/data/levels/portals.oxw	(revision 8200)
@@ -27,7 +27,15 @@
 
 
-   <PortalEndPoint position="0,0,0" material="Examples/Flare" id="1"/>
-   <PortalEndPoint position="-100,0,0" material="Examples/Flare" id="2"/>
-   <PortalLink fromID="1" toID="2" />
+	<PortalEndPoint position="0,0,0" id="1">
+		<attached>
+			<Billboard material="Examples/Flare" />
+		</attached>
+	</PortalEndPoint>
+	<PortalEndPoint position="-100,0,0" id="2">
+		<attached>
+			<Billboard material="Examples/Flare2" />
+		</attached>
+	</PortalEndPoint>
+	<PortalLink fromID="1" toID="2" />
 
     <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/CMakeLists.txt
===================================================================
--- code/branches/portals/src/modules/CMakeLists.txt	(revision 8199)
+++ code/branches/portals/src/modules/CMakeLists.txt	(revision 8200)
@@ -32,4 +32,5 @@
 ADD_SUBDIRECTORY(pickup)
 ADD_SUBDIRECTORY(pong)
+ADD_SUBDIRECTORY(portals)
 ADD_SUBDIRECTORY(questsystem)
 ADD_SUBDIRECTORY(weapons)
Index: code/branches/portals/src/modules/objects/triggers/MultiTrigger.cc
===================================================================
--- code/branches/portals/src/modules/objects/triggers/MultiTrigger.cc	(revision 8199)
+++ code/branches/portals/src/modules/objects/triggers/MultiTrigger.cc	(revision 8200)
@@ -116,5 +116,5 @@
         }
 
-        // Check if the object is active (this is NOT MultiTrigger::isActive()!)
+        // Check if the object is active (this is NOT MultiTrigger::isActive()!), it is whether the MultiTrigger actually does anything, ever. 
         if (!this->BaseObject::isActive())
             return;
@@ -205,5 +205,5 @@
                             {
                                 // If the MultiTrigger has not exceeded its remaining activations.
-                                if(this->remainingActivations_ > 0)
+                                if(this->hasRemainingActivations())
                                 {
                                     this->active_.insert(state->originator);
@@ -218,5 +218,5 @@
                             {
                                 // If the MultiTrigger doesn't stay active or hasn't' exceeded its remaining activations.
-                                if(!this->getStayActive() || this->remainingActivations_ > 0)
+                                if(!this->getStayActive() || this->hasRemainingActivations())
                                     this->active_.erase(state->originator);
                                 else
Index: code/branches/portals/src/modules/objects/triggers/TriggerBase.h
===================================================================
--- code/branches/portals/src/modules/objects/triggers/TriggerBase.h	(revision 8199)
+++ code/branches/portals/src/modules/objects/triggers/TriggerBase.h	(revision 8200)
@@ -186,4 +186,7 @@
                 { if(activations >= 0 || activations == INF_s) this->remainingActivations_ = activations; }
 
+			inline bool hasRemainingActivations(void)
+				{ return this->remainingActivations_ == INF_s || this->remainingActivations_  > 0; } 
+
             /**
             @brief Adds the parent of a MultiTrigger.
Index: code/branches/portals/src/modules/portals/CMakeLists.txt
===================================================================
--- code/branches/portals/src/modules/portals/CMakeLists.txt	(revision 8199)
+++ code/branches/portals/src/modules/portals/CMakeLists.txt	(revision 8200)
@@ -9,5 +9,5 @@
   TOLUA_FILES
   PCH_FILE
-    PickupPrecompiledHeaders.h
+    PortalsPrecompiledHeaders.h
   LINK_LIBRARIES
     orxonox
Index: code/branches/portals/src/modules/portals/PortalEndPoint.cc
===================================================================
--- code/branches/portals/src/modules/portals/PortalEndPoint.cc	(revision 8199)
+++ code/branches/portals/src/modules/portals/PortalEndPoint.cc	(revision 8200)
@@ -8,5 +8,5 @@
     std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
 
-    PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), material_(""), billboard_(0)
+    PortalEndPoint::PortalEndPoint(BaseObject* creator) : DistanceMultiTrigger(creator), id_(0)
     {
         RegisterObject(PortalEndPoint);
@@ -22,6 +22,4 @@
         SUPER(PortalEndPoint, XMLPort, xmlelement, mode);
         XMLPortParam(PortalEndPoint, "id", setID, getID, xmlelement, mode);
-        XMLPortParamExtern(PortalEndPoint, Billboard, this->billboard_, "material", setMaterial, getMaterial, xmlelement, mode);
-        XMLPortParamExtern(PortalEndPoint, Billboard, this->billboard_, "colour", setColour, getColour, xmlelement, mode).defaultValues(ColourValue::White);
         
         if(mode == XMLPort::LoadObject)
@@ -33,5 +31,5 @@
     void PortalEndPoint::tick(float dt)
     {
-        SUPER(PortalEndPoint, tick);
+        SUPER(PortalEndPoint, tick, dt);
     }
 
Index: code/branches/portals/src/modules/portals/PortalEndPoint.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalEndPoint.h	(revision 8199)
+++ code/branches/portals/src/modules/portals/PortalEndPoint.h	(revision 8200)
@@ -1,4 +1,6 @@
 #ifndef _PortalEndPoint_H__
 #define _PortalEndPoint_H__
+
+#include "portals/PortalsPrereqs.h"
 
 #include <set>
@@ -6,11 +8,11 @@
 #include <map>
 
-#include "StaticEntity.h"
+#include "worldentities/StaticEntity.h"
 #include "graphics/Billboard.h"
-#include "modules/objects/triggers/DistanceMultiTrigger.h"
+#include "objects/triggers/DistanceMultiTrigger.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport PortalEndPoint : public DistanceMultiTrigger
+    class _PortalsExport PortalEndPoint : public DistanceMultiTrigger
     {
         public:
@@ -36,5 +38,4 @@
             unsigned int id_;
             std::set<WorldEntity *> 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
-            Billboard billboard_;
     };
 
Index: code/branches/portals/src/modules/portals/PortalLink.cc
===================================================================
--- code/branches/portals/src/modules/portals/PortalLink.cc	(revision 8199)
+++ code/branches/portals/src/modules/portals/PortalLink.cc	(revision 8200)
@@ -7,5 +7,5 @@
     CreateFactory(PortalLink);
     
-    PortalLink::PortalLink(BaseObject* creator) : BaseObject(creator), fromID_(0), toID_(0), from_(0), to_(0), activationRadius_(20)
+    PortalLink::PortalLink(BaseObject* creator) : EventListener(creator), fromID_(0), toID_(0), from_(0), to_(0), activationRadius_(20)
     {
         RegisterObject(PortalLink);
@@ -32,10 +32,10 @@
     void PortalLink::tick(float dt)
     {
-        SUPER(PortalLink, tick)
+        SUPER(PortalLink, tick, dt);
     }
     
     void PortalLink::processEvent(Event& event)
     {
-        SUPER(PortalLink, processEvent);
+        EventListener::processEvent(event);
         if(!event.activate_)
         {
@@ -53,5 +53,5 @@
             return;
         }
-        to_->jumpOut(entity);
+        to_->jumpOut(eventEntity);
     }
 
Index: code/branches/portals/src/modules/portals/PortalLink.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalLink.h	(revision 8199)
+++ code/branches/portals/src/modules/portals/PortalLink.h	(revision 8200)
@@ -2,5 +2,5 @@
 #define _PortalLink_H__
 
-#include "OrxonoxPrereqs.h"
+#include "portals/PortalsPrereqs.h"
 #include "tools/interfaces/Tickable.h"
 #include "core/BaseObject.h"
@@ -12,5 +12,5 @@
 namespace orxonox
 {
-    class _OrxonoxExport PortalLink : public EventListener
+    class _PortalsExport PortalLink : public EventListener
     {
         public:
Index: code/branches/portals/src/modules/portals/PortalPrecompiledHeaders.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalPrecompiledHeaders.h	(revision 8199)
+++ 	(revision )
@@ -1,53 +1,0 @@
-/*
- *   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:
- *      Reto Grieder
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-@file
-@brief
-*/
-
-#include "OrxonoxConfig.h"
-
-///////////////////////////////////////////
-/////          Stable Headers         /////
-///////////////////////////////////////////
-
-#include <LinearMath/btTransform.h>
-
-///////////////////////////////////////////
-/////       All Rebuild Headers       /////
-///////////////////////////////////////////
-
-#include "core/BaseObject.h"
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-
-
-// Just in case some header included windows.h
-#undef min
-#undef max
Index: code/branches/portals/src/modules/portals/PortalPrereqs.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalPrereqs.h	(revision 8199)
+++ 	(revision )
@@ -1,73 +1,0 @@
-/*
- *   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
-    Shared library macros, enums, constants and forward declarations for the questsystem module
-*/
-
-#ifndef _PortalsPrereqs_H__
-#define _PortalsPrereqs_H__
-
-#include "OrxonoxConfig.h"
-#include "OrxonoxPrereqs.h"
-
-//-----------------------------------------------------------------------
-// Shared library settings
-//-----------------------------------------------------------------------
-
-#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Portals_STATIC_BUILD)
-#  ifdef Portals_SHARED_BUILD
-#    define _PortalsExport __declspec(dllexport)
-#  else
-#    if defined( __MINGW32__ )
-#      define _PortalsExport
-#    else
-#      define _PortalsExport __declspec(dllimport)
-#    endif
-#  endif
-#elif defined ( ORXONOX_GCC_VISIBILITY )
-#  define _PortalsExport  __attribute__ ((visibility("default")))
-#else
-#  define _PortalsExport
-#endif
-
-//-----------------------------------------------------------------------
-// Forward declarations
-//-----------------------------------------------------------------------
-
-namespace orxonox
-{
-
-    class PortalEndPoint;
-    class PortalLink;
-
-}
-
-#endif /* _PortalsPrereqs_H__ */
Index: code/branches/portals/src/modules/portals/PortalsPrecompiledHeaders.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalsPrecompiledHeaders.h	(revision 8200)
+++ code/branches/portals/src/modules/portals/PortalsPrecompiledHeaders.h	(revision 8200)
@@ -0,0 +1,53 @@
+/*
+ *   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:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+@file
+@brief
+*/
+
+#include "OrxonoxConfig.h"
+
+///////////////////////////////////////////
+/////          Stable Headers         /////
+///////////////////////////////////////////
+
+#include <LinearMath/btTransform.h>
+
+///////////////////////////////////////////
+/////       All Rebuild Headers       /////
+///////////////////////////////////////////
+
+#include "core/BaseObject.h"
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+
+// Just in case some header included windows.h
+#undef min
+#undef max
Index: code/branches/portals/src/modules/portals/PortalsPrereqs.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalsPrereqs.h	(revision 8200)
+++ code/branches/portals/src/modules/portals/PortalsPrereqs.h	(revision 8200)
@@ -0,0 +1,73 @@
+/*
+ *   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
+    Shared library macros, enums, constants and forward declarations for the questsystem module
+*/
+
+#ifndef _PortalsPrereqs_H__
+#define _PortalsPrereqs_H__
+
+#include "OrxonoxConfig.h"
+#include "OrxonoxPrereqs.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+
+#if defined(ORXONOX_PLATFORM_WINDOWS) && !defined(Portals_STATIC_BUILD)
+#  ifdef Portals_SHARED_BUILD
+#    define _PortalsExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _PortalsExport
+#    else
+#      define _PortalsExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _PortalsExport  __attribute__ ((visibility("default")))
+#else
+#  define _PortalsExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+namespace orxonox
+{
+
+    class PortalEndPoint;
+    class PortalLink;
+
+}
+
+#endif /* _PortalsPrereqs_H__ */
