summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-07-10 01:25:17 +0000
committercelestar <celestar@openttd.org>2005-07-10 01:25:17 +0000
commitb45eee31570afd2045d199dd18a154c42952ad56 (patch)
tree4d36e1b0eda6ff1c3c42c8febff1fa7cf3ae7484 /train_cmd.c
parent5286a014ecd5ce1e846a67e5651dc83dd6d09624 (diff)
downloadopenttd-b45eee31570afd2045d199dd18a154c42952ad56.tar.xz
(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
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c3
1 files changed, 2 insertions, 1 deletions
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 {