From 653e7fa54843b4427908b47d2e7da8ee48071a18 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 27 Sep 2006 18:17:01 +0000 Subject: (svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported. --- aircraft_cmd.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'aircraft_cmd.c') diff --git a/aircraft_cmd.c b/aircraft_cmd.c index e9ed824b4..d7c8a31bd 100644 --- a/aircraft_cmd.c +++ b/aircraft_cmd.c @@ -23,6 +23,7 @@ #include "newgrf_engine.h" #include "newgrf_callbacks.h" #include "newgrf_text.h" +#include "newgrf_sound.h" #include "date.h" static bool AirportMove(Vehicle *v, const AirportFTAClass *Airport); @@ -858,7 +859,9 @@ static void ServiceAircraft(Vehicle *v) static void PlayAircraftSound(const Vehicle* v) { - SndPlayVehicleFx(AircraftVehInfo(v->engine_type)->sfx, v); + if (!PlayVehicleSound(v, VSE_START)) { + SndPlayVehicleFx(AircraftVehInfo(v->engine_type)->sfx, v); + } } static bool UpdateAircraftSpeed(Vehicle *v) @@ -1426,7 +1429,9 @@ static void AircraftLand(Vehicle *v) static void AircraftLandAirplane(Vehicle *v) { AircraftLand(v); - SndPlayVehicleFx(SND_17_SKID_PLANE, v); + if (!PlayVehicleSound(v, VSE_TOUCHDOWN)) { + SndPlayVehicleFx(SND_17_SKID_PLANE, v); + } MaybeCrashAirplane(v); } -- cgit v1.2.3-70-g09d2