tunnelbridge_cmd.c
changeset 1067 3ba7987a004e
parent 1059 fe97d81a1b4f
child 1073 4e8f5f9d673d
--- a/tunnelbridge_cmd.c	Wed Jan 19 13:31:46 2005 +0000
+++ b/tunnelbridge_cmd.c	Wed Jan 19 19:15:03 2005 +0000
@@ -1413,7 +1413,7 @@
 			vdir = v->direction >> 1;
 
 			if (v->u.rail.track != 0x40 && dir == vdir) {
-				if (v->subtype == 0 && fc == _tunnel_fractcoord_1[dir]) {
+				if (v->subtype == TS_Front_Engine && fc == _tunnel_fractcoord_1[dir]) {
 					if (v->spritenum < 4)
 						SndPlayVehicleFx(SND_05_TRAIN_THROUGH_TUNNEL, v);
 					return 0;
@@ -1465,7 +1465,7 @@
 			}
 		}
 	} else if (_map5[tile] & 0x80) {
-		if (v->type == VEH_Road || (v->type == VEH_Train && v->subtype == 0)) {
+		if (v->type == VEH_Road || (v->type == VEH_Train && v->subtype == TS_Front_Engine)) {
 			if (GetTileSlope(tile, &h) != 0)
 				h += 8; // Compensate for possible foundation
 			if (!(_map5[tile] & 0x40) || // start/end tile of bridge