Changeset 7094 for code/branches/presentation3
- Timestamp:
- Jun 2, 2010, 11:16:20 PM (14 years ago)
- Location:
- code/branches/presentation3/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation3/src/modules/pickup/PickupCollection.cc
r6901 r7094 123 123 for(std::vector<WeakPtr<Pickupable> >::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) 124 124 { 125 (*it).get()->setCarrier(this->getCarrier()->getTarget(*it) );125 (*it).get()->setCarrier(this->getCarrier()->getTarget(*it), true); 126 126 } 127 127 } -
code/branches/presentation3/src/orxonox/interfaces/Pickupable.cc
r6996 r7094 213 213 Sets the input PickupCarrier as the carrier of the pickup. 214 214 */ 215 inline bool Pickupable::setCarrier(PickupCarrier* carrier )215 inline bool Pickupable::setCarrier(PickupCarrier* carrier, bool tell) 216 216 { 217 217 if(this->carrier_ == carrier) … … 222 222 this->carrier_ = carrier; 223 223 this->changedCarrier(); 224 if(tell && carrier != NULL) 225 this->carrier_->pickups_.insert(this); 224 226 return true; 225 227 } -
code/branches/presentation3/src/orxonox/interfaces/Pickupable.h
r6996 r7094 115 115 bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input. 116 116 bool setPickedUp(bool pickedUp); //!< Helper method to set the Pickupable to either picked up or not picked up. 117 bool setCarrier(PickupCarrier* carrier ); //!< Sets the carrier of the pickup.117 bool setCarrier(PickupCarrier* carrier, bool tell = false); //!< Sets the carrier of the pickup. 118 118 119 119 protected:
Note: See TracChangeset
for help on using the changeset viewer.