Index: /code/branches/gametypes/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- /code/branches/gametypes/src/orxonox/gamestates/GSLevel.cc	(revision 2933)
+++ /code/branches/gametypes/src/orxonox/gamestates/GSLevel.cc	(revision 2934)
@@ -49,5 +49,5 @@
 namespace orxonox
 {
-    SetCommandLineArgument(level, "presentation_dm.oxw").shortcut("l");
+    SetCommandLineArgument(level, "teambasematchlevel.oxw").shortcut("l");
 
     GSLevel::GSLevel()
Index: /code/branches/gametypes/src/orxonox/objects/gametypes/CMakeLists.txt
===================================================================
--- /code/branches/gametypes/src/orxonox/objects/gametypes/CMakeLists.txt	(revision 2933)
+++ /code/branches/gametypes/src/orxonox/objects/gametypes/CMakeLists.txt	(revision 2934)
@@ -3,4 +3,5 @@
   Deathmatch.cc
   TeamDeathmatch.cc
+  TeamBaseMatch.cc
   Pong.cc
   UnderAttack.cc
Index: /code/branches/gametypes/src/orxonox/objects/gametypes/TeamBaseMatch.cc
===================================================================
--- /code/branches/gametypes/src/orxonox/objects/gametypes/TeamBaseMatch.cc	(revision 2933)
+++ /code/branches/gametypes/src/orxonox/objects/gametypes/TeamBaseMatch.cc	(revision 2934)
@@ -25,10 +25,12 @@
  
 
-#include TeamBaseMatch.h
+#include "TeamBaseMatch.h"
 
 
 //implement this! not done yet!
 #include "objects/worldentities/pawns/TeamBaseMatchBase.h" 
- 
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
  
 namespace orxonox
@@ -38,5 +40,5 @@
 
     // Timer and Creator
-    TeamBaseMatch::TeamBaseMatch(BaseObject* creator) : TeamDeathMatch(creator)
+    TeamBaseMatch::TeamBaseMatch(BaseObject* creator) : TeamDeathmatch(creator)
     {
         RegisterObject(TeamBaseMatch);
@@ -53,11 +55,14 @@
     void TeamBaseMatch::XMLPort(Element& xmlelement, XMLPort::Mode mode)
     {
+        SUPER(TeamBaseMatch, XMLPort, xmlelement, mode);
+
 //        XMLPortObject(TeamBaseMatch, WorldEntity, setNeutralshape, getNeturalshape, xmlelement, mode); 
 //        XMLPortObject(TeamBaseMatch, WorldEntity, setTeam1shape, getTeam1shape, xmlelement, mode);
 //        XMLPortObject(TeamBaseMatch, WorldEntity, setTeam2shape, getTeam2shape, xmlelement, mode);
 
-        XMLPortObject(TeamBaseMatch, TeamBaseMatchBase, addBase, getBase, xmlelement, mode);
+//        XMLPortObject(TeamBaseMatch, TeamBaseMatchBase,  addBase, getBase, xmlelement, mode);
     }
     
+/*
     // pretty useless at the moment...should be implemented in the TeamBaseMatchBase class headerfile
     // State of the Base (controlled, uncontrolled)
@@ -68,12 +73,15 @@
         if(Enum state_==controlTeam2) return 2;
     }
-    
+*/  
+
+
+    // Change the control of the defeated base and respawn it with its initial health
     bool TeamBaseMatch::allowPawnDeath(Pawn* victim, Pawn* originator)
     {
-        set::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.find(victim);
-        if (it != this->bases_.end() && victim)
+        TeamBaseMatchBase* base = dynamic_cast<TeamBaseMatchBase*>(victim);
+        if (base)
         {
-            TeamBaseMatchBase* base = dynamic_cast<TeamBaseMatchBase*>(victim);
-            if (base)
+            std::set<TeamBaseMatchBase*>::const_iterator it = this->bases_.find(base);
+            if (it != this->bases_.end())
             {
                 int teamnr = this->getTeam(originator->getPlayer());
@@ -140,11 +148,13 @@
     }
 
-    void addTeamPoints(int team, int points)
+
+    // this function is called by the function winPoints() which adds points to the teams for every base and killed openents at a certain time
+    void TeamBaseMatch::addTeamPoints(int team, int points)
     {
-        if(player && teamnr == 0)
+        if(team == 0)
         {
             this->pointsTeam1_ += points;
         }
-        if(player && teamnr == 1)
+        if(team == 1)
         {
             this->pointsTeam2_ += points;
Index: /code/branches/gametypes/src/orxonox/objects/gametypes/TeamBaseMatch.h
===================================================================
--- /code/branches/gametypes/src/orxonox/objects/gametypes/TeamBaseMatch.h	(revision 2933)
+++ /code/branches/gametypes/src/orxonox/objects/gametypes/TeamBaseMatch.h	(revision 2934)
@@ -36,5 +36,5 @@
 
 #include "TeamDeathmatch.h"
-#include "util/Timer.h"
+#include "tools/Timer.h"
 
 
@@ -42,5 +42,5 @@
 namespace orxonox
 {
- 
+    class TeamBaseMatchBase;
 
 
@@ -48,5 +48,5 @@
     {
         public:
-            TeamBasematch(BaseObject* creator);
+            TeamBaseMatch(BaseObject* creator);
             
             // if class closes, close everything           
@@ -60,5 +60,6 @@
 
             // give information about the state of a base 
-            virtual int baseState(Base);
+            // (this should be pretty useless atm)
+//            virtual int baseState(Base);
             
 	    virtual void playerScored(PlayerInfo* player);
Index: /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/CMakeLists.txt
===================================================================
--- /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/CMakeLists.txt	(revision 2933)
+++ /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/CMakeLists.txt	(revision 2934)
@@ -3,4 +3,5 @@
   Pawn.cc
   SpaceShip.cc
+  TeamBaseMatchBase.cc
   Destroyer.cc
 )
Index: /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc
===================================================================
--- /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc	(revision 2934)
+++ /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc	(revision 2934)
@@ -0,0 +1,51 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#include "TeamBaseMatchBase.h"
+#include "core/CoreIncludes.h"
+#include "objects/gametypes/TeamBaseMatch.h"
+
+namespace orxonox
+{
+    CreateFactory(TeamBaseMatchBase);
+
+    TeamBaseMatchBase::TeamBaseMatchBase(BaseObject* creator) : Pawn(creator)
+    {
+        RegisterObject(TeamBaseMatchBase);
+
+        this->state_ = BaseState::uncontrolled;
+
+        TeamBaseMatch* gametype = dynamic_cast<TeamBaseMatch*>(this->getGametype());
+        if (gametype)
+        {
+            gametype->addBase(this);
+        }
+    }
+}
+
Index: /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h
===================================================================
--- /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h	(revision 2933)
+++ /code/branches/gametypes/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.h	(revision 2934)
@@ -39,5 +39,5 @@
 #define _TeamBaseMatchBase_H__
 
-#include "pawn.h"
+#include "Pawn.h"
 
 namespace orxonox
@@ -55,40 +55,33 @@
     }
 
-    struct Base
-    {
-        BaseState::Enum state_;
-    };
 
-
-
-
-
-
-    class _OrxonoxExport TeamBaseMatchBase : public RadarViewable
+    class _OrxonoxExport TeamBaseMatchBase : public Pawn
     {
         public:
             TeamBaseMatchBase(BaseObject* creator);
 
-	    // if class closes, close everything  
-            virtual ~TeamBaseMatchBase();
-	    
-	    virtual void setState(base)
-	    {
-		
-
+            // if class closes, close everything  
+            virtual ~TeamBaseMatchBase() {}
+	     
+	     
+	     
+            // Set the state of a base to whatever the argument of the function is 
+            void setState(BaseState::Enum state)
+            {
+                this->state_ = state;
 	    }
-	    virtual enum getState(base);
-
-    	    
 
 
-
-	protected:
+	    // Get the state of a base as a return value 
+	    BaseState::Enum getState()
+	    {
+	        return this->state_;
+	    }
 
 
+        protected:
 
-
-
- 
+            BaseState::Enum state_;
+    };
 }
 
