Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 20, 2010, 7:45:01 PM (15 years ago)
Author:
ebeier
Message:

SpeedPickup Class is now "working" (able to spawn/be picked up), but speed-manipulation of pawn still missing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/ppspickups1/src/modules/pickup/items/SpeedPickup.cc

    r6574 r6575  
    7474    void SpeedPickup::initialize(void)
    7575    {
    76         this->duration_ = 0;
    77         this->speedAdd_ = 0;
    78         this->speedMultiply_ = 0;
     76        this->duration_ = 0.0;
     77        this->speedAdd_ = 0.0;
     78        this->speedMultiply_ = 1.0;
    7979
    8080        this->addTarget(ClassIdentifier<Pawn>::getIdentifier());
     
    269269    void SpeedPickup::setSpeedMultiply(float speedMultiply)
    270270    {
    271         if(speedMultiply > 0.0f)
     271        if(speedMultiply != 0.0f)
    272272        {
    273273            this->speedMultiply_ = speedMultiply;
     
    276276        {
    277277            COUT(1) << "Invalid speedMultiply in SpeedPickup." << std::endl;
    278             this->speedMultiply_ = 0.0;
     278            this->speedMultiply_ = 1.0;
    279279        }
    280280    }
Note: See TracChangeset for help on using the changeset viewer.