summaryrefslogtreecommitdiff
path: root/aircraft_cmd.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-09-27 18:17:01 +0000
committerpeter1138 <peter1138@openttd.org>2006-09-27 18:17:01 +0000
commit653e7fa54843b4427908b47d2e7da8ee48071a18 (patch)
tree89f67db5c4825d95a0c5687363b43db1311ffae7 /aircraft_cmd.c
parent3ded010d91a755f3f719d5bfe91cda6d161ef2d0 (diff)
downloadopenttd-653e7fa54843b4427908b47d2e7da8ee48071a18.tar.xz
(svn r6532) - Feature: Add support for NewGRF sound effects. Currently sound priority isn't supported.
Diffstat (limited to 'aircraft_cmd.c')
-rw-r--r--aircraft_cmd.c9
1 files changed, 7 insertions, 2 deletions
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);
}