[Orxonox-commit 1774] r6492 - in code/branches/pickup3/src: modules/pickup orxonox/interfaces

dafrick at orxonox.net dafrick at orxonox.net
Mon Mar 8 12:49:26 CET 2010


Author: dafrick
Date: 2010-03-08 12:49:25 +0100 (Mon, 08 Mar 2010)
New Revision: 6492

Modified:
   code/branches/pickup3/src/modules/pickup/PickupSpawner.cc
   code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc
Log:
Small error in Pickup Spawner.


Modified: code/branches/pickup3/src/modules/pickup/PickupSpawner.cc
===================================================================
--- code/branches/pickup3/src/modules/pickup/PickupSpawner.cc	2010-03-08 08:53:29 UTC (rev 6491)
+++ code/branches/pickup3/src/modules/pickup/PickupSpawner.cc	2010-03-08 11:49:25 UTC (rev 6492)
@@ -292,9 +292,9 @@
             PickupCarrier* target = carrier->getTarget(this->pickup_);
             Pickupable* pickup = this->getPickup();
             
-            if(target != NULL || pickup != NULL)
+            if(target != NULL && pickup != NULL)
             {
-                if(carrier->pickup(pickup))
+                if(target->pickup(pickup))
                 {
                     this->decrementSpawnsRemaining();
                 }

Modified: code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc	2010-03-08 08:53:29 UTC (rev 6491)
+++ code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc	2010-03-08 11:49:25 UTC (rev 6492)
@@ -195,6 +195,7 @@
         bool created = this->createSpawner(this->getCarrier()->getCarrierPosition());
         
         this->setCarrier(NULL);
+        //TODO: possible problem.
         if(!created)
             this->destroy();
         




More information about the Orxonox-commit mailing list