summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2006-04-09 18:01:06 +0000
committercelestar <celestar@openttd.org>2006-04-09 18:01:06 +0000
commit896466db3116d1016dd5a8ccf44149fab0e741f9 (patch)
treea369c97efd5eb388e4381d23540e4ac89fec897b /train_cmd.c
parentf5a9e68f40aaff3c0dec6ef21f569ad4e90db77c (diff)
downloadopenttd-896466db3116d1016dd5a8ccf44149fab0e741f9.tar.xz
(svn r4338) -Fix (FS#105): Bug introduced in r4290. IsLevelCrossing does NOT check the tile type, it assumes the tile type IS MP_STREET
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/train_cmd.c b/train_cmd.c
index dbae80e3c..b8523272b 100644
--- 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 {