Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 12, 2012, 11:05:15 PM (12 years ago)
Author:
landauf
Message:

removed 2 lines from ~PickupCollection() again because they don't solve the real issue
use destroy() for PickupCollectionIdentifier because it's an OrxonoxClass
calling this→destroy() should be the last thing you do in a function
details in PickupIdentifier

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/modules/pickup/PickupCollection.cc

    r9293 r9294  
    7575        for(std::list<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); ++it)
    7676        {
    77             if((*it)->isBeingDestroyed())
    78                 continue;
    79 
    8077            (*it)->wasRemovedFromCollection();
    8178            (*it)->destroyPickup();
     
    8481
    8582        if(this->pickupCollectionIdentifier_ != NULL)
    86             delete this->pickupCollectionIdentifier_;
     83            this->pickupCollectionIdentifier_->destroy();
    8784    }
    8885
     
    187184        if(this->pickedUpCounter_ <= this->disabledCounter_ && this->isPickedUp())
    188185            this->Pickupable::destroy();
    189 
    190         // If the PickupCollection is no longer picked up.
    191         if(!this->isPickedUp())
     186        else if(!this->isPickedUp()) // If the PickupCollection is no longer picked up.
    192187            this->pickedUpCounter_ = 0;
    193188    }
Note: See TracChangeset for help on using the changeset viewer.