diff options
Diffstat (limited to 'src/road_gui.cpp')
-rw-r--r-- | src/road_gui.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/road_gui.cpp b/src/road_gui.cpp index 3b23e9c01..74b31499b 100644 --- a/src/road_gui.cpp +++ b/src/road_gui.cpp @@ -63,7 +63,7 @@ static DiagDirection _road_station_picker_orientation; void CcPlaySound1D(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) { - if (result.Succeeded()) SndPlayTileFx(SND_1F_SPLAT, tile); + if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile); } /** @@ -93,7 +93,7 @@ static void PlaceRoad_Bridge(TileIndex tile, Window *w) void CcBuildRoadTunnel(const CommandCost &result, TileIndex start_tile, uint32 p1, uint32 p2) { if (result.Succeeded()) { - SndPlayTileFx(SND_20_SPLAT_2, start_tile); + if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, start_tile); if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace(); DiagDirection start_direction = ReverseDiagDir(GetTunnelBridgeDirection(start_tile)); @@ -174,7 +174,7 @@ void CcRoadDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2 if (result.Failed()) return; DiagDirection dir = (DiagDirection)GB(p1, 0, 2); - SndPlayTileFx(SND_1F_SPLAT, tile); + if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile); if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace(); ConnectRoadToStructure(tile, dir); } @@ -198,7 +198,7 @@ void CcRoadStop(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2) if (result.Failed()) return; DiagDirection dir = (DiagDirection)GB(p2, 6, 2); - SndPlayTileFx(SND_1F_SPLAT, tile); + if (_settings_client.sound.confirm) SndPlayTileFx(SND_1F_SPLAT, tile); if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace(); TileArea roadstop_area(tile, GB(p1, 0, 8), GB(p1, 8, 8)); TILE_AREA_LOOP(cur_tile, roadstop_area) { @@ -464,7 +464,7 @@ struct BuildRoadToolbarWindow : Window { DeleteWindowById(WC_SELECT_STATION, 0); ToggleRoadButton_Remove(this); - SndPlayFx(SND_15_BEEP); + if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); break; default: NOT_REACHED(); @@ -869,7 +869,7 @@ struct BuildRoadDepotWindow : public PickerWindowBase { this->RaiseWidget(_road_depot_orientation + WID_BROD_DEPOT_NE); _road_depot_orientation = (DiagDirection)(widget - WID_BROD_DEPOT_NE); this->LowerWidget(_road_depot_orientation + WID_BROD_DEPOT_NE); - SndPlayFx(SND_15_BEEP); + if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); this->SetDirty(); break; @@ -998,7 +998,7 @@ struct BuildRoadStationWindow : public PickerWindowBase { this->RaiseWidget(_road_station_picker_orientation + WID_BROS_STATION_NE); _road_station_picker_orientation = (DiagDirection)(widget - WID_BROS_STATION_NE); this->LowerWidget(_road_station_picker_orientation + WID_BROS_STATION_NE); - SndPlayFx(SND_15_BEEP); + if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); this->SetDirty(); DeleteWindowById(WC_SELECT_STATION, 0); break; @@ -1008,7 +1008,7 @@ struct BuildRoadStationWindow : public PickerWindowBase { this->RaiseWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF); _settings_client.gui.station_show_coverage = (widget != WID_BROS_LT_OFF); this->LowerWidget(_settings_client.gui.station_show_coverage + WID_BROS_LT_OFF); - SndPlayFx(SND_15_BEEP); + if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP); this->SetDirty(); break; |