Index: code/branches/dockingsystem/data/levels/docking.oxw
===================================================================
--- code/branches/dockingsystem/data/levels/docking.oxw	(revision 8153)
+++ code/branches/dockingsystem/data/levels/docking.oxw	(revision 8185)
@@ -32,6 +32,21 @@
 
 
-	<!-- stolen from underAttack.oxw -->
+    <Dock>
+        <effects>
+            <DockToShip />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockMe" />
+            </execute>
+        </events>
+        <attached>
+            <DistanceTrigger position="0,0,0" distance="20" target="ControllableEntity" name="dockMe" />
+            <Billboard material="Examples/Flare" colour="1.0, 0, 0" />
+        </attached>
+    </Dock>
 
+
+    <!-- 
     <Destroyer
       position          = "100,150,0"
@@ -46,19 +61,4 @@
 
       <attached>
-
-		<Dock>
-			<effects>
-				<DockToShip />
-			</effects>
-            <events>
-                <execute>
-                    <EventListener event="dockMe" />
-                </execute>
-            </events>
-            <attached>
-                <DistanceTrigger position="0,0,0" distance=2 target="ControllableEntity" name="dockMe" />
-            </attached>
-        </Dock>
-
         <TeamSpawnPoint team=1 position="150,0,7" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
         <TeamSpawnPoint team=1 position="0,0,7" lookat="-1,0,0" roll="90"  yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
@@ -147,5 +147,5 @@
       </collisionShapes>
     </Destroyer>
-
+    //-->
 
   </Scene>
Index: code/branches/dockingsystem/src/modules/docking/Dock.cc
===================================================================
--- code/branches/dockingsystem/src/modules/docking/Dock.cc	(revision 8153)
+++ code/branches/dockingsystem/src/modules/docking/Dock.cc	(revision 8185)
@@ -37,11 +37,10 @@
 namespace orxonox
 {
-
-	CreateFactory(Dock);
+    CreateFactory(Dock);
 
     Dock::Dock(BaseObject* creator) : StaticEntity(creator)
     {
         RegisterObject(Dock);
-		COUT(0) << "Registering dock..." << std::endl;
+        COUT(0) << "Registering dock..." << std::endl;
     }
 
@@ -70,18 +69,30 @@
 
     bool Dock::execute(bool bTriggered, BaseObject* trigger)
-	{
-		COUT(0) << "Dock executed (bTriggered = " << (bTriggered? "true":"false") << ").." << std::endl;
-		return true;
-	}
+    {
+        COUT(0) << "Dock executed (bTriggered = " << (bTriggered? "true":"false") << ").." << std::endl;
+
+        //TODO: Handle MultiDistanceTrigger
+
+        //TODO: This way too oversimplified
+        if(bTriggered) {
+            DockingEffect::invokeEffect(docking::DOCKING, NULL, effects_);
+            DockingEffect::invokeEffect(docking::ATTACH, NULL, effects_);
+        } else {
+            DockingEffect::invokeEffect(docking::RELEASE, NULL, effects_);
+        }
 
 
-	bool Dock::addEffect(DockingEffect* effect) {
-		assert(effect);
-		effects_.push_back(effect);
-		return true;
-	}
-    
-	const DockingEffect* Dock::getEffect(unsigned int index) const {
-		int i = index;
+        return true;
+    }
+
+
+    bool Dock::addEffect(DockingEffect* effect) {
+        assert(effect);
+        effects_.push_back(effect);
+        return true;
+    }
+
+    const DockingEffect* Dock::getEffect(unsigned int index) const {
+        int i = index;
         for (std::list<DockingEffect*>::const_iterator effect = this->effects_.begin(); effect != this->effects_.end(); ++effect)
         {
@@ -92,5 +103,4 @@
         }
         return NULL;
-	}
-
+    }
 }
Index: code/branches/dockingsystem/src/modules/docking/Dock.h
===================================================================
--- code/branches/dockingsystem/src/modules/docking/Dock.h	(revision 8153)
+++ code/branches/dockingsystem/src/modules/docking/Dock.h	(revision 8185)
@@ -47,7 +47,7 @@
 
 
-	class _DockingExport Dock : public StaticEntity {
-	public:
-		Dock(BaseObject* creator);
+    class _DockingExport Dock : public StaticEntity {
+    public:
+        Dock(BaseObject* creator);
         virtual ~Dock();
 
@@ -57,10 +57,10 @@
         bool execute(bool bTriggered, BaseObject* trigger);
 
-	private:
-		std::list<DockingEffect*> effects_; //!< The list of DockingEffects to be executed when a player docks.
-
         bool addEffect(DockingEffect* effect); //!< Add a DockingEffect to the Dock.
         const DockingEffect* getEffect(unsigned int index) const; //!< Get the DockingEffect at a given index.
-	};
+
+    private:
+        std::list<DockingEffect*> effects_; //!< The list of DockingEffects to be executed when a player docks.
+    };
 
 
Index: code/branches/dockingsystem/src/modules/docking/DockToShip.cc
===================================================================
--- code/branches/dockingsystem/src/modules/docking/DockToShip.cc	(revision 8153)
+++ code/branches/dockingsystem/src/modules/docking/DockToShip.cc	(revision 8185)
@@ -0,0 +1,70 @@
+/*
+ *   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 DockToShip.cc
+    @brief Implementation of the DockToShip class.
+*/
+
+#include "DockingEffect.h"
+#include "DockToShip.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    CreateFactory(DockToShip);
+
+    DockToShip::DockToShip(BaseObject* creator) : DockingEffect(creator)
+    {
+        RegisterObject(DockToShip);
+        COUT(0) << "DockToShip instance created.." << endl;
+    }
+
+    DockToShip::~DockToShip()
+    {
+
+    }
+
+    bool DockToShip::docking(PlayerInfo* player)
+    {
+        COUT(0) << "DockToShip::docking" << endl;
+        return true;
+    }
+
+    bool DockToShip::attach(PlayerInfo* player)
+    {
+        COUT(0) << "DockToShip::attach" << endl;
+        return true;
+    }
+
+    bool DockToShip::release(PlayerInfo* player)
+    {
+        COUT(0) << "DockToShip::release" << endl;
+        return true;
+    }
+}
Index: code/branches/dockingsystem/src/modules/docking/DockToShip.h
===================================================================
--- code/branches/dockingsystem/src/modules/docking/DockToShip.h	(revision 8153)
+++ code/branches/dockingsystem/src/modules/docking/DockToShip.h	(revision 8185)
@@ -0,0 +1,67 @@
+/*
+ *   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:
+ *      Sven Stucki
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file DockToShip.h
+    @brief DockingEffect which transfers control from spaceship to docked ship ASDF
+    @ingroup Docking
+*/
+
+#ifndef _DockToShip_H__
+#define _DockToShip_H__
+
+#include "DockingPrereqs.h"
+#include "DockToShip.h"
+
+
+namespace orxonox
+{
+
+    /**
+    @brief
+        Allows players to dock onto a ship
+
+    @author
+        Sven Stucki
+
+    @ingroup Docking
+    */
+    class _DockingExport DockToShip : public DockingEffect
+    {
+        public:
+            DockToShip(BaseObject* creator);
+            virtual ~DockToShip();
+
+            virtual bool docking(PlayerInfo* player); //!< Called when docking starts
+            virtual bool attach(PlayerInfo* player); //!< Called after docking animation
+            virtual bool release(PlayerInfo* player); //!< Called when player wants undock
+    };
+
+}
+
+#endif /* _DockToShip_H__ */
Index: code/branches/dockingsystem/src/modules/docking/DockingEffect.cc
===================================================================
--- code/branches/dockingsystem/src/modules/docking/DockingEffect.cc	(revision 8153)
+++ code/branches/dockingsystem/src/modules/docking/DockingEffect.cc	(revision 8185)
@@ -47,5 +47,5 @@
     }
 
-    bool DockingEffect::invokeEffects(PlayerInfo* player, std::list<DockingEffect*> & effects)
+    bool DockingEffect::invokeEffect(docking::event event, PlayerInfo* player, std::list<DockingEffect*> & effects)
     {
         bool check = true;
@@ -53,6 +53,19 @@
         COUT(4) << "Invoking DockingEffects on player: " << player << " ."  << std::endl;
 
-        for (std::list<DockingEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++)
-            check = check	;// && (*effect)->invoke(player);  TODO
+        for (std::list<DockingEffect*>::iterator effect = effects.begin(); effect != effects.end(); effect++) {
+            switch(event) {
+                case docking::DOCKING:
+                    check &= (*effect)->docking(player);
+                    break;
+                case docking::ATTACH:
+                    check &= (*effect)->attach(player);
+                    break;
+                case docking::RELEASE:
+                    check &= (*effect)->release(player);
+                    break;
+                default:
+                    assert(0);
+            }
+        }
 
         return check;
Index: code/branches/dockingsystem/src/modules/docking/DockingEffect.h
===================================================================
--- code/branches/dockingsystem/src/modules/docking/DockingEffect.h	(revision 8153)
+++ code/branches/dockingsystem/src/modules/docking/DockingEffect.h	(revision 8185)
@@ -43,4 +43,11 @@
 namespace orxonox
 {
+    namespace docking {
+        enum event {
+            DOCKING,
+            ATTACH,
+            RELEASE
+        };
+    }
 
     /**
@@ -60,8 +67,8 @@
 
             virtual bool docking(PlayerInfo* player) = 0; //!< Called when docking starts
-			virtual bool attach(PlayerInfo* player) = 0; //!< Called after docking animation
-			virtual bool release(PlayerInfo* player) = 0; //!< Called when player wants undock
+            virtual bool attach(PlayerInfo* player) = 0; //!< Called after docking animation
+            virtual bool release(PlayerInfo* player) = 0; //!< Called when player wants undock
 
-            static bool invokeEffects(PlayerInfo* player, std::list<DockingEffect*> & effects); //!< Invokes all DockingEffects in the list.
+            static bool invokeEffect(docking::event event, PlayerInfo* player, std::list<DockingEffect*> & effects); //!< Invokes the event specific method of all DockingEffects in the list
     };
 
Index: code/branches/dockingsystem/src/modules/docking/DockingPrereqs.h
===================================================================
--- code/branches/dockingsystem/src/modules/docking/DockingPrereqs.h	(revision 8153)
+++ code/branches/dockingsystem/src/modules/docking/DockingPrereqs.h	(revision 8185)
@@ -66,5 +66,6 @@
 {
     class Dock;
-	class DockingEffect;
+    class DockingEffect;
+    class DockToShip;
 }
 
Index: code/branches/dockingsystem/src/orxonox/infos/PlayerInfo.cc
===================================================================
--- code/branches/dockingsystem/src/orxonox/infos/PlayerInfo.cc	(revision 8153)
+++ code/branches/dockingsystem/src/orxonox/infos/PlayerInfo.cc	(revision 8185)
@@ -224,5 +224,5 @@
 
         this->controllableEntity_->setController(0);
-        
+
         this->controllableEntity_ = this->oldControllableEntity_;
         this->controllableEntityID_ = this->controllableEntity_->getObjectID();
