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/SpeedPickup.cc

    r7163 r7208  
    141141        if(this->isUsed())
    142142        {
    143             if(!this->getTimer()->isActive() && this->getTimer()->getRemainingTime() > 0.0f)
     143            if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() > 0.0f)
    144144            {
    145                 this->getTimer()->unpauseTimer();
     145                this->durationTimer_.unpauseTimer();
    146146            }
    147147            else
    148148            {
    149                 this->startPickupTimer(this->getDuration());
     149                this->durationTimer_.setTimer(this->getDuration(), false, createExecutor(createFunctor(&SpeedPickup::pickupTimerCallback, this)));
    150150            }
    151151            engine->setSpeedAdd(this->getSpeedAdd());
     
    159159            if(this->isOnce())
    160160            {
    161                 if(!this->getTimer()->isActive() && this->getTimer()->getRemainingTime() == this->getDuration())
     161                if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration())
    162162                {
    163163                    this->Pickupable::destroy();
     
    165165                else
    166166                {
    167                     this->getTimer()->pauseTimer();
     167                    this->durationTimer_.pauseTimer();
    168168                }
    169169            }
Note: See TracChangeset for help on using the changeset viewer.