summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--train_cmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 43c67132c..d01bfb767 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -2465,8 +2465,10 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile)
case MP_STREET:
// tracks over roads, do owner check of tracks
return
- IsTileOwner(tile, v->owner) &&
- (v->subtype != TS_Front_Engine || GB(_m[tile].m4, 0, 4) == v->u.rail.railtype);
+ IsTileOwner(tile, v->owner) && (
+ v->subtype != TS_Front_Engine ||
+ IsCompatibleRail(v->u.rail.railtype, GB(_m[tile].m4, 0, 4))
+ );
default:
return true;