Fix train through load always advancing last section to far end of platform

This commit is contained in:
Jonathan G Rennison
2018-03-26 21:11:11 +01:00
parent f012d45491
commit c779915ccb

View File

@@ -353,6 +353,8 @@ int GetTrainStopLocation(StationID station_id, TileIndex tile, Train *v, int *st
OrderStopLocation osl = OSL_PLATFORM_MIDDLE;
if (front->current_order.IsType(OT_GOTO_STATION) && front->current_order.GetDestination() == station_id) {
osl = front->current_order.GetStopLocation();
} else if (front->current_order.IsType(OT_LOADING_ADVANCE) && front->current_order.GetDestination() == station_id) {
osl = OSL_PLATFORM_THROUGH;
}
int overhang = front->gcache.cached_total_length - *station_length;
int adjust = 0;