Changeset 5929 for code/trunk/src/orxonox/pickup/DroppedItem.cc
- Timestamp:
- Oct 12, 2009, 8:20:07 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core5 (added) merged: 5768-5769,5772,5775-5780,5783-5785,5791-5792,5795-5807,5809-5814,5816-5832,5836-5839,5842-5853,5855-5899,5904-5922,5924-5928
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/pickup/DroppedItem.cc
r5781 r5929 56 56 if (this->item_) 57 57 { 58 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); it++)58 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it) 59 59 { 60 60 Vector3 distance = it->getWorldPosition() - this->getWorldPosition(); … … 69 69 { 70 70 COUT(3) << "DroppedItem '" << this->item_->getPickupIdentifier() << "' picked up." << std::endl; 71 delete this;71 this->destroy(); 72 72 } 73 73 } … … 76 76 if (this->timeToLive_ > 0) 77 77 { 78 ExecutorMember<DroppedItem>* exec = createExecutor(createFunctor(&DroppedItem::timerCallback)); 79 this->timer_.setTimer(this->timeToLive_, false, this, exec, false); 78 this->timer_.setTimer(this->timeToLive_, false, createExecutor(createFunctor(&DroppedItem::timerCallback, this)), false); 80 79 } 81 80 } … … 85 84 { 86 85 COUT(3) << "Delete DroppedItem with '" << this->item_->getPickupIdentifier() << "'" << std::endl; 87 delete this->item_;86 this->item_->destroy(); 88 87 } 89 88 90 delete this;89 this->destroy(); 91 90 } 92 91
Note: See TracChangeset
for help on using the changeset viewer.