Index: code/branches/miniprojects/src/orxonox/gamestates/GSLevel.cc
===================================================================
--- code/branches/miniprojects/src/orxonox/gamestates/GSLevel.cc	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/gamestates/GSLevel.cc	(revision 2768)
@@ -49,5 +49,5 @@
 namespace orxonox
 {
-    SetCommandLineArgument(level, "presentation.oxw").shortcut("l");
+    SetCommandLineArgument(level, "presentation_dm.oxw").shortcut("l");
 
     GSLevel::GSLevel()
Index: code/branches/miniprojects/src/orxonox/objects/CMakeLists.txt
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/CMakeLists.txt	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/CMakeLists.txt	(revision 2768)
@@ -8,4 +8,5 @@
   RadarListener.cc
   RadarViewable.cc
+  Teamcolourable.cc
   Tickable.cc
   Test.cc
Index: code/branches/miniprojects/src/orxonox/objects/Level.cc
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/Level.cc	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/Level.cc	(revision 2768)
@@ -105,17 +105,26 @@
     {
         Identifier* identifier = ClassByString(gametype);
-        if (identifier && identifier->isA(Class(Gametype)))
+
+        if (!identifier || !identifier->isA(Class(Gametype)))
         {
+            COUT(0) << "Error: \"" << gametype << "\" is not a valid gametype." << std::endl;
+            identifier = Class(Gametype);
+            this->gametype_ = "Gametype";
+        }
+        else
             this->gametype_ = gametype;
 
-            Gametype* rootgametype = dynamic_cast<Gametype*>(identifier->fabricate(this));
-            this->setGametype(rootgametype);
+std::cout << "Load Gametype: " << this->gametype_ << std::endl;
 
-            for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
-                (*it)->setGametype(rootgametype);
+        Gametype* rootgametype = dynamic_cast<Gametype*>(identifier->fabricate(this));
+        this->setGametype(rootgametype);
 
-            if (LevelManager::getInstancePtr())
-                LevelManager::getInstance().requestActivity(this);
-        }
+std::cout << "root gametype: " << rootgametype->getIdentifier()->getName() << std::endl;
+
+        for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)
+            (*it)->setGametype(rootgametype);
+
+        if (LevelManager::getInstancePtr())
+            LevelManager::getInstance().requestActivity(this);
     }
 
Index: code/branches/miniprojects/src/orxonox/objects/Teamcolourable.cc
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/Teamcolourable.cc	(revision 2768)
+++ code/branches/miniprojects/src/orxonox/objects/Teamcolourable.cc	(revision 2768)
@@ -0,0 +1,39 @@
+/*
+ *   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 "OrxonoxStableHeaders.h"
+#include "Teamcolourable.h"
+#include "core/CoreIncludes.h"
+
+namespace orxonox
+{
+    Teamcolourable::Teamcolourable()
+    {
+        RegisterRootObject(Teamcolourable);
+    }
+}
Index: code/branches/miniprojects/src/orxonox/objects/Teamcolourable.h
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/Teamcolourable.h	(revision 2768)
+++ code/branches/miniprojects/src/orxonox/objects/Teamcolourable.h	(revision 2768)
@@ -0,0 +1,49 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _Teamcolourable_H__
+#define _Teamcolourable_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "core/OrxonoxClass.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Teamcolourable : virtual public OrxonoxClass
+    {
+        public:
+            virtual void setTeamColour(const ColourValue& colour) = 0;
+
+        protected:
+            Teamcolourable();
+    };
+}
+
+#endif /* _Teamcolourable_H__ */
Index: code/branches/miniprojects/src/orxonox/objects/gametypes/CMakeLists.txt
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/gametypes/CMakeLists.txt	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/gametypes/CMakeLists.txt	(revision 2768)
@@ -1,3 +1,4 @@
 ADD_SOURCE_FILES(ORXONOX_SRC_FILES
   Gametype.cc
+  TeamGametype.cc
 )
Index: code/branches/miniprojects/src/orxonox/objects/gametypes/Gametype.cc
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/gametypes/Gametype.cc	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/gametypes/Gametype.cc	(revision 2768)
@@ -66,6 +66,4 @@
         this->setConfigValues();
 
-        this->addBots(this->numberOfBots_);
-
         // load the corresponding score board
         if (Core::showsGraphics() && this->scoreboardTemplate_ != "")
@@ -105,4 +103,6 @@
     void Gametype::start()
     {
+        this->addBots(this->numberOfBots_);
+
         COUT(0) << "game started" << std::endl;
         this->gtinfo_.bStarted_ = true;
@@ -166,4 +166,27 @@
     void Gametype::pawnPostSpawn(Pawn* pawn)
     {
+    }
+
+    void Gametype::playerPreSpawn(PlayerInfo* player)
+    {
+    }
+
+    void Gametype::playerPostSpawn(PlayerInfo* player)
+    {
+    }
+
+    bool Gametype::allowPawnHit(Pawn* victim, Pawn* originator)
+    {
+        return true;
+    }
+
+    bool Gametype::allowPawnDamage(Pawn* victim, Pawn* originator)
+    {
+        return true;
+    }
+
+    bool Gametype::allowPawnDeath(Pawn* victim, Pawn* originator)
+    {
+        return true;
     }
 
@@ -336,6 +359,8 @@
         if (spawnpoint)
         {
+            this->playerPreSpawn(player);
             player->startControl(spawnpoint->spawn());
             this->players_[player].state_ = PlayerState::Alive;
+            this->playerPostSpawn(player);
         }
         else
Index: code/branches/miniprojects/src/orxonox/objects/gametypes/Gametype.h
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/gametypes/Gametype.h	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/gametypes/Gametype.h	(revision 2768)
@@ -91,7 +91,13 @@
             virtual void playerScored(Player& player);
 
+            virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);
+            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);
+            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);
+
             virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
             virtual void pawnPreSpawn(Pawn* pawn);
             virtual void pawnPostSpawn(Pawn* pawn);
+            virtual void playerPreSpawn(PlayerInfo* player);
+            virtual void playerPostSpawn(PlayerInfo* player);
 
             inline const std::map<PlayerInfo*, Player>& getPlayers() const
@@ -112,5 +118,5 @@
                 { return this->players_.size(); }
 
-        private:
+        protected:
             virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
 
Index: code/branches/miniprojects/src/orxonox/objects/gametypes/TeamGametype.cc
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/gametypes/TeamGametype.cc	(revision 2768)
+++ code/branches/miniprojects/src/orxonox/objects/gametypes/TeamGametype.cc	(revision 2768)
@@ -0,0 +1,189 @@
+/*
+ *   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 "OrxonoxStableHeaders.h"
+#include "TeamGametype.h"
+
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "objects/Teamcolourable.h"
+#include "objects/worldentities/TeamSpawnPoint.h"
+#include "objects/infos/PlayerInfo.h" // remove this
+
+namespace orxonox
+{
+    CreateUnloadableFactory(TeamGametype);
+
+    TeamGametype::TeamGametype(BaseObject* creator) : Gametype(creator)
+    {
+        RegisterObject(TeamGametype);
+
+        this->teams_ = 2;
+
+        this->setConfigValues();
+    }
+
+    void TeamGametype::setConfigValues()
+    {
+        SetConfigValue(teams_, 2);
+
+        static ColourValue colours[] =
+        {
+            ColourValue(1.0, 0.3, 0.3),
+            ColourValue(0.3, 0.3, 1.0),
+            ColourValue(0.3, 1.0, 0.3),
+            ColourValue(1.0, 1.0, 0.0)
+        };
+        static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
+
+        SetConfigValueVector(teamcolours_, defaultcolours);
+    }
+
+    void TeamGametype::playerEntered(PlayerInfo* player)
+    {
+        Gametype::playerEntered(player);
+
+        std::vector<unsigned int> playersperteam(this->teams_, 0);
+
+        for (std::map<PlayerInfo*, int>::iterator it = this->teamnumbers_.begin(); it != this->teamnumbers_.end(); ++it)
+            if (it->second < this->teams_ && it->second >= 0)
+                playersperteam[it->second]++;
+
+        unsigned int minplayers = (unsigned int)-1;
+        size_t minplayersteam = 0;
+        for (size_t i = 0; i < this->teams_; ++i)
+        {
+            if (playersperteam[i] < minplayers)
+            {
+                minplayers = playersperteam[i];
+                minplayersteam = i;
+            }
+        }
+
+        this->teamnumbers_[player] = minplayersteam;
+    }
+
+    void TeamGametype::playerLeft(PlayerInfo* player)
+    {
+        Gametype::playerLeft(player);
+
+        this->players_.erase(player);
+    }
+
+    bool TeamGametype::allowPawnHit(Pawn* victim, Pawn* originator)
+    {
+        return (!this->pawnsAreInTheSameTeam(victim, originator));
+    }
+
+    bool TeamGametype::allowPawnDamage(Pawn* victim, Pawn* originator)
+    {
+        return (!this->pawnsAreInTheSameTeam(victim, originator));
+    }
+
+    bool TeamGametype::allowPawnDeath(Pawn* victim, Pawn* originator)
+    {
+        return (!this->pawnsAreInTheSameTeam(victim, originator));
+    }
+
+    SpawnPoint* TeamGametype::getBestSpawnPoint(PlayerInfo* player) const
+    {
+        int desiredTeamNr = -1;
+        std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
+        if (it_player != this->teamnumbers_.end())
+            desiredTeamNr = it_player->second;
+
+        // Only use spawnpoints of the own team (or non-team-spawnpoints)
+        std::set<SpawnPoint*> teamSpawnPoints = this->spawnpoints_;
+        for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); )
+        {
+            if ((*it)->isA(Class(TeamSpawnPoint)))
+            {
+                TeamSpawnPoint* tsp = dynamic_cast<TeamSpawnPoint*>(*it);
+                if (tsp && tsp->getTeamNumber() != desiredTeamNr)
+                {
+                    teamSpawnPoints.erase(it++);
+                    continue;
+                }
+            }
+
+            ++it;
+        }
+
+        if (teamSpawnPoints.size() > 0)
+        {
+            unsigned int randomspawn = (unsigned int)rnd(teamSpawnPoints.size());
+            unsigned int index = 0;
+            for (std::set<SpawnPoint*>::const_iterator it = teamSpawnPoints.begin(); it != teamSpawnPoints.end(); ++it)
+            {
+                if (index == randomspawn)
+                    return (*it);
+
+                ++index;
+            }
+        }
+
+        return 0;
+    }
+
+    void TeamGametype::playerPostSpawn(PlayerInfo* player)
+    {
+        if (!player)
+            return;
+
+        // Set the team colour
+        std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
+        if (it_player != this->teamnumbers_.end() && it_player->second >= 0 && it_player->second < this->teamcolours_.size())
+        {
+            if (player->getControllableEntity())
+            {
+                std::set<WorldEntity*> pawnAttachments = player->getControllableEntity()->getAttachedObjects();
+                for (std::set<WorldEntity*>::iterator it = pawnAttachments.begin(); it != pawnAttachments.end(); ++it)
+                {
+                    if ((*it)->isA(Class(Teamcolourable)))
+                    {
+                        Teamcolourable* tc = dynamic_cast<Teamcolourable*>(*it);
+                        tc->setTeamColour(this->teamcolours_[it_player->second]);
+                    }
+                }
+            }
+        }
+    }
+
+    bool TeamGametype::pawnsAreInTheSameTeam(Pawn* pawn1, Pawn* pawn2)
+    {
+        if (pawn1 && pawn2)
+        {
+            std::map<PlayerInfo*, int>::const_iterator it1 = this->teamnumbers_.find(pawn1->getPlayer());
+            std::map<PlayerInfo*, int>::const_iterator it2 = this->teamnumbers_.find(pawn2->getPlayer());
+
+            if (it1 != this->teamnumbers_.end() && it2 != this->teamnumbers_.end())
+                return (it1->second == it2->second);
+        }
+        return false;
+    }
+}
Index: code/branches/miniprojects/src/orxonox/objects/gametypes/TeamGametype.h
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/gametypes/TeamGametype.h	(revision 2768)
+++ code/branches/miniprojects/src/orxonox/objects/gametypes/TeamGametype.h	(revision 2768)
@@ -0,0 +1,67 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _TeamGametype_H__
+#define _TeamGametype_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <vector>
+
+#include "Gametype.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport TeamGametype : public Gametype
+    {
+        public:
+            TeamGametype(BaseObject* creator);
+            virtual ~TeamGametype() {}
+
+            void setConfigValues();
+
+            virtual void playerEntered(PlayerInfo* player);
+            virtual void playerLeft(PlayerInfo* player);
+
+            virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0);
+            virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0);
+            virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0);
+
+            virtual void playerPostSpawn(PlayerInfo* player);
+
+        protected:
+            virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const;
+            bool pawnsAreInTheSameTeam(Pawn* pawn1, Pawn* pawn2);
+
+            std::map<PlayerInfo*, int> teamnumbers_;
+            std::vector<ColourValue> teamcolours_;
+            unsigned int teams_;
+    };
+}
+
+#endif /* _TeamGametype_H__ */
Index: code/branches/miniprojects/src/orxonox/objects/worldentities/Billboard.h
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/worldentities/Billboard.h	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/worldentities/Billboard.h	(revision 2768)
@@ -34,8 +34,9 @@
 #include "util/Math.h"
 #include "tools/BillboardSet.h"
+#include "objects/Teamcolourable.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Billboard : public StaticEntity
+    class _OrxonoxExport Billboard : public StaticEntity, public Teamcolourable
     {
         public:
@@ -61,4 +62,7 @@
                 { return this->colour_; }
 
+            virtual void setTeamColour(const ColourValue& colour)
+                { this->setColour(colour); }
+
         protected:
             inline BillboardSet& getBillboardSet()
Index: code/branches/miniprojects/src/orxonox/objects/worldentities/CMakeLists.txt
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/worldentities/CMakeLists.txt	(revision 2768)
@@ -19,4 +19,5 @@
   Planet.cc
   SpawnPoint.cc
+  TeamSpawnPoint.cc
 )
 
Index: code/branches/miniprojects/src/orxonox/objects/worldentities/Light.h
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/worldentities/Light.h	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/worldentities/Light.h	(revision 2768)
@@ -37,8 +37,9 @@
 
 #include "util/Math.h"
+#include "objects/Teamcolourable.h"
 
 namespace orxonox
 {
-    class _OrxonoxExport Light : public StaticEntity
+    class _OrxonoxExport Light : public StaticEntity, public Teamcolourable
     {
         public:
@@ -68,4 +69,7 @@
             inline const ColourValue& getSpecularColour() const
                 { return this->specular_; }
+
+            virtual void setTeamColour(const ColourValue& colour)
+                { this->setDiffuseColour(colour); this->setSpecularColour(colour); }
 
             /**
Index: code/branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.cc
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.cc	(revision 2768)
+++ code/branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.cc	(revision 2768)
@@ -0,0 +1,52 @@
+/*
+ *   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 "OrxonoxStableHeaders.h"
+#include "TeamSpawnPoint.h"
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+
+namespace orxonox
+{
+    CreateFactory(TeamSpawnPoint);
+
+    TeamSpawnPoint::TeamSpawnPoint(BaseObject* creator) : SpawnPoint(creator)
+    {
+        RegisterObject(TeamSpawnPoint);
+
+        this->teamNumber_ = 0;
+    }
+
+    void TeamSpawnPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(TeamSpawnPoint, XMLPort, xmlelement, mode);
+
+        XMLPortParam(TeamSpawnPoint, "team", setTeamNumber, getTeamNumber, xmlelement, mode).defaultValues(0);
+    }
+}
Index: code/branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.h
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.h	(revision 2768)
+++ code/branches/miniprojects/src/orxonox/objects/worldentities/TeamSpawnPoint.h	(revision 2768)
@@ -0,0 +1,56 @@
+/*
+ *   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:
+ *      ...
+ *
+ */
+
+#ifndef _TeamSpawnPoint_H__
+#define _TeamSpawnPoint_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "SpawnPoint.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport TeamSpawnPoint : public SpawnPoint
+    {
+        public:
+            TeamSpawnPoint(BaseObject* creator);
+            virtual ~TeamSpawnPoint() {}
+
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+
+            void setTeamNumber(unsigned int team)
+                { this->teamNumber_ = team; }
+            unsigned int getTeamNumber() const
+                { return this->teamNumber_; }
+
+        private:
+            unsigned int teamNumber_;
+    };
+}
+
+#endif /* _TeamSpawnPoint_H__ */
Index: code/branches/miniprojects/src/orxonox/objects/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/miniprojects/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2767)
+++ code/branches/miniprojects/src/orxonox/objects/worldentities/pawns/Pawn.cc	(revision 2768)
@@ -140,16 +140,22 @@
     void Pawn::damage(float damage, Pawn* originator)
     {
-        this->setHealth(this->health_ - damage);
-        this->lastHitOriginator_ = originator;
-
-        // play damage effect
+        if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator))
+        {
+            this->setHealth(this->health_ - damage);
+            this->lastHitOriginator_ = originator;
+
+            // play damage effect
+        }
     }
 
     void Pawn::hit(Pawn* originator, const Vector3& force, float damage)
     {
-        this->damage(damage, originator);
-        this->setVelocity(this->getVelocity() + force);
-
-        // play hit effect
+        if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator))
+        {
+            this->damage(damage, originator);
+            this->setVelocity(this->getVelocity() + force);
+
+            // play hit effect
+        }
     }
 
@@ -176,17 +182,22 @@
     void Pawn::death()
     {
-        // Set bAlive_ to false and wait for PawnManager to do the destruction
-        this->bAlive_ = false;
-
-        this->setDestroyWhenPlayerLeft(false);
-
-        if (this->getGametype())
-            this->getGametype()->pawnKilled(this, this->lastHitOriginator_);
-
-        if (this->getPlayer())
-            this->getPlayer()->stopControl(this);
-
-        if (Core::isMaster())
-            this->deatheffect();
+        if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
+        {
+            // Set bAlive_ to false and wait for PawnManager to do the destruction
+            this->bAlive_ = false;
+
+            this->setDestroyWhenPlayerLeft(false);
+
+            if (this->getGametype())
+                this->getGametype()->pawnKilled(this, this->lastHitOriginator_);
+
+            if (this->getPlayer())
+                this->getPlayer()->stopControl(this);
+
+            if (Core::isMaster())
+                this->deatheffect();
+        }
+        else
+            this->setHealth(1);
     }
 
