Preload grid on flightpath 2 nodes before final node instead of halfway.

Previous setup could preload grid in a long flight and unload it again in the very same flight.

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-06-23 02:03:50 +02:00
parent 968c27f55f
commit b917d5029e
@@ -335,7 +335,7 @@ void FlightPathMovementGenerator::InitEndGridInfo()
uint32 nodeCount = (*i_path).size(); // Get the number of nodes in the path.
m_endMapId = (*i_path)[nodeCount -1].mapid; // Get the map ID from the last node
m_preloadTargetNode = nodeCount / 2; // Split the number of nodes in half to preload the flightmaster half-way through the flight
m_preloadTargetNode = nodeCount - 3; // 2 nodes before the final node, we pre-load the grid
m_endGridX = (*i_path)[nodeCount -1].x; // Get the X position from the last node
m_endGridY = (*i_path)[nodeCount -1].y; // Get the Y position from the last node
}