From 73070b004b8c6f7e3dc3f98909b67e8e66c61473 Mon Sep 17 00:00:00 2001 From: Sevenfm Date: Thu, 22 Apr 2021 06:14:00 +0000 Subject: [PATCH] Fix: path not being erased and recalculated when changing selected soldier via SPACE button (by Shadooow). git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8964 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Interface Panels.cpp | 2 +- Tactical/Turn Based Input.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Tactical/Interface Panels.cpp b/Tactical/Interface Panels.cpp index 4603d28c9..d02324e2d 100644 --- a/Tactical/Interface Panels.cpp +++ b/Tactical/Interface Panels.cpp @@ -5699,7 +5699,7 @@ void RenderTEAMPanel( BOOLEAN fDirty ) if (gTacticalStatus.uiFlags & INCOMBAT ) { - VarFindFontCenterCoordinates( sTEAMApXY[ posIndex ], sTEAMApXY[ posIndex + 1], TM_AP_WIDTH, TM_AP_HEIGHT, TINYFONT1, &sFontX, &sFontY, L"%d", GetUIApsToDisplay( pSoldier ) ); + VarFindFontCenterCoordinates( sTEAMApXY[ posIndex ], sTEAMApXY[ posIndex + 1], TM_AP_WIDTH, TM_AP_HEIGHT, TINYFONT1, &sFontX, &sFontY, L"%d", GetUIApsToDisplay( pSoldier ) ); mprintf( sFontX, sTEAMApXY[ posIndex + 1], L"%d", GetUIApsToDisplay( pSoldier ) ); } } diff --git a/Tactical/Turn Based Input.cpp b/Tactical/Turn Based Input.cpp index 0c2ba66d6..7e65e5919 100644 --- a/Tactical/Turn Based Input.cpp +++ b/Tactical/Turn Based Input.cpp @@ -2295,6 +2295,9 @@ void GetKeyboardInput( UINT32 *puiNewEvent ) HandleLocateSelectMerc( bID, LOCATEANDSELECT_MERC ); + ErasePath(TRUE); + gfPlotNewMovement = TRUE; + // Center to guy.... LocateSoldier( gusSelectedSoldier, SETLOCATOR ); }