Changeset 6477 for code/branches/pickup3/src/orxonox
- Timestamp:
- Mar 6, 2010, 7:44:04 PM (15 years ago)
- Location:
- code/branches/pickup3/src/orxonox/interfaces
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup3/src/orxonox/interfaces/PickupCarrier.h
r6475 r6477 76 76 @brief Can be called to drop a Pickupable. 77 77 @param pickup A pointer to the Pickupable. 78 @param drop If the Pickupable should just be removed from the PickupCarrier without further action, this can be set to false. true is default. 78 79 @return Returns true if the Pickupable has been dropped, false if not. 79 80 */ 80 bool drop(Pickupable* pickup )81 bool drop(Pickupable* pickup, bool drop = true) 81 82 { 82 83 bool dropped = this->pickups_.erase(pickup) == 1; 83 if(dropped )84 if(dropped && drop) 84 85 { 85 86 pickup->dropped(); -
code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc
r6475 r6477 63 63 Pickupable::~Pickupable() 64 64 { 65 65 if(this->isUsed()) 66 this->setUsed(false); 67 68 if(this->isPickedUp()) 69 { 70 this->getCarrier()->drop(this, false); 71 this->setCarrier(NULL); 72 } 66 73 } 67 74
Note: See TracChangeset
for help on using the changeset viewer.