(svn r14526) -Fix [FS#2379]: make sure trains stop at the end of a station; a 3/8th length train did stop 2/8th of it's length too early causing a 63/8th long train not to fit in a 4 tile station.
This commit is contained in:
@@ -4104,7 +4104,7 @@ static bool TrainApproachingLineEnd(Vehicle *v, bool signal)
|
||||
}
|
||||
|
||||
/* do not reverse when approaching red signal */
|
||||
if (!signal && x + 4 >= TILE_SIZE) {
|
||||
if (!signal && x + (v->u.rail.cached_veh_length + 1) / 2 >= TILE_SIZE) {
|
||||
/* we are too near the tile end, reverse now */
|
||||
v->cur_speed = 0;
|
||||
ReverseTrainDirection(v);
|
||||
|
Reference in New Issue
Block a user