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 8199)
@@ -0,0 +1,16 @@
+SET_SOURCE_FILES(PORTALS_SRC_FILES
+  PortalEndPoint.cc
+  PortalLink.cc
+)
+
+ORXONOX_ADD_LIBRARY(portals
+  MODULE
+  FIND_HEADER_FILES
+  TOLUA_FILES
+  PCH_FILE
+    PickupPrecompiledHeaders.h
+  LINK_LIBRARIES
+    orxonox
+    objects
+  SOURCE_FILES ${PORTALS_SRC_FILES}
+)
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 8199)
@@ -0,0 +1,54 @@
+#include "PortalEndPoint.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(PortalEndPoint);
+
+    std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
+
+    PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), material_(""), billboard_(0)
+    {
+        RegisterObject(PortalEndPoint);
+    }
+    
+    PortalEndPoint::~PortalEndPoint()
+    {
+      
+    }
+
+    void PortalEndPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        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)
+        {
+            PortalEndPoint::idMap_s[this->id_] = this;
+        }
+    }
+
+    void PortalEndPoint::tick(float dt)
+    {
+        SUPER(PortalEndPoint, tick);
+    }
+
+    void PortalEndPoint::jumpOut(WorldEntity* entity)
+    {
+        this->recentlyJumpedOut_.insert(entity);
+        entity->setPosition(this->getPosition());
+    }
+
+    bool PortalEndPoint::hasRecentlyJumpedOut(WorldEntity* entity)
+    {
+        if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end())
+        {
+            return false;
+        }
+        else
+            return true;
+    }
+
+}
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 8199)
@@ -0,0 +1,43 @@
+#ifndef _PortalEndPoint_H__
+#define _PortalEndPoint_H__
+
+#include <set>
+#include <string>
+#include <map>
+
+#include "StaticEntity.h"
+#include "graphics/Billboard.h"
+#include "modules/objects/triggers/DistanceMultiTrigger.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport PortalEndPoint : public DistanceMultiTrigger
+    {
+        public:
+            PortalEndPoint(BaseObject* creator);
+            virtual ~PortalEndPoint();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            //virtual void tick(float dt);
+            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints
+            inline void setID(unsigned int id)
+            {
+                this->id_ = id;
+            }
+            
+            inline unsigned int getID() const
+            {
+                return this->id_;
+            }
+            void jumpOut(WorldEntity * entity); //!< relocate an entity to the position of the endpoint and add it to the set of recentlyPortedOut entities
+            void tick(float dt);
+            bool hasRecentlyJumpedOut(WorldEntity * entity); //!< check if a certain entity recently jumped out of this endpoint
+        protected:
+        private:
+            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_;
+    };
+
+}
+
+#endif /* _Portals_H__ */
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 8199)
@@ -0,0 +1,58 @@
+#include "PortalLink.h"
+#include "core/XMLPort.h"
+#include "objects/triggers/MultiTriggerContainer.h"
+
+namespace orxonox
+{
+    CreateFactory(PortalLink);
+    
+    PortalLink::PortalLink(BaseObject* creator) : BaseObject(creator), fromID_(0), toID_(0), from_(0), to_(0), activationRadius_(20)
+    {
+        RegisterObject(PortalLink);
+    }
+    
+    PortalLink::~PortalLink()
+    {
+    }
+    
+    void PortalLink::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(PortalLink, XMLPort, xmlelement, mode);
+        XMLPortParam(PortalLink, "fromID", setFromID, getFromID, xmlelement, mode);
+        XMLPortParam(PortalLink, "toID", setToID, getToID, xmlelement, mode);
+
+        if(mode == XMLPort::LoadObject)
+        {
+            this->from_ = PortalEndPoint::idMap_s[this->fromID_];
+            this->to_   = PortalEndPoint::idMap_s[this->toID_];
+            recentlyPorted.clear();
+        }
+    }
+    
+    void PortalLink::tick(float dt)
+    {
+        SUPER(PortalLink, tick)
+    }
+    
+    void PortalLink::processEvent(Event& event)
+    {
+        SUPER(PortalLink, processEvent);
+        if(!event.activate_)
+        {
+            return;
+        }
+        MultiTriggerContainer * origin = dynamic_cast<MultiTriggerContainer *>(event.originator_);
+        if(!origin)
+        {
+            return;
+        }
+        PortalEndPoint * eventFrom = dynamic_cast<PortalEndPoint *>(origin->getOriginator());
+        WorldEntity * eventEntity = dynamic_cast<WorldEntity *>(origin->getData());
+        if(eventFrom != this->from_ || !eventEntity || eventFrom->hasRecentlyJumpedOut(eventEntity) == true)
+        {
+            return;
+        }
+        to_->jumpOut(entity);
+    }
+
+}
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 8199)
@@ -0,0 +1,54 @@
+#ifndef _PortalLink_H__
+#define _PortalLink_H__
+
+#include "OrxonoxPrereqs.h"
+#include "tools/interfaces/Tickable.h"
+#include "core/BaseObject.h"
+#include "PortalEndPoint.h"
+#include "objects/eventsystem/EventListener.h"
+
+#include <set>
+
+namespace orxonox
+{
+    class _OrxonoxExport PortalLink : public EventListener
+    {
+        public:
+            PortalLink(BaseObject* creator);
+            virtual ~PortalLink();
+    
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void tick(float dt);
+            inline void setFromID(unsigned int from)
+            {
+                this->fromID_ = from;
+            }
+            inline unsigned int getFromID(unsigned int) const
+            {
+                return this->fromID_;
+            }
+            inline void setToID(unsigned int to)
+            {
+                this->toID_ = to;
+            }
+            inline unsigned int getToID(unsigned int) const
+            {
+                return this->toID_;
+            }
+            void use(WorldEntity * entity);
+            virtual void processEvent(Event& event);
+        protected:
+        private:
+            unsigned int fromID_;
+            unsigned int toID_;
+            PortalEndPoint* from_;
+            PortalEndPoint* to_;
+            float activationRadius_;
+            std::set<WorldEntity *> recentlyPorted;
+            ObjectList<WorldEntity>::iterator it_;
+            bool isNowPortable(WorldEntity * ent);
+    };
+
+}
+
+#endif /* _Portals_H__ */
Index: code/branches/portals/src/modules/portals/PortalPrecompiledHeaders.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalPrecompiledHeaders.h	(revision 8199)
+++ code/branches/portals/src/modules/portals/PortalPrecompiledHeaders.h	(revision 8199)
@@ -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/PortalPrereqs.h
===================================================================
--- code/branches/portals/src/modules/portals/PortalPrereqs.h	(revision 8199)
+++ code/branches/portals/src/modules/portals/PortalPrereqs.h	(revision 8199)
@@ -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__ */
Index: code/branches/portals/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/portals/src/orxonox/worldentities/CMakeLists.txt	(revision 8198)
+++ code/branches/portals/src/orxonox/worldentities/CMakeLists.txt	(revision 8199)
@@ -12,6 +12,4 @@
   SpawnPoint.cc
   TeamSpawnPoint.cc
-  PortalEndPoint.cc
-  PortalLink.cc
 )
 
Index: code/branches/portals/src/orxonox/worldentities/PortalEndPoint.cc
===================================================================
--- code/branches/portals/src/orxonox/worldentities/PortalEndPoint.cc	(revision 8198)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#include "PortalEndPoint.h"
-#include "core/XMLPort.h"
-
-namespace orxonox
-{
-    CreateFactory(PortalEndPoint);
-
-    std::map<unsigned int, PortalEndPoint *> PortalEndPoint::idMap_s;
-
-    PortalEndPoint::PortalEndPoint(BaseObject* creator) : StaticEntity(creator), id_(0), material_(""), billboard_(0)
-    {
-        RegisterObject(PortalEndPoint);
-    }
-    
-    PortalEndPoint::~PortalEndPoint()
-    {
-      
-    }
-
-    void PortalEndPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        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)
-        {
-            PortalEndPoint::idMap_s[this->id_] = this;
-        }
-    }
-
-    void PortalEndPoint::tick(float dt)
-    {
-        SUPER(PortalEndPoint, tick);
-    }
-
-    void PortalEndPoint::jumpOut(WorldEntity* entity)
-    {
-        this->recentlyJumpedOut_.insert(entity);
-        entity->setPosition(this->getPosition());
-    }
-
-    bool PortalEndPoint::hasRecentlyJumpedOut(WorldEntity* entity)
-    {
-        if(this->recentlyJumpedOut_.find(entity) == this->recentlyJumpedOut_.end())
-        {
-            return false;
-        }
-        else
-            return true;
-    }
-
-}
Index: code/branches/portals/src/orxonox/worldentities/PortalEndPoint.h
===================================================================
--- code/branches/portals/src/orxonox/worldentities/PortalEndPoint.h	(revision 8198)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#ifndef _PortalEndPoint_H__
-#define _PortalEndPoint_H__
-
-#include <set>
-#include <string>
-#include <map>
-
-#include "StaticEntity.h"
-#include "graphics/Billboard.h"
-#include "../../modules/objects/triggers/DistanceMultiTrigger.h"
-
-namespace orxonox
-{
-    class _OrxonoxExport PortalEndPoint : public DistanceMultiTrigger
-    {
-        public:
-            PortalEndPoint(BaseObject* creator);
-            virtual ~PortalEndPoint();
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            //virtual void tick(float dt);
-            static std::map<unsigned int, PortalEndPoint *> idMap_s; //!< maps integer id values to portalendpoints
-            inline void setID(unsigned int id)
-            {
-                this->id_ = id;
-            }
-            
-            inline unsigned int getID() const
-            {
-                return this->id_;
-            }
-            void jumpOut(WorldEntity * entity); //!< relocate an entity to the position of the endpoint and add it to the set of recentlyPortedOut entities
-            void tick(float dt);
-            bool hasRecentlyJumpedOut(WorldEntity * entity); //!< check if a certain entity recently jumped out of this endpoint
-        protected:
-        private:
-            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_;
-    };
-
-}
-
-#endif /* _Portals_H__ */
Index: code/branches/portals/src/orxonox/worldentities/PortalLink.cc
===================================================================
--- code/branches/portals/src/orxonox/worldentities/PortalLink.cc	(revision 8198)
+++ 	(revision )
@@ -1,58 +1,0 @@
-#include "PortalLink.h"
-#include "core/XMLPort.h"
-#include "objects/triggers/MultiTriggerContainer.h"
-
-namespace orxonox
-{
-    CreateFactory(PortalLink);
-    
-    PortalLink::PortalLink(BaseObject* creator) : BaseObject(creator), fromID_(0), toID_(0), from_(0), to_(0), activationRadius_(20)
-    {
-        RegisterObject(PortalLink);
-    }
-    
-    PortalLink::~PortalLink()
-    {
-    }
-    
-    void PortalLink::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(PortalLink, XMLPort, xmlelement, mode);
-        XMLPortParam(PortalLink, "fromID", setFromID, getFromID, xmlelement, mode);
-        XMLPortParam(PortalLink, "toID", setToID, getToID, xmlelement, mode);
-
-        if(mode == XMLPort::LoadObject)
-        {
-            this->from_ = PortalEndPoint::idMap_s[this->fromID_];
-            this->to_   = PortalEndPoint::idMap_s[this->toID_];
-            recentlyPorted.clear();
-        }
-    }
-    
-    void PortalLink::tick(float dt)
-    {
-        SUPER(PortalLink, tick)
-    }
-    
-    void PortalLink::processEvent(Event& event)
-    {
-        SUPER(PortalLink, processEvent);
-        if(!event.activate_)
-        {
-            return;
-        }
-        MultiTriggerContainer * origin = dynamic_cast<MultiTriggerContainer *>(event.originator_);
-        if(!origin)
-        {
-            return;
-        }
-        PortalEndPoint * eventFrom = dynamic_cast<PortalEndPoint *>(origin->getOriginator());
-        WorldEntity * eventEntity = dynamic_cast<WorldEntity *>(origin->getData());
-        if(eventFrom != this->from_ || !eventEntity || eventFrom->hasRecentlyJumpedOut(eventEntity) == true)
-        {
-            return;
-        }
-        to_->jumpOut(entity);
-    }
-
-}
Index: code/branches/portals/src/orxonox/worldentities/PortalLink.h
===================================================================
--- code/branches/portals/src/orxonox/worldentities/PortalLink.h	(revision 8198)
+++ 	(revision )
@@ -1,54 +1,0 @@
-#ifndef _PortalLink_H__
-#define _PortalLink_H__
-
-#include "OrxonoxPrereqs.h"
-#include "tools/interfaces/Tickable.h"
-#include "core/BaseObject.h"
-#include "PortalEndPoint.h"
-#include "objects/eventsystem/EventListener.h"
-
-#include <set>
-
-namespace orxonox
-{
-    class _OrxonoxExport PortalLink : public EventListener
-    {
-        public:
-            PortalLink(BaseObject* creator);
-            virtual ~PortalLink();
-    
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-            virtual void tick(float dt);
-            inline void setFromID(unsigned int from)
-            {
-                this->fromID_ = from;
-            }
-            inline unsigned int getFromID(unsigned int) const
-            {
-                return this->fromID_;
-            }
-            inline void setToID(unsigned int to)
-            {
-                this->toID_ = to;
-            }
-            inline unsigned int getToID(unsigned int) const
-            {
-                return this->toID_;
-            }
-            void use(WorldEntity * entity);
-            virtual void processEvent(Event& event);
-        protected:
-        private:
-            unsigned int fromID_;
-            unsigned int toID_;
-            PortalEndPoint* from_;
-            PortalEndPoint* to_;
-            float activationRadius_;
-            std::set<WorldEntity *> recentlyPorted;
-            ObjectList<WorldEntity>::iterator it_;
-            bool isNowPortable(WorldEntity * ent);
-    };
-
-}
-
-#endif /* _Portals_H__ */
