From 000de06890618bd9f69cd55d24425ed73cf81c39 Mon Sep 17 00:00:00 2001 From: Flugente Date: Fri, 3 Jul 2020 20:40:22 +0000 Subject: [PATCH] Fix: incorrect travel time calculation outside of pathing git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8834 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Strategic/Strategic Movement.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Strategic/Strategic Movement.cpp b/Strategic/Strategic Movement.cpp index a2d56535..aa398d93 100644 --- a/Strategic/Strategic Movement.cpp +++ b/Strategic/Strategic Movement.cpp @@ -3478,7 +3478,8 @@ INT32 GetSectorMvtTimeForGroup( UINT8 ubSector, UINT8 ubDirection, GROUP *pGroup curr = pGroup->pPlayerList; // Flugente: this function gets called a lot during pathing, so much that it can lead to lag. As weight remains the same while plotting a path, only do this if something has changed - if ( gSquadEncumbranceCheckNecessary ) + // always perform this check if called outside of the path plot function + if ( GetSelectedDestChar() == -1 || gSquadEncumbranceCheckNecessary ) { // reset values iHighestEncumbrance = 0;