From cfe01253b9e15043113dc2d4bf4140ba21a915f8 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Mon, 28 Nov 2011 06:38:07 +0000 Subject: [PATCH] fixed ambient sounds when rain is disabled. --- source/glest_game/game/game.cpp | 5 ++++- source/glest_game/world/tileset.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index df1c32e7..a1c9b289 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -915,7 +915,7 @@ void Game::init(bool initForPreviewOnly) { withRainEffect = false; } - if(withRainEffect){ + if(withRainEffect) { //weather particle systems if(world.getTileset()->getWeather() == wRainy) { logger.add(Lang::getInstance().get("LogScreenGameLoadingCreatingRainParticles","",true), true); @@ -933,6 +933,9 @@ void Game::init(bool initForPreviewOnly) { renderer.manageParticleSystem(weatherParticleSystem, rsGame); } } + else if(world.getTileset()->getWeather() == wRainy) { + world.getTileset()->setWeather(wSunny); + } } //init renderer state diff --git a/source/glest_game/world/tileset.h b/source/glest_game/world/tileset.h index f345c9d0..e99e2eb0 100644 --- a/source/glest_game/world/tileset.h +++ b/source/glest_game/world/tileset.h @@ -151,6 +151,7 @@ public: const Vec3f &getSunLightColor() const {return sunLightColor;} const Vec3f &getMoonLightColor() const {return moonLightColor;} Weather getWeather() const {return weather;} + void setWeather(Weather value) { weather = value; } //surface textures const Pixmap2D *getSurfPixmap(int type, int var) const;