diff options
author | celestar <celestar@openttd.org> | 2005-07-10 01:25:17 +0000 |
---|---|---|
committer | celestar <celestar@openttd.org> | 2005-07-10 01:25:17 +0000 |
commit | 84faec4c4341a2310d9e97bc75170231ba5b1d43 (patch) | |
tree | 4d36e1b0eda6ff1c3c42c8febff1fa7cf3ae7484 /train_cmd.c | |
parent | 92a89005185d78932f6427ba27bf7d36c9aff20d (diff) | |
download | openttd-84faec4c4341a2310d9e97bc75170231ba5b1d43.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.c | 3 |
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 { |