Merge branch 'master' into jgrpp
# Conflicts: # src/ai/ai_gui.cpp # src/build_vehicle_gui.cpp # src/genworld_gui.cpp # src/lang/english.txt # src/lang/german.txt # src/lang/korean.txt # src/newgrf_sound.cpp # src/roadveh.h # src/sound.cpp # src/station_cmd.cpp # src/train.h # src/train_cmd.cpp # src/vehicle.cpp # src/vehicle_base.h # src/vehicle_gui.cpp
This commit is contained in:
@@ -181,11 +181,12 @@ SoundID GetNewGRFSoundID(const GRFFile *file, SoundID sound_id)
|
||||
* Checks whether a NewGRF wants to play a different vehicle sound effect.
|
||||
* @param v Vehicle to play sound effect for.
|
||||
* @param event Trigger for the sound effect.
|
||||
* @param force Should we play the sound effect even if vehicle sound effects are muted?
|
||||
* @return false if the default sound effect shall be played instead.
|
||||
*/
|
||||
bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event)
|
||||
bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event, bool force)
|
||||
{
|
||||
if (!_settings_client.sound.vehicle || _settings_client.music.effect_vol == 0) return true;
|
||||
if ((!_settings_client.sound.vehicle || _settings_client.music.effect_vol == 0) && !force) return true;
|
||||
|
||||
const GRFFile *file = v->GetGRF();
|
||||
uint16 callback;
|
||||
|
||||
Reference in New Issue
Block a user