From e6668f24b508b079aa4525d06abd2ea5aa9e641d Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Sat, 16 Nov 2013 17:52:00 +0000 Subject: (svn r26013) -Revert (r25495) [FS#5684]: Having trains miss a platform that is just being modified is less of a problem than having trains stop twice without moving. --- src/station_cmd.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 0bed79582..6b158aaf1 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3137,11 +3137,13 @@ static VehicleEnterTileStatus VehicleEnter_Station(Vehicle *v, TileIndex tile, i if (dir != DIAGDIR_SE && dir != DIAGDIR_SW) x = TILE_SIZE - 1 - x; stop &= TILE_SIZE - 1; - if (x >= stop) return VETSB_ENTERED_STATION | (VehicleEnterTileStatus)(station_id << VETS_STATION_ID_OFFSET); // enter station - - v->vehstatus |= VS_TRAIN_SLOWING; - uint16 spd = max(0, (stop - x) * 20 - 15); - if (spd < v->cur_speed) v->cur_speed = spd; + if (x == stop) { + return VETSB_ENTERED_STATION | (VehicleEnterTileStatus)(station_id << VETS_STATION_ID_OFFSET); // enter station + } else if (x < stop) { + v->vehstatus |= VS_TRAIN_SLOWING; + uint16 spd = max(0, (stop - x) * 20 - 15); + if (spd < v->cur_speed) v->cur_speed = spd; + } } } else if (v->type == VEH_ROAD) { RoadVehicle *rv = RoadVehicle::From(v); -- cgit v1.2.3-54-g00ecf