Changeset 9224 in orxonox.OLD for branches/presentation/src
- Timestamp:
- Jul 5, 2006, 1:25:54 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/lib/graphics/effects/rain_effect.cc
r9201 r9224 96 96 */ 97 97 void RainEffect::init() { 98 99 this->rainParticles = NULL; 100 this->emitter = NULL; 101 this->rainBuffer = NULL; 102 this->windBuffer = NULL; 103 this->lightMan = NULL; 104 98 105 //Default values 99 106 this->rainActivate = false; … … 191 198 CloudEffect::changeSkyColor(this->skyColor, 0.2); 192 199 } 193 200 194 201 //lightMan->setAmbientColor(.1,.1,.1); 195 202 } … … 247 254 248 255 // increase sound volume 249 if (!this->soundSource.isPlaying()) 256 if (progress > 0.5) { 257 if (!this->soundSource.isPlaying()) 250 258 this->soundSource.play(this->rainBuffer, this->soundRainVolume, true); 251 this->soundSource.gain(this->rainBuffer, this->soundRainVolume * progress); 259 this->soundSource.gain(this->rainBuffer, this->soundRainVolume * progress * 2 - 0.5); 260 } 252 261 253 262 if (progress >= 1) 254 263 this->rainFadeInActivate = false; 255 264 256 265 lightMan->setAmbientColor(1-progress, 1-progress, 1-progress); 257 266 }
Note: See TracChangeset
for help on using the changeset viewer.