mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r19873) -Fix [FS#3817]: if the (guessed initial) destination tile of a road stop wasn't a road stop but was a T-junction or turn, the road vehicles would jump around in circles
This commit is contained in:
parent
a1b607a055
commit
d8d37466af
@ -326,8 +326,11 @@ public:
|
||||
|
||||
FORCEINLINE Trackdir ChooseRoadTrack(const RoadVehicle *v, TileIndex tile, DiagDirection enterdir)
|
||||
{
|
||||
/* handle special case - when next tile is destination tile */
|
||||
if (tile == v->dest_tile) {
|
||||
/* Handle special case - when next tile is destination tile.
|
||||
* However, when going to a station the (initial) destination
|
||||
* tile might not be a station, but a junction, in which case
|
||||
* this method forces the vehicle to jump in circles. */
|
||||
if (tile == v->dest_tile && !v->current_order.IsType(OT_GOTO_STATION)) {
|
||||
/* choose diagonal trackdir reachable from enterdir */
|
||||
return DiagDirToDiagTrackdir(enterdir);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user