Index: code/branches/captureTheFlag/src/modules/pickup/items/FlagPickup.cc
===================================================================
--- code/branches/captureTheFlag/src/modules/pickup/items/FlagPickup.cc	(revision 9218)
+++ code/branches/captureTheFlag/src/modules/pickup/items/FlagPickup.cc	(revision 9232)
@@ -39,12 +39,7 @@
 
 #include "pickup/PickupIdentifier.h"
-#include "worldentities/pawns/Pawn.h"
 
 namespace orxonox
 {
-
-    /*static*/ const std::string FlagPickup::flagTypeBlue_s = "blue";
-    /*static*/ const std::string FlagPickup::flagTypeRed_s = "red";
-    /*static*/ const std::string FlagPickup::flagTypeNeutral_s = "neutral";
 
     CreateFactory(FlagPickup);
@@ -76,5 +71,5 @@
     void FlagPickup::initialize(void)
     {
-        this->flagType_ = pickupFlagType::0;
+        this->flagType_ = 0;
 
         this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
@@ -87,7 +82,11 @@
     void FlagPickup::initializeIdentifier(void)
     {
-        std::string val1 = this->getFlagType();
+    	std::stringstream stream;
+        int type = this->getFlagType();
+        stream << type;
+		std::string val = stream.str();
+		
         std::string type1 = "flagType";
-        this->pickupIdentifier_->addParameter(type1, val1);
+        this->pickupIdentifier_->addParameter(type1, val);
     }
 
@@ -113,19 +112,8 @@
         Returns the falg type as a string.
     */
-    const std::string& FlagPickup::getFlagType(void) const
+    const int FlagPickup::getFlagType(void) const
     {
-        switch(this->getFlagTypeDirect())
-        {
-            case pickupFlagType::blue:
-                return FlagPickup::flagTypeBlue_s;
-            case pickupFlagType::red:
-                return FlagPickup::flagTypeRed_s;
-            case pickupFlagType::neutral:
-                return FlagPickup::flagTypeNeutral_s;
-            default:
-                orxout(internal_error, context::pickups) << "Invalid flagType in FlagPickup." << endl;
-                return BLANKSTRING;
-        }
-    }
+		return this->flagType_;
+	}
 
     /**
@@ -135,14 +123,13 @@
         The type as a string.
     */
-    void FlagPickup::setFlagType(std::string type)
+    void FlagPickup::setFlagType(int type)
     {
-        if(type == FlagPickup::flagTypeRed_s)
-            this->setFlagTypeDirect(pickupFlagType::2);
-        else if(type == FlagPickup::flagTypeBlue_s)
-            this->setFlagTypeDirect(pickupFlagType::1);
-        else if(type == FlagPickup::flagTypeNeutral_s)
-            this->setFlagTypeDirect(pickupFlagType::0);
-        else
+        if(type<3){
+        	this->flagType_ = type;
+        }
+        
+        else{
             orxout(internal_error, context::pickups) << "Invalid flagType '" << type << "' in FlagPickup." << endl;
+    	}
     }
 
@@ -163,19 +150,8 @@
            if(this->isUsed())
            {
-               int team = getTeam(pawn->getPlayer);
-
-               if(this->flagType_ == team){
-            	   if(pawn->hasFlag_){
-               		   teamScore_ = TeamScore_ + 1000;
-                	   pawn->hasFlag_ = false;
-                   }
-               this->Pickupable::destroy();
-               }else{
-            	   pawn->hasFlag_ = true;
-               }
+           	 this->bPickedUp_ = true;
+           	 this->pickedUpBy_ = pawn;
            }
        }
-
-
 
        /**
@@ -196,14 +172,5 @@
        }
 
-    int FlagPickup::getTeam(PlayerInfo* player)
-    {
-        std::map<PlayerInfo*, int>::const_iterator it_player = this->teamnumbers_.find(player);
-        if (it_player != this->teamnumbers_.end())
-            return it_player->second;
-        else
-            return -1;
-    }
 
-}
 
 	void FlagPickup::tick(float dt)
@@ -213,7 +180,8 @@
 	       Pawn* pawn = this->carrierToPawnHelper();
 
-		   if(pawn->isAlive() && pawn->hasFlag_){
+		   if(pawn->isAlive() && pawn->hasFlag()){
                this->Pickupable::destroy();
 		   }
 
 	   }
+}
