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;
