Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 11, 2010, 10:59:37 PM (15 years ago)
Author:
dafrick
Message:

Resolved DroppedPickup bug, where the pickup picked up from a DroppedPickup was destroyed almost immediately after beign picked up, because the DroppedPickup was destroyed, and destroyed the pickup in its constructor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup3/src/modules/pickup/DroppedPickup.cc

    r6512 r6516  
    5151        RegisterObject(DroppedPickup);
    5252       
    53         this->initialize();
    5453    }
    5554
     
    6968    {   
    7069        RegisterObject(DroppedPickup);
    71        
    72         this->initialize();
    73        
     70
    7471        this->setPosition(position);
    7572        this->setActive(false);
     
    8380    DroppedPickup::~DroppedPickup()
    8481    {
    85         if(this->gotPickedUp_ && this->pickup_ != NULL)
     82        if(this->pickup_ != NULL && this->pickup_->isPickedUp())
    8683        {
    8784            this->pickup_ = NULL;
    8885        }
    89     }
    90    
    91     /**
    92     @brief
    93         Initializes the member variables of the object.
    94     */
    95     void DroppedPickup::initialize(void)
    96     {
    97         this->gotPickedUp_ = false;
    9886    }
    9987
Note: See TracChangeset for help on using the changeset viewer.