Index: code/branches/lastmanstanding3/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- code/branches/lastmanstanding3/src/orxonox/gametypes/LastTeamStanding.cc	(revision 7903)
+++ code/branches/lastmanstanding3/src/orxonox/gametypes/LastTeamStanding.cc	(revision 8170)
@@ -47,5 +47,4 @@
         this->eachTeamsPlayers.resize(teams_,0);
         this->teamsAlive = 0;
-        this->bMinTeamsReached = false;
         this->bNoPunishment = false;
         this->bHardPunishment = false;
@@ -75,10 +74,8 @@
             playerLives_[player]=getMinLives();//new players only get minimum of lives */
         
-        if (teamsAlive>1) // Now the game is allowed to end, since there are at least two teams.
-            bMinTeamsReached = true; // since there are at least two teams, the game is allowed to end
         this->timeToAct_[player] = timeRemaining;
         this->playerDelayTime_[player] = respawnDelay;
         this->inGame_[player] = true;
-        int team = getTeam(player);
+        unsigned int team = getTeam(player);
         if( team < 0|| team > teams_) // make sure getTeam returns a regular value
             return;
@@ -97,5 +94,5 @@
             this->playerDelayTime_.erase(player);
             this->inGame_.erase(player);
-            int team = getTeam(player);
+            unsigned int team = getTeam(player);
             if( team < 0|| team > teams_) // make sure getTeam returns a regular value
                 return valid_player;
@@ -119,5 +116,5 @@
         if (playerLives_[victim->getPlayer()]<=0) //if player lost all lives
         {
-            int team = getTeam(victim->getPlayer());
+            unsigned int team = getTeam(victim->getPlayer());
             if(team < 0|| team > teams_) // make sure getTeam returns a regular value
                 return allow;
@@ -189,5 +186,5 @@
         if(this->hasStarted()&&(!this->hasEnded()))
         {
-            if (bMinTeamsReached &&(this->hasStarted()&&(teamsAlive<=1)))//last team remaining -> game will end
+            if ( this->hasStarted()&&(teamsAlive<=1) )//last team remaining -> game will end
             {
                 this->end();
@@ -236,5 +233,6 @@
     {
         Gametype::end();
-        
+        int party = -1;
+        //find a player who survived
         for (std::map<PlayerInfo*, int>::iterator it = this->playerLives_.begin(); it != this->playerLives_.end(); ++it)
         {
@@ -243,9 +241,25 @@
 
             if (it->second > 0)
-                this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
-            else
-                this->gtinfo_->sendAnnounceMessage("You have lost the match!", it->first->getClientID());
-        }
-
+            {
+             //which party has survived?
+                std::map<PlayerInfo*, int>::iterator it2 = this->teamnumbers_.find(it->first);
+                if (it2 != this->teamnumbers_.end())
+                {
+                    party = it2->second;
+                }
+                //if (party < 0) return; //if search failed
+             //victory message to all team members
+                for (std::map<PlayerInfo*, int>::iterator it3 = this->teamnumbers_.begin(); it3 != this->teamnumbers_.end(); ++it3)
+                {
+                    if (it3->first->getClientID() == CLIENTID_UNKNOWN)
+                        continue;
+                    if (it3->second == party)
+                        this->gtinfo_->sendAnnounceMessage("You have won the match!", it3->first->getClientID());
+                    else
+                        this->gtinfo_->sendAnnounceMessage("You have lost the match!", it3->first->getClientID());
+                }
+                return;
+            }
+        }
     }
 
Index: code/branches/lastmanstanding3/src/orxonox/gametypes/LastTeamStanding.h
===================================================================
--- code/branches/lastmanstanding3/src/orxonox/gametypes/LastTeamStanding.h	(revision 7903)
+++ code/branches/lastmanstanding3/src/orxonox/gametypes/LastTeamStanding.h	(revision 8170)
@@ -67,6 +67,4 @@
             std::map<PlayerInfo*, bool> inGame_; //!< Indicates each Player's state.
 
-            bool bMinTeamsReached; //!< Lock. Game shouldn't end right at the beginning.
-
             virtual void spawnDeadPlayersIfRequested(); //!< Prevents dead players to respawn.
             virtual int getMinLives(); //!< Returns minimum of each player's lives; players with 0 lives are skipped;
