From 9ddfb25d8d9513f15db8b40b2e422b9303fd1078 Mon Sep 17 00:00:00 2001 From: gewlitys Date: Sat, 30 Nov 2002 15:54:28 +0000 Subject: [PATCH] Autopilot blinking in combat/starmap fixed git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@270 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/clock.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/sc2/src/sc2code/clock.c b/sc2/src/sc2code/clock.c index 42863afbf..e1a5985fe 100644 --- a/sc2/src/sc2code/clock.c +++ b/sc2/src/sc2code/clock.c @@ -132,15 +132,21 @@ int clock_task_func(void* data) } else { - if (!(GLOBAL (CurrentActivity) & CHECK_ABORT) + if (!(GLOBAL (CurrentActivity) & (CHECK_ABORT)) && GLOBAL_SIS (CrewEnlisted) != (COUNT)~0) { - CONTEXT OldContext; + // 2002/11/30 this additional 'if' fixes autopilot indicator blinking on combat/starmap + // TODO: is there a better (more exact) way of determining if player is in starmap menu or not? + if (LOBYTE (GLOBAL (CurrentActivity)) != IN_ENCOUNTER && + (!pMenuState || (pMenuState && pMenuState->InputFunc == DoFlagshipCommands))) + { + CONTEXT OldContext; - OldContext = SetContext (OffScreenContext); - SetContextForeGroundColor (cycle_tab[cycle_index]); - DrawSISMessage ((UNICODE *)~0L); - SetContext (OldContext); + OldContext = SetContext (OffScreenContext); + SetContextForeGroundColor (cycle_tab[cycle_index]); + DrawSISMessage ((UNICODE *)~0L); + SetContext (OldContext); + } } cycle_index = (cycle_index + 1) % NUM_CYCLES;