Index: code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw
===================================================================
--- code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw	(revision 9857)
+++ code/branches/spacestationentry/data/levels/dockingToASpaceStation.oxw	(revision 9885)
@@ -93,11 +93,12 @@
         </events>
         <attached>
+	<!-- Trigger for docking with billboard -->
             <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
             <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
                 beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
             />
-
-	    <Billboard position="-2730,-19970,50" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
-	    <DistanceTrigger position="-2730,-19970,50" distance="50" target="Pawn"
+	<!-- Trigger for undocking with billboard -->
+	    <Billboard position="-2630,-19970,150" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
+	    <DistanceTrigger position="-2630,-19970,150" distance="50" target="Pawn"
                 beaconMode="identify" targetname="bcnDestroyer" name="undockMe"
             />
@@ -105,5 +106,6 @@
 
     </Dock>
-    
+
+<!-- FPS Player as destination of the dock -->
 <FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-19900,0" >
       <attached>
@@ -114,6 +116,11 @@
 </FpsPlayer>
 
-<!-- Wuerfel -->
 
+<!-- Cube as test SpaceStation
+
+The station can either be hidden outside of the skybox, within the hull of the space station if it is big enough or within a planet.
+Complex spacestations can be placed very far away from the spaceship so it is rendered at low resolution while the player uses the space ship.
+
+-->
   <StaticEntity position="0,-20000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 >
       <attached>
@@ -125,9 +132,9 @@
   </StaticEntity>
 
-<!-- Schwerkraftfeld -->
+<!-- Homogenous gravitationfield to simulate local gravity (activating the normal gravity will affect the spaceship terribly) -->
+<ForceField position="0,-20000,0" mode="homogen" diameter="2000" forcedirection = "0,-500,0" />
 
-<ForceField position="0,-20000,0" mode="homogen" diameter="2000" forcedirection = "0,-400,0" />
 
-<!-- Rest -->
+<!-- Some more stuff -->
 
     <!-- triple large belt around the planet  -->
Index: code/branches/spacestationentry/src/modules/docking/Dock.cc
===================================================================
--- code/branches/spacestationentry/src/modules/docking/Dock.cc	(revision 9857)
+++ code/branches/spacestationentry/src/modules/docking/Dock.cc	(revision 9885)
@@ -85,39 +85,43 @@
     bool Dock::undocking(bool bTriggered, BaseObject* trigger)
     {
-    	// Noch lange nicht fertig (leich veraenderte Kopie von execute())
+
     	PlayerTrigger* pTrigger = orxonox_cast<PlayerTrigger*>(trigger);
-    	        PlayerInfo* player = NULL;
-
-    	        // Check whether it is a player trigger and extract pawn from it
-    	        if(pTrigger != NULL)
-    	        {
-    	            if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
-    	                orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl;
-    	                return false;
-    	            }
-    	            player = pTrigger->getTriggeringPlayer();
-    	        }
-    	        else
-    	        {
-    	            orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl;
-    	            return false;
-    	        }
-    	        if(player == NULL)
-    	        {
-    	            orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
-    	            return false;
-    	        }
-
-    	        if(bTriggered)
-    	        {
-    	            cmdUndock();
-    	        }
-    	        else
-    	        {
-    	            // Remove player from candidates list
-    	            candidates_.erase(player);
-    	        }
-
-    	        return true;
+    	PlayerInfo* player = NULL;
+
+    	// Check whether it is a player trigger and extract pawn from it
+    	if(pTrigger != NULL)
+    	{
+    	      if(!pTrigger->isForPlayer()) {  // The PlayerTrigger is not exclusively for Pawns which means we cannot extract one.
+    	      orxout(verbose, context::docking) << "Docking:execute PlayerTrigger was not triggered by a player.." << endl;
+    	      return false;
+    	      }
+    	      player = pTrigger->getTriggeringPlayer();
+    	}
+    	else
+    	{
+    	      orxout(verbose, context::docking) << "Docking::execute Not a player trigger, can't extract pawn from it.." << endl;
+    	      return false;
+    	}
+    	if(player == NULL)
+    	{
+    	      orxout(verbose, context::docking) << "Docking::execute Can't retrieve PlayerInfo from Trigger. (" << trigger->getIdentifier()->getName() << ")" << endl;
+    	      return false;
+    	}
+
+ 	    if(bTriggered)
+    	{
+    	      // Add player to this Docks candidates
+    	      candidates_.insert(player);
+
+    	      // Show docking dialog
+    	      this->showUndockingDialogHelper(player);
+    	}
+    	else
+    	{
+    	      // Remove player from candidates list
+    	      candidates_.erase(player);
+    	}
+
+    	return true;
     }
 
@@ -166,4 +170,21 @@
     }
 
+
+    void Dock::showUndockingDialogHelper(PlayerInfo* player)
+        {
+            assert(player);
+
+            if(!player->isHumanPlayer())
+                return;
+
+            if(GameMode::isMaster())
+            {
+                if(GameMode::showsGraphics())
+                    GUIManager::showGUI("UndockingDialog");
+            }
+            else
+                callStaticNetworkFunction(Dock::showDockingDialog, player->getClientID());
+
+        }
 
     void Dock::showDockingDialogHelper(PlayerInfo* player)
Index: code/branches/spacestationentry/src/modules/docking/Dock.h
===================================================================
--- code/branches/spacestationentry/src/modules/docking/Dock.h	(revision 9857)
+++ code/branches/spacestationentry/src/modules/docking/Dock.h	(revision 9885)
@@ -86,4 +86,6 @@
             void dock()
                 { this->dock(HumanController::getLocalControllerSingleton()->getPlayer()); }
+            void undock()
+                { this->undock(HumanController::getLocalControllerSingleton()->getPlayer()); }
             static unsigned int getNumberOfActiveDocks();
             static Dock* getActiveDockAtIndex(unsigned int index);
@@ -96,4 +98,5 @@
             // Network functions
             void showDockingDialogHelper(PlayerInfo* player);
+            void showUndockingDialogHelper(PlayerInfo* player);
             static void showDockingDialog();
 
Index: code/branches/spacestationentry/src/modules/docking/MoveToDockingTarget.cc
===================================================================
--- code/branches/spacestationentry/src/modules/docking/MoveToDockingTarget.cc	(revision 9857)
+++ code/branches/spacestationentry/src/modules/docking/MoveToDockingTarget.cc	(revision 9885)
@@ -66,6 +66,9 @@
     {
         //TODO: Investigate strange things...
-        this->parent_->detach((WorldEntity*)player->getControllableEntity());
+    	//this->parent_->detach((WorldEntity*)player->getControllableEntity());
 
+    	//TODO: Check the issue with this detach call.
+    	//I have removed the line because the detach call only caused a warning and terminated. And because I didn't find a attach call either.
+    	//Didn't find the need for the line.
         this->parent_->undockingAnimationFinished(player);
         return true;
