Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 13, 2009, 5:05:17 PM (15 years ago)
Author:
dafrick
Message:

Hopefully merged trunk successfully into pickup branch.

Location:
code/branches/pickup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup

  • code/branches/pickup/src/orxonox/pickup/DroppedItem.cc

    r5902 r5935  
    7575        if (this->item_)
    7676        {
    77             for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); it++) //!< Iterate through all Pawns.
     77            for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it != ObjectList<Pawn>::end(); ++it) //!< Iterate through all Pawns.
    7878            {
    7979                Vector3 distance = it->getWorldPosition() - this->getWorldPosition();
     
    9393        {
    9494            COUT(3) << "DroppedItem '" << this->item_->getPickupIdentifier() << "' picked up." << std::endl;
    95             delete this;
     95            this->destroy();
    9696        }
    9797    }
     
    106106        if (this->timeToLive_ > 0)
    107107        {
    108             ExecutorMember<DroppedItem>* exec = createExecutor(createFunctor(&DroppedItem::timerCallback));
    109             this->timer_.setTimer(this->timeToLive_, false, this, exec, false);
     108            this->timer_.setTimer(this->timeToLive_, false, createExecutor(createFunctor(&DroppedItem::timerCallback, this)), false);
    110109        }
    111110    }
     
    123122        {
    124123            COUT(3) << "Delete DroppedItem with '" << this->item_->getPickupIdentifier() << "'" << std::endl;
    125             delete this->item_;
     124            this->item_->destroy();
    126125        }
    127126
    128         delete this;
     127        this->destroy();
    129128    }
    130129
Note: See TracChangeset for help on using the changeset viewer.