- added a way to disable water sounds: DisableWaterSounds=true
This commit is contained in:
parent
6f523bb96a
commit
ffe957c9a6
|
@ -219,13 +219,15 @@ 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) {
|
||||||
soundRenderer.playFx(
|
if(Config::getInstance().getBool("DisableWaterSounds","false") == false) {
|
||||||
CoreData::getInstance().getWaterSound(),
|
soundRenderer.playFx(
|
||||||
unit->getCurrVector(),
|
CoreData::getInstance().getWaterSound(),
|
||||||
gameCamera->getPos()
|
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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue