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. --- tunnelbridge_cmd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tunnelbridge_cmd.c') 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]) { -- cgit v1.2.3-54-g00ecf