tunnelbridge_cmd.c
changeset 4656 acffecd6f484
parent 4559 c853d2440065
child 4848 56549aa3e234
equal deleted inserted replaced
4655:0783c829014a 4656:acffecd6f484
    26 #include "bridge.h"
    26 #include "bridge.h"
    27 #include "train.h"
    27 #include "train.h"
    28 #include "water_map.h"
    28 #include "water_map.h"
    29 #include "yapf/yapf.h"
    29 #include "yapf/yapf.h"
    30 #include "date.h"
    30 #include "date.h"
       
    31 #include "newgrf_sound.h"
    31 
    32 
    32 #include "table/bridge_land.h"
    33 #include "table/bridge_land.h"
    33 
    34 
    34 extern const byte _track_sloped_sprites[14];
    35 extern const byte _track_sloped_sprites[14];
    35 extern const SpriteID _water_shore_sprites[15];
    36 extern const SpriteID _water_shore_sprites[15];
  1359 			dir = GetTunnelDirection(tile);
  1360 			dir = GetTunnelDirection(tile);
  1360 			vdir = DirToDiagDir(v->direction);
  1361 			vdir = DirToDiagDir(v->direction);
  1361 
  1362 
  1362 			if (v->u.rail.track != 0x40 && dir == vdir) {
  1363 			if (v->u.rail.track != 0x40 && dir == vdir) {
  1363 				if (IsFrontEngine(v) && fc == _tunnel_fractcoord_1[dir]) {
  1364 				if (IsFrontEngine(v) && fc == _tunnel_fractcoord_1[dir]) {
  1364 					if (v->spritenum < 4)
  1365 					if (!PlayVehicleSound(v, VSE_TUNNEL) && v->spritenum < 4) {
  1365 						SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
  1366 						SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
       
  1367 					}
  1366 					return 0;
  1368 					return 0;
  1367 				}
  1369 				}
  1368 				if (fc == _tunnel_fractcoord_2[dir]) {
  1370 				if (fc == _tunnel_fractcoord_2[dir]) {
  1369 					v->tile = tile;
  1371 					v->tile = tile;
  1370 					v->u.rail.track = 0x40;
  1372 					v->u.rail.track = 0x40;