summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2010-03-07 15:10:39 +0000
committerpeter1138 <peter1138@openttd.org>2010-03-07 15:10:39 +0000
commit58012c6e6bde1dc6d480d928de24773f75957938 (patch)
tree6c7efbefbdaa5bff18aebc48e95ccbf83b8d2738
parent5881a80b6d445ce4d699ada1056e0dd7bf02f51c (diff)
downloadopenttd-58012c6e6bde1dc6d480d928de24773f75957938.tar.xz
(svn r19364) -Fix [FS#3668]: Implement custom sound effect for helicopter take-off.
-rw-r--r--src/aircraft_cmd.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 395c6edcc..d53cdb900 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -876,7 +876,11 @@ static bool AircraftController(Aircraft *v)
/* Make sure the rotors don't rotate too fast */
if (u->cur_speed > 32) {
v->cur_speed = 0;
- if (--u->cur_speed == 32) SndPlayVehicleFx(SND_18_HELICOPTER, v);
+ if (--u->cur_speed == 32) {
+ if (!PlayVehicleSound(v, VSE_START)) {
+ SndPlayVehicleFx(SND_18_HELICOPTER, v);
+ }
+ }
} else {
u->cur_speed = 32;
count = UpdateAircraftSpeed(v);