summaryrefslogtreecommitdiff
path: root/src/dock_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-23 21:09:09 +0000
committerfrosch <frosch@openttd.org>2012-12-23 21:09:09 +0000
commit3ce8d2ce706fc14084a7d33a000d0b7a39fb19db (patch)
tree6dde407ee402de6f5a5b75059a076222e80c7c0c /src/dock_gui.cpp
parent345c3203d74b485f5f6569b87c06ad9af79422a2 (diff)
downloadopenttd-3ce8d2ce706fc14084a7d33a000d0b7a39fb19db.tar.xz
(svn r24846) -Add: Advanced settings to disable certain sound effects.
Diffstat (limited to 'src/dock_gui.cpp')
-rw-r--r--src/dock_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dock_gui.cpp b/src/dock_gui.cpp
index e7b864618..4779feb72 100644
--- a/src/dock_gui.cpp
+++ b/src/dock_gui.cpp
@@ -40,13 +40,13 @@ void CcBuildDocks(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p
{
if (result.Failed()) return;
- SndPlayTileFx(SND_02_SPLAT, tile);
+ if (_settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT, tile);
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
}
void CcBuildCanal(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
{
- if (result.Succeeded()) SndPlayTileFx(SND_02_SPLAT, tile);
+ if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_02_SPLAT, tile);
}
@@ -436,7 +436,7 @@ public:
this->RaiseWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF);
_settings_client.gui.station_show_coverage = (widget != BDSW_LT_OFF);
this->LowerWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF);
- SndPlayFx(SND_15_BEEP);
+ if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->SetDirty();
break;
}
@@ -514,7 +514,7 @@ public:
this->RaiseWidget(_ship_depot_direction + WID_BDD_X);
_ship_depot_direction = (widget == WID_BDD_X ? AXIS_X : AXIS_Y);
this->LowerWidget(_ship_depot_direction + WID_BDD_X);
- SndPlayFx(SND_15_BEEP);
+ if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
UpdateDocksDirection();
this->SetDirty();
break;