summaryrefslogtreecommitdiff
path: root/tunnelbridge_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 /tunnelbridge_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 'tunnelbridge_cmd.c')
-rw-r--r--tunnelbridge_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tunnelbridge_cmd.c b/tunnelbridge_cmd.c
index e16e1f4d7..c7c56a37f 100644
--- a/tunnelbridge_cmd.c
+++ b/tunnelbridge_cmd.c
@@ -28,6 +28,7 @@
#include "water_map.h"
#include "yapf/yapf.h"
#include "date.h"
+#include "newgrf_sound.h"
#include "table/bridge_land.h"
@@ -1361,8 +1362,9 @@ static uint32 VehicleEnter_TunnelBridge(Vehicle *v, TileIndex tile, int x, int y
if (v->u.rail.track != 0x40 && dir == vdir) {
if (IsFrontEngine(v) && fc == _tunnel_fractcoord_1[dir]) {
- if (v->spritenum < 4)
+ if (!PlayVehicleSound(v, VSE_TUNNEL) && v->spritenum < 4) {
SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
+ }
return 0;
}
if (fc == _tunnel_fractcoord_2[dir]) {