mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-01 02:49:10 +00:00
(svn r8873) [0.5] -Backport from trunk (r8766, r8836, r8869):
- Rail station platform penalty not calculated properly (r8766) - Don't tell destination was found if it was only guessed (r8836) - Large Train Stations/Trains causes assert due to wrong cost calculation (r8869)
This commit is contained in:
@@ -66,7 +66,7 @@ public:
|
||||
/** Called by YAPF to calculate the cost from the origin to the given node.
|
||||
* Calculates only the cost of given node, adds it to the parent node cost
|
||||
* and stores the result into Node::m_cost member */
|
||||
FORCEINLINE bool PfCalcCost(Node& n)
|
||||
FORCEINLINE bool PfCalcCost(Node& n, const TrackFollower &tf)
|
||||
{
|
||||
int segment_cost = 0;
|
||||
// start at n.m_key.m_tile / n.m_key.m_td and walk to the end of segment
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
{
|
||||
TrackFollower F(Yapf().GetVehicle());
|
||||
if (F.Follow(old_node.m_segment_last_tile, old_node.m_segment_last_td))
|
||||
Yapf().AddMultipleNodes(&old_node, F.m_new_tile, F.m_new_td_bits);
|
||||
Yapf().AddMultipleNodes(&old_node, F);
|
||||
}
|
||||
|
||||
/// return debug report character to identify the transportation type
|
||||
|
Reference in New Issue
Block a user