Changeset 6694 for code/branches/ppspickups1/src/modules/pickup/items
- Timestamp:
- Apr 12, 2010, 4:08:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc
r6681 r6694 137 137 if(this->isUsed()) 138 138 { 139 this->startPickupTimer(this->getDuration());140 141 139 Engine* engine = this->carrierToEngineHelper(); 142 140 if(engine == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed. 143 141 this->destroy(); 142 143 this->startPickupTimer(this->getDuration()); 144 144 engine->setSpeedAdd(this->getSpeedAdd()); 145 145 engine->setSpeedMultiply(this->getSpeedMultiply()); … … 208 208 { 209 209 COUT(1) << "Invalid duration in SpeedPickup." << std::endl; 210 this->duration_ = 0 ;210 this->duration_ = 0.0f; 211 211 } 212 212 } … … 227 227 { 228 228 COUT(1) << "Invalid speedAdd in SpeedPickup." << std::endl; 229 this->speedAdd_ = 0.0 ;229 this->speedAdd_ = 0.0f; 230 230 } 231 231 } … … 246 246 { 247 247 COUT(1) << "Invalid speedMultiply in SpeedPickup." << std::endl; 248 this->speedMultiply_ = 1.0 ;248 this->speedMultiply_ = 1.0f; 249 249 } 250 250 } 251 251 252 252 void SpeedPickup::PickupTimerCallBack(void) { 253 /* Reset values */ 253 Engine* engine = this->carrierToEngineHelper(); 254 if(engine == NULL) //!< If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed. 255 this->destroy(); 256 257 engine->setSpeedAdd(0.0f); 258 engine->setSpeedMultiply(1.0f); 254 259 } 255 260 }
Note: See TracChangeset
for help on using the changeset viewer.