Feature: Hotkey to honk a vehicle's horn (#10110)
This commit is contained in:
@@ -2100,7 +2100,7 @@ bool Train::FindClosestDepot(TileIndex *location, DestinationID *destination, bo
|
||||
}
|
||||
|
||||
/** Play a sound for a train leaving the station. */
|
||||
void Train::PlayLeaveStationSound() const
|
||||
void Train::PlayLeaveStationSound(bool force) const
|
||||
{
|
||||
static const SoundFx sfx[] = {
|
||||
SND_04_DEPARTURE_STEAM,
|
||||
@@ -2110,10 +2110,9 @@ void Train::PlayLeaveStationSound() const
|
||||
SND_41_DEPARTURE_MAGLEV
|
||||
};
|
||||
|
||||
if (PlayVehicleSound(this, VSE_START)) return;
|
||||
if (PlayVehicleSound(this, VSE_START, force)) return;
|
||||
|
||||
EngineID engtype = this->engine_type;
|
||||
SndPlayVehicleFx(sfx[RailVehInfo(engtype)->engclass], this);
|
||||
SndPlayVehicleFx(sfx[RailVehInfo(this->engine_type)->engclass], this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user