From 84faec4c4341a2310d9e97bc75170231ba5b1d43 Mon Sep 17 00:00:00 2001 From: celestar Date: Sun, 10 Jul 2005 01:25:17 +0000 Subject: (svn r2541) -Feature: Modified IsCompatibleRail so that an engine can move on more than one railtype (like Diesel engines on electrified rail). -Codechange: Use IsCompatibleRail where it should be used --- train_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'train_cmd.c') diff --git a/train_cmd.c b/train_cmd.c index d8ac7a051..b23c6e9e4 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -2542,7 +2542,8 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile) return IsTileOwner(tile, v->owner) && - (v->subtype != TS_Front_Engine || (_map3_lo[tile] & 0xF) == v->u.rail.railtype); + (v->subtype != TS_Front_Engine || + IsCompatibleRail(v->u.rail.railtype, GetRailType(tile))); } typedef struct { -- cgit v1.2.3-54-g00ecf