From c7bdd74ee6be9bbaff77c33567159f1acd71eb67 Mon Sep 17 00:00:00 2001 From: Michael Martin Date: Mon, 5 Oct 2020 21:22:51 -0700 Subject: [PATCH] Fix two bugs regarding stale SIS messages, from Kruzen When entering Hyperspace on Auto-Pilot, or are intercepted by neutral or hostile alien ships during Auto-Pilot, the text at the top of the screen doesn't update properly until the status would need to change. This corrects the times when DrawSisMessage is called to keep that up-to-date as needed. This patch was backported from the Mega-Mod. --- sc2/ChangeLog | 1 + sc2/src/uqm/encount.c | 1 + sc2/src/uqm/hyper.c | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index 589c52250..36052bb75 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -62,6 +62,7 @@ current Sourceforge installs; generic support now available for both HTTPS and automatic redirection to mirrors - Michael - Fixed MSYS resource script compilation/linking, from Ala-lala +- Fixed stale main-screen header text displays, from Kruzen 0.7.1: - New SDL2 backend for modern operating systems - Michael diff --git a/sc2/src/uqm/encount.c b/sc2/src/uqm/encount.c index ceb5c503c..9ab75c5a1 100644 --- a/sc2/src/uqm/encount.c +++ b/sc2/src/uqm/encount.c @@ -326,6 +326,7 @@ InitEncounter (void) t.CharCount = (COUNT)~0; font_DrawText (&t); } + DrawSISMessage (NULL); s.origin.x = SIS_SCREEN_WIDTH >> 1; s.origin.y = SIS_SCREEN_HEIGHT >> 1; diff --git a/sc2/src/uqm/hyper.c b/sc2/src/uqm/hyper.c index d09695271..9a9b9f46c 100644 --- a/sc2/src/uqm/hyper.c +++ b/sc2/src/uqm/hyper.c @@ -349,7 +349,10 @@ LoadHyperspace (void) RepairSISBorder (); } } - DrawSISMessage (NULL); + if (!(GLOBAL (autopilot.x) != ~0 && GLOBAL (autopilot.y) != ~0)) + { + DrawSISMessage (NULL); + } SetContext (RadarContext); SetContextBackGroundColor (