From 83915976bd670348bfecf726c0ddd6678cdf42e5 Mon Sep 17 00:00:00 2001 From: mcmartin Date: Mon, 8 Jan 2007 02:26:13 +0000 Subject: [PATCH] Do not overwrite GLOBAL_SIS (CrewEnlisted) when leaving HyperSpace. This fixes bug #938. Entering combat while *in* HyperSpace appears to still update crew counts appropriately. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2646 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/ChangeLog | 2 ++ sc2/src/sc2code/ships/sis_ship/sis_ship.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sc2/ChangeLog b/sc2/ChangeLog index f7d5fc1bc..cd5e6c234 100644 --- a/sc2/ChangeLog +++ b/sc2/ChangeLog @@ -1,4 +1,6 @@ Changes towards version 0.7: +- Do not overwrite GLOBAL_SIS (CrewEnlisted) when leaving Hyperspace + (Bug #938) - Michael - Fixed a text entry width problem that was deleting control template names (Bug #947) - Michael - uio cleanups, documentation - SvdB diff --git a/sc2/src/sc2code/ships/sis_ship/sis_ship.c b/sc2/src/sc2code/ships/sis_ship/sis_ship.c index 235a3524a..f9c0a37b1 100644 --- a/sc2/src/sc2code/ships/sis_ship/sis_ship.c +++ b/sc2/src/sc2code/ships/sis_ship/sis_ship.c @@ -881,9 +881,12 @@ init_sis (void) void uninit_sis (RACE_DESCPTR pRaceDesc) { - GLOBAL_SIS (CrewEnlisted) = pRaceDesc->ship_info.crew_level; - if (pRaceDesc->ship_info.ship_flags & PLAYER_CAPTAIN) - GLOBAL_SIS (CrewEnlisted)--; + if (LOBYTE (GLOBAL (CurrentActivity)) != IN_HYPERSPACE) + { + GLOBAL_SIS (CrewEnlisted) = pRaceDesc->ship_info.crew_level; + if (pRaceDesc->ship_info.ship_flags & PLAYER_CAPTAIN) + GLOBAL_SIS (CrewEnlisted)--; + } }