- added a way to disable water sounds: DisableWaterSounds=true

This commit is contained in:
Mark Vejvoda 2011-03-23 04:41:38 +00:00
parent 6f523bb96a
commit ffe957c9a6
1 changed files with 8 additions and 6 deletions

View File

@ -219,6 +219,7 @@ void UnitUpdater::updateUnit(Unit *unit) {
//play water sound //play water sound
if(map->getCell(unit->getPos())->getHeight() < map->getWaterLevel() && unit->getCurrField() == fLand) { if(map->getCell(unit->getPos())->getHeight() < map->getWaterLevel() && unit->getCurrField() == fLand) {
if(Config::getInstance().getBool("DisableWaterSounds","false") == false) {
soundRenderer.playFx( soundRenderer.playFx(
CoreData::getInstance().getWaterSound(), CoreData::getInstance().getWaterSound(),
unit->getCurrVector(), unit->getCurrVector(),
@ -229,6 +230,7 @@ void UnitUpdater::updateUnit(Unit *unit) {
} }
} }
} }
}
if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s] Line: %d took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis()); if(chrono.getMillis() > 0) SystemFlags::OutputDebug(SystemFlags::debugPerformance,"In [%s::%s] Line: %d took msecs: %lld\n",__FILE__,__FUNCTION__,__LINE__,chrono.getMillis());