From ffe957c9a68259491565633dde9d4841fe412bc3 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Wed, 23 Mar 2011 04:41:38 +0000 Subject: [PATCH] - added a way to disable water sounds: DisableWaterSounds=true --- source/glest_game/world/unit_updater.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index 206b9fc4..ed5a255c 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -219,13 +219,15 @@ void UnitUpdater::updateUnit(Unit *unit) { //play water sound if(map->getCell(unit->getPos())->getHeight() < map->getWaterLevel() && unit->getCurrField() == fLand) { - soundRenderer.playFx( - CoreData::getInstance().getWaterSound(), - unit->getCurrVector(), - gameCamera->getPos() - ); + if(Config::getInstance().getBool("DisableWaterSounds","false") == false) { + soundRenderer.playFx( + CoreData::getInstance().getWaterSound(), + unit->getCurrVector(), + gameCamera->getPos() + ); - if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s] Line: %d took msecs: %lld [after soundFx()]\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis()); + if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s] Line: %d took msecs: %lld [after soundFx()]\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis()); + } } } }