Changeset 5929 for code/trunk/src/orxonox/pickup/PickupSpawner.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/PickupSpawner.cc
r5781 r5929 91 91 asItem->addTemplate(this->itemTemplate_); 92 92 PickupInventory::getImageForItem(asItem); 93 delete newObject;93 newObject->destroy(); 94 94 } 95 95 … … 127 127 if (this->isActive()) 128 128 { 129 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); it++)129 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it) 130 130 { 131 131 Vector3 distance = it->getWorldPosition() - this->getWorldPosition(); … … 166 166 if (this->respawnTime_ > 0.0f) 167 167 { 168 ExecutorMember<PickupSpawner>* executor = createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback)); 169 this->respawnTimer_.setTimer(this->respawnTime_, false, this, executor); 168 this->respawnTimer_.setTimer(this->respawnTime_, false, createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback, this))); 170 169 171 170 this->setActive(false); … … 174 173 } 175 174 else 176 delete newObject;175 newObject->destroy(); 177 176 } 178 177 }
Note: See TracChangeset
for help on using the changeset viewer.