Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 24, 2010, 9:49:54 AM (14 years ago)
Author:
dafrick
Message:

Removed Timer from Pickup, as this is no his core functionality.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/pickup/items/ShieldPickup.cc

    r7163 r7208  
    160160        if(this->isUsed())
    161161        {
    162             if(!this->getTimer()->isActive() && this->getTimer()->getRemainingTime() > 0.0f)
     162            if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() > 0.0f)
    163163            {
    164                 this->getTimer()->unpauseTimer();
     164                this->durationTimer_.unpauseTimer();
    165165            }
    166166            else
    167167            {
    168                 this->startPickupTimer(this->getDuration());
     168                this->durationTimer_.setTimer(this->getDuration(), false, createExecutor(createFunctor(&ShieldPickup::pickupTimerCallback, this)));
    169169            }
    170170            pawn->setShieldAbsorption(this->getShieldAbsorption());
     
    179179            if(this->isOnce())
    180180            {
    181                 if(!this->getTimer()->isActive() && this->getTimer()->getRemainingTime() == this->getDuration())
     181                if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration())
    182182                {
    183183                    this->Pickupable::destroy();
     
    185185                else
    186186                {
    187                     this->getTimer()->pauseTimer();
     187                    this->durationTimer_.pauseTimer();
    188188                }
    189189            }
Note: See TracChangeset for help on using the changeset viewer.