Mercurial > hg > openttd
changeset 3487:80e953ba0417 draft
(svn r4338) -Fix (FS#105): Bug introduced in r4290. IsLevelCrossing does NOT check the tile type, it assumes the tile type IS MP_STREET
author | celestar <celestar@openttd.org> |
---|---|
date | Sun, 09 Apr 2006 18:01:06 +0000 |
parents | d2940b03b6ba |
children | 45c2f6ba0ba5 |
files | train_cmd.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/train_cmd.c +++ b/train_cmd.c @@ -92,7 +92,7 @@ if (IsBridgeTile(u->tile) && IsBridgeMiddle(u->tile) && DiagDirToAxis(DirToDiagDir(u->direction)) == GetBridgeAxis(u->tile)) { if (!HasPowerOnRail(u->u.rail.railtype, GetRailTypeOnBridge(u->tile))) engine_has_power = false; if (!HasPowerOnRail(v->u.rail.railtype, GetRailTypeOnBridge(u->tile))) wagon_has_power = false; - } else if (IsLevelCrossing(u->tile)) { + } else if (IsTileType(u->tile, MP_STREET) && IsLevelCrossing(u->tile)) { if (!HasPowerOnRail(u->u.rail.railtype, GetRailTypeCrossing(u->tile))) engine_has_power = false; if (!HasPowerOnRail(v->u.rail.railtype, GetRailTypeCrossing(u->tile))) wagon_has_power = false; } else {