Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 8, 2010, 8:53:52 PM (14 years ago)
Author:
dafrick
Message:

Significant structural changes to the pickup module. Lots of bugs found and fixed.
Introduced a new class CollectiblePickup (which is now the only kind a PickupCollection can consist of) to solve some issues cleanly.
MetaPickup received additional functionality. It can now also be set to either destroy all the pickups of a PickupCarrier or destroy the PickupCarrier itself. (This was done mainly for testing purposes)
I've done some extensive testing on the pickups, so they should really work now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3/src/modules/pickup/items/HealthPickup.cc

    r7127 r7162  
    143143            Pawn* pawn = this->carrierToPawnHelper();
    144144            if(pawn == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    145                 this->destroy();
     145                this->Pickupable::destroy();
    146146
    147147            //! Calculate the health that is added this tick.
     
    191191
    192192        //! If the pickup is not picked up nothing must be done.
    193         if(!this->isPickedUp())
     193        if(!this->isPickedUp()) //TODO: Needed?
    194194            return;
    195195
     
    201201                Pawn* pawn = this->carrierToPawnHelper();
    202202                if(pawn == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.
    203                     this->destroy();
     203                    this->Pickupable::destroy();
    204204
    205205                float health = 0;
     
    241241                {
    242242                    COUT(1) << "Something went horribly wrong in Health Pickup. PickupCarrier is no Pawn." << std::endl;
    243                     this->destroy();
     243                    this->Pickupable::destroy();
    244244                    return;
    245245                }
     
    256256            if(this->isOnce() || (this->isContinuous() && this->getHealth() == 0))
    257257            {
    258                 this->destroy();
     258                this->Pickupable::destroy();
    259259            }
    260260        }
Note: See TracChangeset for help on using the changeset viewer.