Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 8, 2006, 4:28:24 PM (18 years ago)
Author:
amaechler
Message:

raise the number:)

File:
1 edited

Legend:

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

    r8261 r8267  
    8686        LoadParam(root, "life", this, RainEffect, setRainLife);
    8787        LoadParam(root, "wind", this, RainEffect, setRainWind);
    88         LoadParam(root, "startraining", this, RainEffect, setRainStart);
     88        LoadParam(root, "fadeinduration", this, RainEffect, setRainFadeIn);
     89        LoadParam(root, "fadeoutduration", this, RainEffect, setRainFadeOut);
    8990
    9091        LOAD_PARAM_START_CYCLE(root, element);
     
    109110        this->rainMaxParticles = this->rainRate * this->rainLife;
    110111        this->rainWindForce  = 0;
    111         this->rainStartDuration = 0;
     112        this->rainFadeInDuration = 0;
     113        this->rainFadeOutDuration = 0;
    112114        this->localTimer = 0;
    113115        this->soundRainVolume = 0.8f;
     
    117119        lightMan = LightManager::getInstance();
    118120        this->rainAmbient = lightMan->getAmbientColor();
     121
     122        return 0;
    119123}
    120124
     
    155159
    156160        lightMan->setAmbientColor(.1,.1,.1);
     161
     162        return 0;
    157163}
    158164
     
    170176        // Restore Light Ambient
    171177        lightMan->setAmbientColor(this->rainAmbient, this->rainAmbient, this->rainAmbient);
     178
     179        return 0;
    172180}
    173181
     
    182190        }
    183191
    184         if (this->rainStartDuration != 0 && this->localTimer < this->rainStartDuration) {
     192        if (this->rainFadeInDuration != 0 && this->localTimer < this->rainFadeInDuration) {
    185193                this->localTimer += dt;
    186                 float progress = this->localTimer / this->rainStartDuration;
     194                float progress = this->localTimer / this->rainFadeInDuration;
    187195
    188196                // Dim Light
     
    210218                this->deactivate();
    211219
    212         this->rainStartDuration = 10;
     220        if (!this->rainFadeInDuration > 0)
     221                this->rainFadeInDuration = 20;
     222
    213223        this->localTimer = 0;
    214224        this->activate();
Note: See TracChangeset for help on using the changeset viewer.