(svn r26422) -Fix [FS#5946]: Some road constructions used the rail sound effect. Rename the enum items to properly reflect their purpose.
This commit is contained in:
@@ -86,7 +86,7 @@ static bool IsStationAvailable(const StationSpec *statspec)
|
||||
|
||||
void CcPlaySound1E(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
|
||||
if (result.Succeeded() && _settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
|
||||
}
|
||||
|
||||
static void GenericPlaceRail(TileIndex tile, int cmd)
|
||||
@@ -133,7 +133,7 @@ void CcRailDepot(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2
|
||||
|
||||
DiagDirection dir = (DiagDirection)p2;
|
||||
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
|
||||
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
||||
|
||||
tile += TileOffsByDiagDir(dir);
|
||||
@@ -171,7 +171,7 @@ void CcStation(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (result.Failed()) return;
|
||||
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
|
||||
/* Only close the station builder window if the default station and non persistent building is chosen. */
|
||||
if (_railstation.station_class == STAT_CLASS_DFLT && _railstation.station_type == 0 && !_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
||||
}
|
||||
@@ -272,7 +272,7 @@ static void PlaceRail_Bridge(TileIndex tile, Window *w)
|
||||
void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
|
||||
{
|
||||
if (result.Succeeded()) {
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_2, tile);
|
||||
if (_settings_client.sound.confirm) SndPlayTileFx(SND_20_SPLAT_RAIL, tile);
|
||||
if (!_settings_client.gui.persistent_buildingtools) ResetObjectToPlace();
|
||||
} else {
|
||||
SetRedErrorSquare(_build_tunnel_endtile);
|
||||
|
Reference in New Issue
Block a user