mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-06-24 06:00:05 +01:00
This commit is contained in:
parent
cca9dcdd57
commit
005892bfdb
@ -446,6 +446,11 @@ public:
|
|||||||
|
|
||||||
this->FindSafePositionOnNode(pPrev);
|
this->FindSafePositionOnNode(pPrev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the best PF node has no parent, then there is no (valid) best next trackdir to return.
|
||||||
|
* This occurs when the PF is called while the train is already at its destination. */
|
||||||
|
if (pPrev == nullptr) return INVALID_TRACKDIR;
|
||||||
|
|
||||||
/* return trackdir from the best origin node (one of start nodes) */
|
/* return trackdir from the best origin node (one of start nodes) */
|
||||||
Node &best_next_node = *pPrev;
|
Node &best_next_node = *pPrev;
|
||||||
next_trackdir = best_next_node.GetTrackdir();
|
next_trackdir = best_next_node.GetTrackdir();
|
||||||
|
Loading…
Reference in New Issue
Block a user