diff options
author | rubidium <rubidium@openttd.org> | 2007-02-27 23:36:28 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-02-27 23:36:28 +0000 |
commit | 490811535584e73888fe8177b385b29d08d46daa (patch) | |
tree | 201d8919a041bd0eb12b24c8ba055c4d47310c76 /src/train_cmd.cpp | |
parent | fbd6a88d02035fad651a342f74221dc152342451 (diff) | |
download | openttd-490811535584e73888fe8177b385b29d08d46daa.tar.xz |
(svn r8935) -Codechange: unification of track type between road and rail tiles, unification of ground type between normal rail tiles and depots/waypoints and removing the need for RailTileSubType.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r-- | src/train_cmd.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index f9000fdbb..31f7b1700 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -67,7 +67,7 @@ void TrainPowerChanged(Vehicle* v) /* Power is not added for articulated parts */ if (IsArticulatedPart(u)) continue; - RailType railtype = (IsLevelCrossingTile(u->tile) ? GetRailTypeCrossing(u->tile) : GetRailType(u->tile)); + RailType railtype = GetRailType(u->tile); bool engine_has_power = HasPowerOnRail(u->u.rail.railtype, railtype); bool wagon_has_power = HasPowerOnRail(v->u.rail.railtype, railtype); @@ -2705,10 +2705,7 @@ static bool CheckCompatibleRail(const Vehicle *v, TileIndex tile) return IsTileOwner(tile, v->owner) && ( !IsFrontEngine(v) || - HASBIT( - v->u.rail.compatible_railtypes, - IsTileType(tile, MP_STREET) ? GetRailTypeCrossing(tile) : GetRailType(tile) - ) + HASBIT(v->u.rail.compatible_railtypes, GetRailType(tile)) ); } |