# HG changeset patch # User celestar # Date 2006-04-09 18:01:06 # Node ID 30335690958d84222cde578ec89c4cd78341f3c9 # Parent 7f515611a9f324c477cfa9c37a32b6efc4bb987a (svn r4338) -Fix (FS#105): Bug introduced in r4290. IsLevelCrossing does NOT check the tile type, it assumes the tile type IS MP_STREET diff --git a/train_cmd.c b/train_cmd.c --- a/train_cmd.c +++ b/train_cmd.c @@ -92,7 +92,7 @@ void TrainPowerChanged(Vehicle* v) 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 {