(svn r21924) -Codechange: Unify some parts of the articulated vehicle code.

-Cleanup: Avoid conversions to Train and RoadVehicle that are no longer required.
This commit is contained in:
terkhen
2011-01-29 17:30:25 +00:00
parent 50b0e10026
commit 734994c9ba
9 changed files with 26 additions and 56 deletions

View File

@@ -2953,7 +2953,7 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i
if (v->type == VEH_TRAIN) {
StationID station_id = GetStationIndex(tile);
if (!v->current_order.ShouldStopAtStation(v, station_id)) return VETSB_CONTINUE;
if (!IsRailStation(tile) || !Train::From(v)->IsFrontEngine()) return VETSB_CONTINUE;
if (!IsRailStation(tile) || !v->IsFrontEngine()) return VETSB_CONTINUE;
int station_ahead;
int station_length;