Changeset 5935 for code/branches/pickup/src/orxonox/pickup/PickupSpawner.cc
- Timestamp:
- Oct 13, 2009, 5:05:17 PM (15 years ago)
- Location:
- code/branches/pickup
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup
- Property svn:mergeinfo changed
-
code/branches/pickup/src/orxonox/pickup/PickupSpawner.cc
r5902 r5935 103 103 asItem->addTemplate(this->itemTemplate_); 104 104 PickupInventory::getImageForItem(asItem); 105 delete newObject;105 newObject->destroy(); 106 106 } 107 107 … … 148 148 if (this->isActive()) 149 149 { 150 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); it++)150 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it) 151 151 { 152 152 Vector3 distance = it->getWorldPosition() - this->getWorldPosition(); … … 189 189 if (this->respawnTime_ > 0.0f) 190 190 { 191 ExecutorMember<PickupSpawner>* executor = createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback)); 192 this->respawnTimer_.setTimer(this->respawnTime_, false, this, executor); 191 this->respawnTimer_.setTimer(this->respawnTime_, false, createExecutor(createFunctor(&PickupSpawner::respawnTimerCallback, this))); 193 192 194 193 this->setActive(false); … … 197 196 } 198 197 else 199 delete newObject;198 newObject->destroy(); 200 199 } 201 200 }
Note: See TracChangeset
for help on using the changeset viewer.