mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-05 02:36:20 +01:00
This commit is contained in:
parent
ab353f8ad5
commit
08ff1ab93e
@ -263,7 +263,10 @@ public:
|
|||||||
}
|
}
|
||||||
node = node->m_parent;
|
node = node->m_parent;
|
||||||
}
|
}
|
||||||
assert(!path_cache.empty());
|
|
||||||
|
/* A empty path means we are already at the destination. The pathfinder shouldn't have been called at all.
|
||||||
|
* Return a random reachable trackdir to hopefully nudge the ship out of this strange situation. */
|
||||||
|
if (path_cache.empty()) return GetRandomFollowUpTrackdir(v, src_tile, trackdir, true);
|
||||||
|
|
||||||
/* Take out the last trackdir as the result. */
|
/* Take out the last trackdir as the result. */
|
||||||
const Trackdir result = path_cache.front();
|
const Trackdir result = path_cache.front();
|
||||||
|
Loading…
Reference in New Issue
Block a user