Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2006, 12:32:34 PM (18 years ago)
Author:
hdavid
Message:

branches/atmospheric_engine: activating/deactivating rainEffect in the oxw-file works,default: deactivate

Location:
branches/atmospheric_engine/src/lib/graphics/effects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc

    r7978 r8020  
    5858        }
    5959
    60         this->activate();
     60  if(rainActivate)
     61         this->activate();
    6162}
    6263
     
    8283        LoadParam(root, "life", this, RainEffect, setRainLife);
    8384        LoadParam(root, "wind", this, RainEffect, setRainWind);
    84         LoadParam(root, "option", this, RainEffect, setRainOption);
     85 
     86  LOAD_PARAM_START_CYCLE(root, element);
     87  {
     88    LoadParam_CYCLE(element, "option", this, RainEffect, setRainOption);
     89  }
     90  LOAD_PARAM_END_CYCLE(element);
     91 
    8592}
    8693
     
    8996{
    9097        //Default values
     98  this->rainActivate = false;
     99  this->rainMove = false;
    91100        this->rainCoord = Vector(500, 500, 500);
    92101        this->rainSize = Vector2D(1000, 1000);
  • branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h

    r7810 r8020  
    4545                inline void setRainLife(float life) { this->rainLife = life; }
    4646                inline void setRainWind(int force) { this->rainWindForce = force; }
    47                 inline void setRainOption(const std::string& option) { if (option == "moverain") this->rainMove = true; }
     47                inline void setRainOption(const std::string& option) { if (option == "moverain") this->rainMove = true;
     48                                                                                if (option == "activate") this->rainActivate = true; }
    4849
    4950
     
    6061                int                                                                                                                             rainWindForce;
    6162                bool                                                                                                                    rainMove;
     63    bool                              rainActivate;
    6264
    6365                OrxSound::SoundSource                   soundSource;
Note: See TracChangeset for help on using the changeset viewer.