Index: code/trunk/data/gui/layouts/CreditsMenu.layout
===================================================================
--- code/trunk/data/gui/layouts/CreditsMenu.layout	(revision 9940)
+++ code/trunk/data/gui/layouts/CreditsMenu.layout	(revision 9941)
@@ -46,4 +46,8 @@
     
     Credits:
+    http://www.orxonox.net/wiki/credits
+
+    Thanks to AMIV:
+    https://www.amiv.ethz.ch/
                       </Property>
                     </Window>
Index: code/trunk/data/gui/scripts/MiscConfigMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/MiscConfigMenu.lua	(revision 9940)
+++ code/trunk/data/gui/scripts/MiscConfigMenu.lua	(revision 9941)
@@ -33,4 +33,5 @@
     table.insert(P.commandList, "UnderAttack gameTime_")
     table.insert(P.commandList, "TeamDeathmatch teams_")
+    table.insert(P.commandList, "TeamDeathmatch maxScore_")
     table.insert(P.commandList, "HumanPlayer nick_")
     table.insert(P.commandList, "ChatOverlay displayTime_")
@@ -56,4 +57,5 @@
     table.insert(P.nameList, "UnderAttack: game time")
     table.insert(P.nameList, "TeamDeathmatch: Number of teams")
+    table.insert(P.nameList, "TeamDeathmatch: Score needed to end the game")
     table.insert(P.nameList, "Playername")
     table.insert(P.nameList, "Chat: display time")
Index: code/trunk/data/levels/missionOne.oxw
===================================================================
--- code/trunk/data/levels/missionOne.oxw	(revision 9940)
+++ code/trunk/data/levels/missionOne.oxw	(revision 9941)
@@ -2,5 +2,5 @@
 <LevelInfo
  name = "Mission One"
- description = "First Guided Steps in the Orxonoxian Universe."
+ description = "Codename: Awakening - First Guided Steps in the Orxonoxian Universe."
  screenshot = "missionOne.png"
  tags = "mission"
Index: code/trunk/data/levels/underAttack.oxw
===================================================================
--- code/trunk/data/levels/underAttack.oxw	(revision 9940)
+++ code/trunk/data/levels/underAttack.oxw	(revision 9941)
@@ -56,5 +56,5 @@
       angularDamping    = 0.9999999
       health            = 10000
-      maxhealth         = 10000
+      maxhealth         = 10000000
       initialhealth     = 10000
       radarname         = "Transporter"
@@ -62,13 +62,14 @@
 
       <attached>
-        <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 />
-        <TeamSpawnPoint team=1 position="-50,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
-        <TeamSpawnPoint team=1 position="100,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
-        <TeamSpawnPoint team=1 position="50,0,7" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
+        <SpaceBoundaries position="1,2,3" maxDistance="1600" warnDistance="300" showDistance="300" reactionMode="1" healthDecrease="5.0" />
+        <TeamSpawnPoint team=1 position="200,0,20" direction="-1,0,0" roll=90 yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
+        <TeamSpawnPoint team=1 position="50,0,100" lookat="-1,0,0" roll="90"  yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
+        <TeamSpawnPoint team=1 position="-200,0,-60" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
+        <TeamSpawnPoint team=1 position="100,0,-50" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
+        <TeamSpawnPoint team=1 position="400,0,20" lookat="-1,0,0" roll="90" yaw=0 spawnclass=SpaceShip pawndesign=spaceshipassff />
         <?lua for i = 1, 100, 1 do ?>
           <TeamSpawnPoint
             team=0
-            position="<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>"
+            position="<?lua print((math.random() * 450 + 450) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 450 + 450) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 450 + 450) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>"
             lookat="0,0,0"
             spawnclass=SpaceShip
Index: code/trunk/src/modules/objects/SpaceBoundaries.cc
===================================================================
--- code/trunk/src/modules/objects/SpaceBoundaries.cc	(revision 9940)
+++ code/trunk/src/modules/objects/SpaceBoundaries.cc	(revision 9941)
@@ -117,5 +117,5 @@
         this->billboards_[current].usedYet = true;
 
-        Vector3 directionVector = (this->getPosition() - position).normalisedCopy(); // vector from the position of the billboard to the center of the sphere
+        Vector3 directionVector = (this->getWorldPosition() - position).normalisedCopy(); // vector from the position of the billboard to the center of the sphere
         this->billboards_[current].billy->setCommonDirection(directionVector);
 
@@ -252,6 +252,6 @@
         if(item != NULL)
         {
-            Vector3 itemPosition = item->getPosition();
-            return (itemPosition.distance(this->getPosition()));
+            Vector3 itemPosition = item->getWorldPosition();
+            return (itemPosition.distance(this->getWorldPosition()));
         } else {
             return -1;
@@ -267,8 +267,8 @@
     {
 
-        Vector3 direction = item->getPosition() - this->getPosition();
+        Vector3 direction = item->getWorldPosition() - this->getWorldPosition();
         direction.normalise();
 
-        Vector3 boundaryPosition = this->getPosition() + direction * this->maxDistance_;
+        Vector3 boundaryPosition = this->getWorldPosition() + direction * this->maxDistance_;
 
         this->positionBillboard(boundaryPosition, alpha);
@@ -277,5 +277,5 @@
     void SpaceBoundaries::conditionalBounceBack(Pawn *item, float currentDistance, float dt)
     {
-        Vector3 normal = item->getPosition() - this->getPosition();
+        Vector3 normal = item->getWorldPosition() - this->getWorldPosition();
         normal.normalise();
         Vector3 velocity = item->getVelocity();
@@ -300,10 +300,10 @@
         acceleration = acceleration.reflect(*normal);
 
-        item->lookAt( *velocity + this->getPosition() );
+        item->lookAt( *velocity + this->getWorldPosition() );
 
         item->setAcceleration(acceleration * dampingFactor);
         item->setVelocity(*velocity * dampingFactor);
 
-        item->setPosition( item->getPosition() - *normal * 10 ); // Set the position of the Pawn to be well inside the boundary.
+        item->setPosition( item->getWorldPosition() - *normal * 10 ); // Set the position of the Pawn to be well inside the boundary.
     }
 
Index: code/trunk/src/orxonox/gametypes/LastTeamStanding.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	(revision 9940)
+++ code/trunk/src/orxonox/gametypes/LastTeamStanding.cc	(revision 9941)
@@ -242,15 +242,8 @@
                     party = it2->second;
                 }
-                //if (party < 0) return; //if search failed
+                if (party < 0) return; //if search failed
                 //victory message to all team members, loose message to everyone else
-                for (std::map<PlayerInfo*, int>::iterator it3 = this->teamnumbers_.begin(); it3 != this->teamnumbers_.end(); ++it3)
-                {
-                  if (it3->first->getClientID() == NETWORK_PEER_ID_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());}
-                }
+                this->announceTeamWin(party);
+
                 return;
             }
Index: code/trunk/src/orxonox/gametypes/TeamDeathmatch.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 9940)
+++ code/trunk/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 9941)
@@ -33,4 +33,5 @@
 #include "infos/PlayerInfo.h"
 #include "worldentities/pawns/Pawn.h"
+#include "core/config/ConfigValueIncludes.h"
 
 namespace orxonox
@@ -41,4 +42,11 @@
     {
         RegisterObject(TeamDeathmatch);
+
+        this->setConfigValues();
+    }
+
+    void TeamDeathmatch::setConfigValues()
+    {
+        SetConfigValue(maxScore_, 10);
     }
 
@@ -57,4 +65,19 @@
         std::string message("The match has ended.");
         ChatManager::message(message);
+        
+        //find team that won the match
+        int winnerTeam = 0;
+        int highestScore = 0;
+        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+        {
+            if ( this->getTeamScore(it->first) > highestScore )
+            {
+                winnerTeam = this->getTeam(it->first);
+                highestScore = this->getTeamScore(it->first);
+            }
+        }
+
+        //announce win
+        this->announceTeamWin(winnerTeam);
     }
 
@@ -100,5 +123,9 @@
             {
                 if (killer->getPlayer())
+                {
                     message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();
+                    if(this->isExactlyA(Class(TeamDeathmatch)) && (this->getTeamScore(killer->getPlayer()) >= (this->maxScore_ -1)) )
+                        this->end();
+                }
                 else
                     message = victim->getPlayer()->getName() + " was killed";
Index: code/trunk/src/orxonox/gametypes/TeamDeathmatch.h
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamDeathmatch.h	(revision 9940)
+++ code/trunk/src/orxonox/gametypes/TeamDeathmatch.h	(revision 9941)
@@ -41,4 +41,5 @@
             virtual ~TeamDeathmatch() {}
 
+            void setConfigValues();
             virtual void start();
             virtual void end();
@@ -49,4 +50,6 @@
             virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
             virtual void playerScored(PlayerInfo* player, int score = 1);
+       protected:
+            int maxScore_; 
     };
 }
Index: code/trunk/src/orxonox/gametypes/TeamGametype.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamGametype.cc	(revision 9940)
+++ code/trunk/src/orxonox/gametypes/TeamGametype.cc	(revision 9941)
@@ -173,4 +173,42 @@
     }
 
+    int TeamGametype::getTeamScore(PlayerInfo* player)
+    {
+        int teamscore = 0;
+        if(!player || this->getTeam(player) == -1)
+            return 0;
+        for (std::map<PlayerInfo*, Player>::iterator it = this->players_.begin(); it != this->players_.end(); ++it)
+        {
+            if ( this->getTeam(it->first) ==  this->getTeam(player) )
+            {
+                teamscore += it->second.frags_;
+            }
+        }
+        return teamscore;
+    }
+
+    int TeamGametype::getTeamSize(int team)
+    {
+        int teamSize = 0;
+        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
+        {
+            if (it->second == team)
+                teamSize++;
+        }
+        return teamSize;
+    }
+
+    int TeamGametype::getHumansInTeam(int team)
+    {
+        int teamSize = 0;
+        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
+        {
+            if (it->second == team  && it->first->isHumanPlayer())
+                teamSize++;
+        }
+        return teamSize;
+    }
+
+
     SpawnPoint* TeamGametype::getBestSpawnPoint(PlayerInfo* player) const
     {
@@ -336,3 +374,20 @@
     }
 
+    void TeamGametype::announceTeamWin(int winnerTeam)
+    {
+        for (std::map<PlayerInfo*, int>::iterator it3 = this->teamnumbers_.begin(); it3 != this->teamnumbers_.end(); ++it3)
+        {
+            if (it3->first->getClientID() == NETWORK_PEER_ID_UNKNOWN)
+                continue;
+            if (it3->second == winnerTeam)
+            {
+                this->gtinfo_->sendAnnounceMessage("Your team has won the match!", it3->first->getClientID());
+            }
+            else
+            {
+                this->gtinfo_->sendAnnounceMessage("Your team has lost the match!", it3->first->getClientID());
+            }
+        }   
+    }
+
 }
Index: code/trunk/src/orxonox/gametypes/TeamGametype.h
===================================================================
--- code/trunk/src/orxonox/gametypes/TeamGametype.h	(revision 9940)
+++ code/trunk/src/orxonox/gametypes/TeamGametype.h	(revision 9941)
@@ -62,4 +62,7 @@
             inline const ColourValue& getTeamColour(int teamnr) const
                 { return this->teamcolours_[teamnr]; }
+            int getTeamScore(PlayerInfo* player);
+            int getTeamSize(int team);
+            int getHumansInTeam(int team);
 
         protected:
@@ -77,4 +80,6 @@
             void setDefaultObjectColour(Pawn* pawn);
             void colourPawn(Pawn* pawn, int teamNr);
+            void announceTeamWin(int winnerTeam);
+
     };
 }
Index: code/trunk/src/orxonox/gametypes/UnderAttack.cc
===================================================================
--- code/trunk/src/orxonox/gametypes/UnderAttack.cc	(revision 9940)
+++ code/trunk/src/orxonox/gametypes/UnderAttack.cc	(revision 9941)
@@ -38,4 +38,7 @@
 namespace orxonox
 {
+    const int attacker_ = 0; // teamnumber of the attacking team
+    const int defender_ = 1; // defender's teamnumber
+
     RegisterUnloadableClass(UnderAttack);
 
@@ -76,5 +79,5 @@
                 continue;
 
-            if (it->second == 0)
+            if (it->second == attacker_)
                 this->gtinfo_->sendAnnounceMessage("You have won the match!", it->first->getClientID());
             else
@@ -188,3 +191,25 @@
         }
     }
+
+    void UnderAttack::playerEntered(PlayerInfo* player)
+    {
+        if (!player)
+            return;
+        TeamDeathmatch::playerEntered(player);
+        this->setTransporterHealth();
+    }
+
+    void UnderAttack::setTransporterHealth()
+    {
+        if (this->destroyer_ != 0)
+        {
+            //Calculation: Each attacker deals about 3500 damage. A human attacker deals 1500 damage additionally.
+            //Each defender prevents 500 damage. If human 2000 damage will be additionally be prevented.
+            //TODO: use gametime and the damage dealt so far in order to calculate the transporter's life more precisely
+            float health = this->getTeamSize(attacker_)*2000.0f + this->getHumansInTeam(attacker_)*3000.0f - this->getTeamSize(defender_)*500.0f - this->getHumansInTeam(defender_)*2000.0f ;
+            this->destroyer_->setHealth(std::max(health, 5000.0f)); //the destoyer should have at least 5000.0f life. 
+        }
+    }
+
+
 }
Index: code/trunk/src/orxonox/gametypes/UnderAttack.h
===================================================================
--- code/trunk/src/orxonox/gametypes/UnderAttack.h	(revision 9940)
+++ code/trunk/src/orxonox/gametypes/UnderAttack.h	(revision 9941)
@@ -51,7 +51,9 @@
             virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);
             virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);
+            virtual void playerEntered(PlayerInfo* player);
 
         protected:
             virtual void killedDestroyer();
+            void setTransporterHealth();
 
             WeakPtr<Destroyer> destroyer_;
