From b917d5029ed6d10547633a587751d8a7dee5b962 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Wed, 23 Jun 2010 02:03:50 +0200 Subject: [PATCH] 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 --- .../Movement/MovementGenerators/WaypointMovementGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp index beb5186a8b..4cadfe1cfb 100644 --- a/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp +++ b/src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp @@ -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 }