fixed ambient sounds when rain is disabled.

This commit is contained in:
Mark Vejvoda
2011-11-28 06:38:07 +00:00
parent 21d06fd386
commit cfe01253b9
2 changed files with 5 additions and 1 deletions

View File

@@ -915,7 +915,7 @@ void Game::init(bool initForPreviewOnly) {
withRainEffect = false; withRainEffect = false;
} }
if(withRainEffect){ if(withRainEffect) {
//weather particle systems //weather particle systems
if(world.getTileset()->getWeather() == wRainy) { if(world.getTileset()->getWeather() == wRainy) {
logger.add(Lang::getInstance().get("LogScreenGameLoadingCreatingRainParticles","",true), true); logger.add(Lang::getInstance().get("LogScreenGameLoadingCreatingRainParticles","",true), true);
@@ -933,6 +933,9 @@ void Game::init(bool initForPreviewOnly) {
renderer.manageParticleSystem(weatherParticleSystem, rsGame); renderer.manageParticleSystem(weatherParticleSystem, rsGame);
} }
} }
else if(world.getTileset()->getWeather() == wRainy) {
world.getTileset()->setWeather(wSunny);
}
} }
//init renderer state //init renderer state

View File

@@ -151,6 +151,7 @@ public:
const Vec3f &getSunLightColor() const {return sunLightColor;} const Vec3f &getSunLightColor() const {return sunLightColor;}
const Vec3f &getMoonLightColor() const {return moonLightColor;} const Vec3f &getMoonLightColor() const {return moonLightColor;}
Weather getWeather() const {return weather;} Weather getWeather() const {return weather;}
void setWeather(Weather value) { weather = value; }
//surface textures //surface textures
const Pixmap2D *getSurfPixmap(int type, int var) const; const Pixmap2D *getSurfPixmap(int type, int var) const;