- Timestamp:
- Mar 7, 2010, 10:55:23 AM (15 years ago)
- Location:
- code/branches/pickup3/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup3/src/modules/pickup/PickupRepresentation.cc
r6475 r6478 46 46 PickupRepresentation::PickupRepresentation() : BaseObject(this) 47 47 { 48 this->spawnerRepresentation_ = NULL; 49 48 50 RegisterObject(PickupRepresentation); 49 51 … … 57 59 PickupRepresentation::PickupRepresentation(BaseObject* creator) : BaseObject(creator) 58 60 { 61 this->spawnerRepresentation_ = NULL; 62 59 63 RegisterObject(PickupRepresentation); 60 64 … … 81 85 this->name_ = "Pickup"; 82 86 this->spawnerTemplate_ = ""; 83 this->spawnerRepresentation_ = NULL;84 87 this->pickup_ = NULL; 85 88 } -
code/branches/pickup3/src/modules/pickup/PickupSpawner.cc
r6475 r6478 118 118 { 119 119 if(this->pickup_ != NULL) 120 delete this->pickup_;120 this->pickup_->destroy(); 121 121 } 122 122 -
code/branches/pickup3/src/modules/pickup/items/HealthPickup.cc
r6477 r6478 80 80 this->maxHealthSave_ = 0; 81 81 this->maxHealthOverwrite_ = 0; 82 83 82 } 84 83 … … 123 122 if(!this->isContinuous()) 124 123 this->healthRate_ = 0.0; 124 125 COUT(1) << "HealthPickup " << this->getHealth() << ", " << this->getHealthRate() << ", " << this->getHealthType() << "." << std::endl; 125 126 126 127 this->initializeIdentifier(); -
code/branches/pickup3/src/orxonox/interfaces/Pickupable.cc
r6477 r6478 48 48 Pickupable::Pickupable() 49 49 { 50 RegisterRootObject(Pickupable);51 52 50 this->used_ = false; 53 51 this->pickedUp_ = false; 52 53 RegisterRootObject(Pickupable); 54 54 55 this->carrier_ = NULL; 55 56 … … 66 67 this->setUsed(false); 67 68 68 if(this->isPickedUp() )69 if(this->isPickedUp() && this->getCarrier() != NULL) 69 70 { 70 71 this->getCarrier()->drop(this, false); -
code/branches/pickup3/src/orxonox/pickup/PickupIdentifier.cc
r6475 r6478 111 111 bool PickupIdentifier::addParameter(std::string & name, std::string & value) 112 112 { 113 COUT(1) << "PickupIdentifier " << name << ", " << value << std::endl; 114 113 115 if(!(this->parameters_.find(name) == this->parameters_.end())) 114 116 { 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; 116 118 return false; 117 119 }
Note: See TracChangeset
for help on using the changeset viewer.