From 0171aae10965259aa146749b0bd6e47ad9d3e4f7 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 7 Jun 2005 21:37:00 +0000 Subject: (svn r2433) - CodeChange: unmagicify all road/train crossings with IsLevelCrossing() function (peter1138) --- train_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'train_cmd.c') diff --git a/train_cmd.c b/train_cmd.c index 547aedf88..ded96b417 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -1258,7 +1258,7 @@ static void *TestTrainOnCrossing(Vehicle *v, void *data) static void DisableTrainCrossing(TileIndex tile) { /* Test if we have a rail/road-crossing */ - if (IsTileType(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x10) { + if (IsTileType(tile, MP_STREET) && IsLevelCrossing(tile)) { /* Check if there is a train on the tile itself */ if (VehicleFromPos(tile, &tile, TestTrainOnCrossing) == NULL) { /* If light is on, switch light off */ @@ -3082,7 +3082,7 @@ static bool TrainCheckIfLineEnds(Vehicle *v) } if ((ts &= (ts >> 16)) == 0) { // make a rail/road crossing red - if (IsTileType(tile, MP_STREET) && (_map5[tile] & 0xF0) == 0x10) { + if (IsTileType(tile, MP_STREET) && IsLevelCrossing(tile)) { if (!(_map5[tile] & 4)) { _map5[tile] |= 4; SndPlayVehicleFx(SND_0E_LEVEL_CROSSING, v); -- cgit v1.2.3-54-g00ecf