diff options
author | KUDr <kudr@openttd.org> | 2007-02-24 00:17:46 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2007-02-24 00:17:46 +0000 |
commit | 029ceda0f1c2f11231a0662cc45057f8452f645a (patch) | |
tree | a567351d7e9a2e7575b410393280573e0ba04d98 /src/yapf/yapf_ship.cpp | |
parent | 433b8054e9e63da606ccee3a23ec958d03200c75 (diff) | |
download | openttd-029ceda0f1c2f11231a0662cc45057f8452f645a.tar.xz |
(svn r8869) [YAPF] -Fix: Large Train Stations/Trains makes OpenTTD crash (Jigsaw_Psyche)
Diffstat (limited to 'src/yapf/yapf_ship.cpp')
-rw-r--r-- | src/yapf/yapf_ship.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/yapf/yapf_ship.cpp b/src/yapf/yapf_ship.cpp index 43f7eca73..94c0016f3 100644 --- a/src/yapf/yapf_ship.cpp +++ b/src/yapf/yapf_ship.cpp @@ -28,7 +28,7 @@ public: { TrackFollower F; if (F.Follow(old_node.m_key.m_tile, old_node.m_key.m_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 @@ -88,6 +88,7 @@ class CYapfCostShipT { public: typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::TrackFollower TrackFollower; typedef typename Types::NodeList::Titem Node; ///< this will be our node type typedef typename Node::Key Key; ///< key to hash tables @@ -99,7 +100,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) { // base tile cost depending on distance int c = IsDiagonalTrackdir(n.GetTrackdir()) ? 10 : 7; |