Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 8, 2010, 9:17:22 PM (14 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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc

    r6492 r6497  
    172172       
    173173        COUT(4) << "Pickupable (&" << this << ") got picked up by a PickupCarrier (&" << carrier << ")." << std::endl;
     174        this->setPickedUp(true);
    174175        this->setCarrier(carrier);
    175         this->setPickedUp(true);
    176176        return true;
    177177    }
     
    231231    Pickupable* Pickupable::clone(void)
    232232    {
    233         Pickupable* pickup = NULL;
    234         this->clone(pickup);
     233        OrxonoxClass* item = NULL;
     234        this->clone(item);
     235       
     236        Pickupable* pickup = dynamic_cast<Pickupable*>(item);
    235237       
    236238        COUT(4) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << std::endl;
     
    246248    */
    247249    //TODO: Specify how the implementation must be done in detail.
    248     void Pickupable::clone(OrxonoxClass* item)
     250    void Pickupable::clone(OrxonoxClass*& item)
    249251    {
    250252        SUPER(Pickupable, clone, item);
Note: See TracChangeset for help on using the changeset viewer.