Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 8, 2010, 9:17:22 PM (15 years ago)
Author:
dafrick
Message:

Fixed bug in clone() (Argument needed to be as reference). Pickups seem to be working now (after very sporadic testing), more systematic testing (and probably still some more bug fixes) will follow.

Location:
code/branches/pickup3/src/modules/pickup
Files:
6 edited

Legend:

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

    r6480 r6497  
    188188        SUPER(Pickup, changedCarrier);
    189189       
     190        COUT(1) << "Changed Carrier: " << this->isPickedUp() << this->isImmediate() << std::endl;
    190191        //! Sets the Pickup to used if the Pickup has activation type 'immediate' and gets picked up.
    191192        if(this->getCarrier() != NULL && this->isPickedUp() && this->isImmediate())
     
    201202        Returns the clone of this pickup as a pointer to a Pickupable.
    202203    */
    203     void Pickup::clone(OrxonoxClass* item)
     204    void Pickup::clone(OrxonoxClass*& item)
    204205    {
    205206        if(item == NULL)
  • code/branches/pickup3/src/modules/pickup/Pickup.h

    r6475 r6497  
    119119            virtual void changedCarrier(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
    120120                                   
    121             virtual void clone(OrxonoxClass* item); //!< Creates a duplicate of the Pickup.
     121            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the Pickup.
    122122               
    123123        protected:
  • code/branches/pickup3/src/modules/pickup/PickupCollection.cc

    r6480 r6497  
    161161   
    162162    //TODO: Steal description from Pickupable.
    163     void PickupCollection::clone(OrxonoxClass* item)
     163    void PickupCollection::clone(OrxonoxClass*& item)
    164164    {
    165165        if(item == NULL)
  • code/branches/pickup3/src/modules/pickup/PickupCollection.h

    r6475 r6497  
    6262            virtual void changedCarrier(void);
    6363           
    64             virtual void clone(OrxonoxClass* item);
     64            virtual void clone(OrxonoxClass*& item);
    6565           
    6666            virtual const PickupIdentifier* getPickupIdentifier(void);
  • code/branches/pickup3/src/modules/pickup/items/HealthPickup.cc

    r6496 r6497  
    280280        A pointer to the Orxonox class.
    281281    */
    282     void HealthPickup::clone(OrxonoxClass* item)
     282    void HealthPickup::clone(OrxonoxClass*& item)
    283283    {
    284284        if(item == NULL)
  • code/branches/pickup3/src/modules/pickup/items/HealthPickup.h

    r6496 r6497  
    7474           
    7575            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    76             virtual void clone(OrxonoxClass* item); //!< Creates a duplicate of the input OrxonoxClass.
     76            virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
    7777           
    7878            /**
Note: See TracChangeset for help on using the changeset viewer.