Changeset 7163 for code/trunk/src/modules/pickup/Pickup.cc
- Timestamp:
- Aug 11, 2010, 8:55:13 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/modules/pickup/Pickup.cc
- Property svn:eol-style set to native
r6709 r7163 48 48 /*static*/ const std::string Pickup::durationTypeOnce_s = "once"; 49 49 /*static*/ const std::string Pickup::durationTypeContinuous_s = "continuous"; 50 51 CreateUnloadableFactory(Pickup); 50 52 51 53 Pickup::Pickup(BaseObject* creator) : BaseObject(creator) … … 146 148 void Pickup::setActivationType(const std::string& type) 147 149 { 148 if( type == activationTypeImmediate_s)150 if(Pickup::activationTypeImmediate_s.compare(type) == 0) 149 151 { 150 152 this->activationType_ = pickupActivationType::immediate; 151 153 } 152 else if( type == activationTypeOnUse_s)154 else if(Pickup::activationTypeOnUse_s.compare(type) == 0) 153 155 { 154 156 this->activationType_ = pickupActivationType::onUse; … … 168 170 void Pickup::setDurationType(const std::string& type) 169 171 { 170 if( type == durationTypeOnce_s)172 if(Pickup::durationTypeOnce_s.compare(type) == 0) 171 173 { 172 174 this->durationType_ = pickupDurationType::once; 173 175 } 174 else if( type == durationTypeContinuous_s)176 else if(Pickup::durationTypeContinuous_s.compare(type) == 0) 175 177 { 176 178 this->durationType_ = pickupDurationType::continuous; … … 192 194 193 195 //! Sets the Pickup to used if the Pickup has activation type 'immediate' and gets picked up. 194 if(this-> getCarrier() != NULL && this->isPickedUp() && this->isImmediate())196 if(this->isPickedUp() && this->isImmediate()) 195 197 { 196 198 this->setUsed(true);
Note: See TracChangeset
for help on using the changeset viewer.