Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6478 for code


Ignore:
Timestamp:
Mar 7, 2010, 10:55:23 AM (15 years ago)
Author:
dafrick
Message:

More bug fixes.

Location:
code/branches/pickup3/src
Files:
5 edited

Legend:

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

    r6475 r6478  
    4646    PickupRepresentation::PickupRepresentation() : BaseObject(this)
    4747    {
     48        this->spawnerRepresentation_ = NULL;
     49       
    4850        RegisterObject(PickupRepresentation);
    4951       
     
    5759    PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator)
    5860    {
     61        this->spawnerRepresentation_ = NULL;
     62       
    5963        RegisterObject(PickupRepresentation);
    6064       
     
    8185        this->name_ = "Pickup";
    8286        this->spawnerTemplate_ = "";
    83         this->spawnerRepresentation_ = NULL;
    8487        this->pickup_ = NULL;
    8588    }
  • code/branches/pickup3/src/modules/pickup/PickupSpawner.cc

    r6475 r6478  
    118118    {
    119119        if(this->pickup_ != NULL)
    120             delete this->pickup_;
     120            this->pickup_->destroy();
    121121    }
    122122
  • code/branches/pickup3/src/modules/pickup/items/HealthPickup.cc

    r6477 r6478  
    8080        this->maxHealthSave_ = 0;
    8181        this->maxHealthOverwrite_ = 0;
    82        
    8382    }
    8483   
     
    123122        if(!this->isContinuous())
    124123            this->healthRate_ = 0.0;
     124       
     125        COUT(1) << "HealthPickup " << this->getHealth() << ", " << this->getHealthRate() << ", " << this->getHealthType() << "." << std::endl;
    125126       
    126127        this->initializeIdentifier();
  • code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc

    r6477 r6478  
    4848    Pickupable::Pickupable()
    4949    {
    50         RegisterRootObject(Pickupable);
    51 
    5250        this->used_ = false;
    5351        this->pickedUp_ = false;
     52       
     53        RegisterRootObject(Pickupable);
     54       
    5455        this->carrier_ = NULL;
    5556       
     
    6667            this->setUsed(false);
    6768       
    68         if(this->isPickedUp())
     69        if(this->isPickedUp() && this->getCarrier() != NULL)
    6970        {
    7071            this->getCarrier()->drop(this, false);
  • code/branches/pickup3/src/orxonox/pickup/PickupIdentifier.cc

    r6475 r6478  
    111111    bool PickupIdentifier::addParameter(std::string & name, std::string & value)
    112112    {
     113        COUT(1) << "PickupIdentifier " << name << ", " << value << std::endl;
     114       
    113115        if(!(this->parameters_.find(name) == this->parameters_.end()))
    114116        {
    115             COUT(2) << "Request for adding a parameter that already exists for the PickupIdentififer was denied." << std::endl;
     117            COUT(2) << "Request for adding a parameter that already exists for the PickupIdentififer was denied. name: '" << name << "', value: '" << value << "'."<< std::endl;
    116118            return false;
    117119        }
Note: See TracChangeset for help on using the changeset viewer.