Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 15, 2010, 8:35:20 AM (14 years ago)
Author:
dafrick
Message:

Improvements in InvisiblePickup.

Location:
code/trunk/src/modules/pickup/items
Files:
2 edited

Legend:

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

    r7544 r7545  
    9999
    100100        this->initializeIdentifier();
    101         this->setDurationType(Pickup::durationTypeOnce_s); // The duration type is always once.
    102101    }
    103102
     
    135134            this->setInvisible(false);
    136135
    137             if(this->isContinuous() || !this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration())
     136            if((!this->isContinuous() && this->isImmediate()) || (!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration()))
    138137            {
    139138                this->Pickupable::destroy();
    140139            }
    141             else
     140            else if(this->durationTimer_.isActive())
    142141            {
    143142                this->durationTimer_.pauseTimer();
  • code/trunk/src/modules/pickup/items/InvisiblePickup.h

    r7544 r7545  
    5454        - The <b>duration</b> Specifies how long (in seconds) the invisibility lasts.
    5555
     56        An examle of a XML implementation of a InvisiblePickup would be:
     57        @code
     58        <HealthPickup
     59            activationType = "immediate"
     60            durationType = "continuous"
     61            duration = 30.0
     62        />
     63        @endcode
     64
    5665    @author
    5766        Benedict Simlinger
Note: See TracChangeset for help on using the changeset viewer.