Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 5, 2010, 6:26:54 PM (14 years ago)
Author:
dafrick
Message:

Additional documentation, code niceifying and potential bug fixing. Also: Renamed DroppedItem to DroppedPickup.

File:
1 edited

Legend:

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

    r6474 r6475  
    3636#include "core/Identifier.h"
    3737#include "core/CoreIncludes.h"
     38#include "pickup/PickupIdentifier.h"
    3839#include "PickupCarrier.h"
    3940
     
    5253        this->pickedUp_ = false;
    5354        this->carrier_ = NULL;
     55       
     56        this->pickupIdentifier_ = new PickupIdentifier();
    5457    }
    5558   
     
    9194        Returns true if the given PickupCarrier is a target.
    9295    */
    93     bool Pickupable::isTarget(PickupCarrier* carrier)
     96    bool Pickupable::isTarget(const PickupCarrier* carrier) const
    9497    {
    9598        Identifier* identifier = carrier->getIdentifier();
     
    156159        this->setUsed(false);
    157160        this->setPickedUp(false);
     161       
     162        bool created = this->createSpawner(this->getCarrier()->getCarrierPosition());
     163       
    158164        this->setCarrier(NULL);
     165        if(!created)
     166            this->destroy();
     167       
    159168        return true;
    160169    }
Note: See TracChangeset for help on using the changeset viewer.