Index: /branches/network/src/util/game_rules.h
===================================================================
--- /branches/network/src/util/game_rules.h	(revision 8330)
+++ /branches/network/src/util/game_rules.h	(revision 8331)
@@ -20,5 +20,5 @@
 
 
-class GameRules : public BaseObject
+class GameRules : virtual public BaseObject
 {
 
Index: /branches/network/src/util/multiplayer_team_deathmatch.cc
===================================================================
--- /branches/network/src/util/multiplayer_team_deathmatch.cc	(revision 8330)
+++ /branches/network/src/util/multiplayer_team_deathmatch.cc	(revision 8331)
@@ -65,4 +65,5 @@
   this->currentGameState = GAMESTATE_PRE_GAME;
   this->gameStateTimer = 10.0f;
+  this->bShowTeamChange = false;
   
   this->box = NULL;
@@ -77,4 +78,6 @@
   if( root != NULL)
     this->loadParams(root);
+  
+  subscribeEvent( ES_GAME, SDLK_o );
 }
 
@@ -86,4 +89,6 @@
   if( this->deathScreen)
     delete this->deathScreen;
+  
+  unsubscribeEvent( ES_GAME, SDLK_o );
 }
 
@@ -150,9 +155,11 @@
     return;
   
-  if ( currentGameState == GAMESTATE_PRE_GAME )
+  if ( currentGameState == GAMESTATE_PRE_GAME || currentGameState == GAMESTATE_GAME )
   {
     if ( PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )
-         && PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )->getPreferedTeamId() == TEAM_NOTEAM 
          && box == NULL
+         &&  (PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )->getPreferedTeamId() == TEAM_NOTEAM 
+         || bShowTeamChange )
+         
        )
     {
@@ -180,4 +187,11 @@
       buttonTeam1->connect(SIGNAL(buttonTeam1, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonTeam1));
       
+      if ( bShowTeamChange )
+      {
+        OrxGui::GLGuiPushButton * buttonCancel = new OrxGui::GLGuiPushButton("Cancel");
+        box->pack( buttonCancel );
+        buttonCancel->connect(SIGNAL(buttonCancel, released), this, SLOT(MultiplayerTeamDeathmatch, onButtonCancel));
+      }
+      
       OrxGui::GLGuiPushButton * buttonExit = new OrxGui::GLGuiPushButton("Exit");
       box->pack( buttonExit );
@@ -191,4 +205,5 @@
        && PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )
        && PlayerStats::getStats( SharedNetworkData::getInstance()->getHostID() )->getPreferedTeamId() != TEAM_NOTEAM 
+       && !bShowTeamChange
      )
   {
@@ -479,4 +494,5 @@
 {
   State::getCurrentStoryEntity()->stop();
+  this->bShowTeamChange = false;
 }
 
@@ -484,4 +500,5 @@
 {
   NetworkGameManager::getInstance()->prefereTeam( TEAM_RANDOM );
+  this->bShowTeamChange = false;
 }
 
@@ -489,4 +506,5 @@
 {
   NetworkGameManager::getInstance()->prefereTeam( 0 );
+  this->bShowTeamChange = false;
 }
 
@@ -494,4 +512,5 @@
 {
   NetworkGameManager::getInstance()->prefereTeam( 1 );
+  this->bShowTeamChange = false;
 }
 
@@ -499,4 +518,5 @@
 {
   NetworkGameManager::getInstance()->prefereTeam( TEAM_SPECTATOR );
+  this->bShowTeamChange = false;
 }
 
@@ -507,7 +527,26 @@
 }
 
-
-
-
-
-
+  /**
+   * function that processes events from the handler
+   * @param event: the event
+   * @todo replace SDLK_o with something from KeyMapper
+   */
+void MultiplayerTeamDeathmatch::process( const Event & event )
+{
+  if ( event.type == SDLK_o )
+  {
+    if ( event.bPressed )
+      this->bShowTeamChange = true;
+  }
+}
+
+void MultiplayerTeamDeathmatch::onButtonCancel( )
+{
+  this->bShowTeamChange = false;
+}
+
+
+
+
+
+
Index: /branches/network/src/util/multiplayer_team_deathmatch.h
===================================================================
--- /branches/network/src/util/multiplayer_team_deathmatch.h	(revision 8330)
+++ /branches/network/src/util/multiplayer_team_deathmatch.h	(revision 8331)
@@ -27,5 +27,5 @@
 
 
-class MultiplayerTeamDeathmatch : public NetworkGameRules
+class MultiplayerTeamDeathmatch : public NetworkGameRules, public EventListener
 {
 
@@ -55,4 +55,6 @@
     
     int getRandomTeam();
+    
+    virtual void process(const Event &event);
 
   protected:
@@ -74,4 +76,6 @@
     float              gameStateTimer;             //!< if less than 0 -> change game state
 
+    bool               bShowTeamChange;            //!< if true -> show team change dialog
+
     OrxGui::GLGuiBox* box;
 
@@ -87,4 +91,5 @@
     void onButtonTeam0();
     void onButtonTeam1();
+    void onButtonCancel();
     void onButtonExit();
 };
