Changeset 6728 for code/trunk/src/modules/pickup/items
- Timestamp:
- Apr 15, 2010, 1:15:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pickup/items/SpeedPickup.cc
r6713 r6728 141 141 if(this->isUsed()) 142 142 { 143 this->startPickupTimer(this->getDuration()); 143 if(!this->getTimer()->isActive() && this->getTimer()->getRemainingTime() > 0.0f) 144 { 145 this->getTimer()->unpauseTimer(); 146 } 147 else 148 { 149 this->startPickupTimer(this->getDuration()); 150 } 144 151 engine->setSpeedAdd(this->getSpeedAdd()); 145 152 engine->setSpeedMultiply(this->getSpeedMultiply()); … … 152 159 if(this->isOnce()) 153 160 { 154 this->destroy(); 161 if(!this->getTimer()->isActive() && this->getTimer()->getRemainingTime() == this->getDuration()) 162 { 163 //TODO: Potentially dangerous, not only for this pickup. Think long and hard about this!!! 164 this->destroy(); 165 } 166 else 167 { 168 this->getTimer()->pauseTimer(); 169 } 155 170 } 156 171 }
Note: See TracChangeset
for help on using the changeset viewer.