Index: code/branches/presentation2012/src/modules/pickup/items/FlagPickup.cc
===================================================================
--- code/branches/captureTheFlag/src/modules/pickup/items/FlagPickup.cc	(revision 9232)
+++ code/branches/presentation2012/src/modules/pickup/items/FlagPickup.cc	(revision 9241)
@@ -28,7 +28,7 @@
 
 /**
-    @file FlagPickup.cc
-    @brief Implementation of the FlagPickup class.
-*/
+ @file FlagPickup.cc
+ @brief Implementation of the FlagPickup class.
+ */
 
 #include "FlagPickup.h"
@@ -37,47 +37,46 @@
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-
 #include "pickup/PickupIdentifier.h"
 
 namespace orxonox
 {
-
+    
     CreateFactory(FlagPickup);
-
+    
     /**
-    @brief
-        Constructor. Registers the object and initializes the member variables.
-    */
+     @brief
+     Constructor. Registers the object and initializes the member variables.
+     */
     FlagPickup::FlagPickup(BaseObject* creator) : Pickup(creator)
     {
         RegisterObject(FlagPickup);
-
+        
         this->initialize();
     }
-
+    
     /**
-    @brief
-        Destructor.
-    */
+     @brief
+     Destructor.
+     */
     FlagPickup::~FlagPickup()
     {
-
+        
     }
-
+    
     /**
-    @brief
-        Initializes the member variables.
-    */
+     @brief
+     Initializes the member variables.
+     */
     void FlagPickup::initialize(void)
     {
         this->flagType_ = 0;
-
+        
         this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
     }
-
+    
     /**
-    @brief
-        Initializes the PickupIdentifier of this pickup.
-    */
+     @brief
+     Initializes the PickupIdentifier of this pickup.
+     */
     void FlagPickup::initializeIdentifier(void)
     {
@@ -90,37 +89,37 @@
         this->pickupIdentifier_->addParameter(type1, val);
     }
-
+    
     /**
-    @brief
-        Method for creating a FlagPickup object through XML.
-    */
+     @brief
+     Method for creating a FlagPickup object through XML.
+     */
     void FlagPickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
     {
         SUPER(FlagPickup, XMLPort, xmlelement, mode);
-
+        
         XMLPortParam(FlagPickup, "flagType", setFlagType, getFlagType, xmlelement, mode);
         //XMLPortParam(FlagPickup, "teamNumber", setTeamNumber, getTeamNumber, xmlelement, mode);
-
+        
         this->initializeIdentifier();
     }
-
-
+    
+    
     /**
-    @brief
-        Get the flag type of this pickup.
-    @return
-        Returns the falg type as a string.
-    */
+     @brief
+     Get the flag type of this pickup.
+     @return
+     Returns the falg type as a string.
+     */
     const int FlagPickup::getFlagType(void) const
     {
 		return this->flagType_;
 	}
-
+    
     /**
-    @brief
-        Set the type of the HealthPickup.
-    @param type
-        The type as a string.
-    */
+     @brief
+     Set the type of the FlagPickup.
+     @param type
+     The type as a string.
+     */
     void FlagPickup::setFlagType(int type)
     {
@@ -133,55 +132,57 @@
     	}
     }
+    
+    /**
+     @brief
+     Is called when the pickup has transited from used to unused or the other way around.
+     */
+    void FlagPickup::changedUsed(void)
+    {
+        SUPER(FlagPickup, changedUsed);
+        
+        Pawn* pawn = this->carrierToPawnHelper();
+        
+        if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
+            this->Pickupable::destroy();
+        
+        // If the pickup has transited to used.
+        if(this->isUsed())
+        {
+            this->bPickedUp_ = true;
+            this->pickedUpBy_ = pawn;
+            orxout(internal_error, context::pickups) << "flag picked up." << endl;
 
+        }
+    }
+    
     /**
-       @brief
-           Is called when the pickup has transited from used to unused or the other way around.
-       */
-       void FlagPickup::changedUsed(void)
-       {
-           SUPER(FlagPickup, changedUsed);
-
-           Pawn* pawn = this->carrierToPawnHelper();
-
-           if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
-               this->Pickupable::destroy();
-
-           // If the pickup has transited to used.
-           if(this->isUsed())
-           {
-           	 this->bPickedUp_ = true;
-           	 this->pickedUpBy_ = pawn;
-           }
-       }
-
-       /**
-       @brief
-           Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
-       @return
-           A pointer to the Pawn, or NULL if the conversion failed.
-       */
-       Pawn* FlagPickup::carrierToPawnHelper(void)
-       {
-           PickupCarrier* carrier = this->getCarrier();
-           Pawn* pawn = dynamic_cast<Pawn*>(carrier);
-
-           if(pawn == NULL)
-               orxout(internal_error, context::pickups) << "Invalid PickupCarrier in HealthPickup." << endl;
-
-           return pawn;
-       }
-
-
-
+     @brief
+     Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+     @return
+     A pointer to the Pawn, or NULL if the conversion failed.
+     */
+    Pawn* FlagPickup::carrierToPawnHelper(void)
+    {
+        PickupCarrier* carrier = this->getCarrier();
+        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+        
+        if(pawn == NULL)
+            orxout(internal_error, context::pickups) << "Invalid PickupCarrier in Flag Pickup." << endl;
+        
+        return pawn;
+    }
+    
+    
+    
 	void FlagPickup::tick(float dt)
-	   {
-		   SUPER(FlagPickup, tick, dt);
-
-	       Pawn* pawn = this->carrierToPawnHelper();
-
-		   if(pawn->isAlive() && pawn->hasFlag()){
-               this->Pickupable::destroy();
-		   }
-
-	   }
+    {
+        SUPER(FlagPickup, tick, dt);
+        
+        //Pawn* pawn = this->carrierToPawnHelper();
+        
+//        if(pawn->isAlive() && pawn->hasFlag()){
+//            this->Pickupable::destroy();
+//        }
+        
+    }
 }
