Changeset 8864 for code/trunk/src/modules/pickup/Pickup.cc
- Timestamp:
- Aug 24, 2011, 2:57:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pickup/Pickup.cc
r8858 r8864 159 159 void Pickup::setActivationType(const std::string& type) 160 160 { 161 if(Pickup::activationTypeImmediate_s.compare(type) == 0) 162 { 161 if(type == Pickup::activationTypeImmediate_s) 163 162 this->activationType_ = pickupActivationType::immediate; 164 } 165 else if(Pickup::activationTypeOnUse_s.compare(type) == 0) 166 { 163 else if(type == Pickup::activationTypeOnUse_s) 167 164 this->activationType_ = pickupActivationType::onUse; 168 }169 165 else 170 { 171 orxout(internal_error, context::pickups) << "Invalid activationType '" << type << "' in pickup." << endl; 172 } 166 orxout(internal_error, context::pickups) << "Invalid activationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl; 173 167 } 174 168 … … 181 175 void Pickup::setDurationType(const std::string& type) 182 176 { 183 if(Pickup::durationTypeOnce_s.compare(type) == 0) 184 { 177 if(type == Pickup::durationTypeOnce_s) 185 178 this->durationType_ = pickupDurationType::once; 186 } 187 else if(Pickup::durationTypeContinuous_s.compare(type) == 0) 188 { 179 else if(type == Pickup::durationTypeContinuous_s) 189 180 this->durationType_ = pickupDurationType::continuous; 190 }191 181 else 192 { 193 orxout(internal_error, context::pickups) << "Invalid durationType '" << type << "' in pickup." << endl; 194 } 182 orxout(internal_error, context::pickups) << "Invalid durationType '" << type << "' in " << this->getIdentifier()->getName() << "." << endl; 195 183 } 196 184
Note: See TracChangeset
for help on using the changeset viewer.