From 5d23241647492606f49ddf7a0608ab65840f4b6a Mon Sep 17 00:00:00 2001 From: mcmartin Date: Tue, 24 Feb 2004 04:52:58 +0000 Subject: [PATCH] Fixed a bug (#587) when loading from hyperspace, from Nic and Michael git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1331 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 ++ sc2/src/sc2code/battle.c | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index b1e797724..d0336ce8b 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.4: +- Fixed various odd behaviors when loading from HyperSpace (bug #587), + from Nic and Michael - Added new 'triscan' scaler; derived from scale2x[.sf.net] -Alex - Space marines die in a self-destructing Scout (Bug #445), from Nic - Added the -l option to produce logfiles (bug #560), from Nic diff --git a/sc2/src/sc2code/battle.c b/sc2/src/sc2code/battle.c index 00d96d2e0..d294cbae2 100644 --- a/sc2/src/sc2code/battle.c +++ b/sc2/src/sc2code/battle.c @@ -182,9 +182,11 @@ DoBattle (BATTLE_STATE *bs) SetTransitionSource (&r); } BatchGraphics (); - if (LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE) + if ((LOBYTE (GLOBAL (CurrentActivity)) == IN_HYPERSPACE) && + !(GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD))) SeedUniverse (); RedrawQueue (TRUE); + if (bs->first_time) { bs->first_time = FALSE; @@ -192,6 +194,11 @@ DoBattle (BATTLE_STATE *bs) } UnbatchGraphics (); UnlockMutex (GraphicsLock); + if ((!(GLOBAL (CurrentActivity) & IN_BATTLE)) || + (GLOBAL (CurrentActivity) & (CHECK_ABORT | CHECK_LOAD))) + { + return FALSE; + } if (nth_frame) TaskSwitch (); else