Fixed bug introduced by the fix for #413.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1486 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+32
-19
@@ -805,26 +805,37 @@ DoModifyShips (PMENU_STATE pMS)
|
|||||||
else if (select || cancel)
|
else if (select || cancel)
|
||||||
{
|
{
|
||||||
if ((pMS->delta_item & MODIFY_CREW_FLAG)
|
if ((pMS->delta_item & MODIFY_CREW_FLAG)
|
||||||
&& hStarShip != 0
|
&& hStarShip != 0)
|
||||||
&& StarShipPtr->ShipInfo.crew_level == 0)
|
|
||||||
{
|
{
|
||||||
SetFlashRect (NULL_PTR, (FRAME)0);
|
StarShipPtr = (SHIP_FRAGMENTPTR)LockStarShip (
|
||||||
UnlockMutex (GraphicsLock);
|
&GLOBAL (built_ship_q), hStarShip);
|
||||||
ShowCombatShip ((COUNT)pMS->CurState, StarShipPtr);
|
if (StarShipPtr->ShipInfo.crew_level == 0)
|
||||||
LockMutex (GraphicsLock);
|
{
|
||||||
UnlockStarShip (&GLOBAL (built_ship_q), hStarShip);
|
SetFlashRect (NULL_PTR, (FRAME)0);
|
||||||
RemoveQueue (&GLOBAL (built_ship_q), hStarShip);
|
UnlockMutex (GraphicsLock);
|
||||||
FreeStarShip (&GLOBAL (built_ship_q), hStarShip);
|
ShowCombatShip ((COUNT)pMS->CurState,
|
||||||
// refresh SIS display
|
StarShipPtr);
|
||||||
DeltaSISGauges (UNDEFINED_DELTA, UNDEFINED_DELTA,
|
LockMutex (GraphicsLock);
|
||||||
UNDEFINED_DELTA);
|
UnlockStarShip (&GLOBAL (built_ship_q),
|
||||||
DrawStatusMessage ((UNICODE *)~0);
|
hStarShip);
|
||||||
r.corner.x = pMS->flash_rect0.corner.x;
|
RemoveQueue (&GLOBAL (built_ship_q), hStarShip);
|
||||||
r.corner.y = pMS->flash_rect0.corner.y;
|
FreeStarShip (&GLOBAL (built_ship_q), hStarShip);
|
||||||
r.extent.width = SHIP_WIN_WIDTH;
|
// refresh SIS display
|
||||||
r.extent.height = SHIP_WIN_HEIGHT;
|
DeltaSISGauges (UNDEFINED_DELTA, UNDEFINED_DELTA,
|
||||||
SetContext (SpaceContext);
|
UNDEFINED_DELTA);
|
||||||
SetFlashRect (&r, (FRAME)0);
|
DrawStatusMessage ((UNICODE *)~0);
|
||||||
|
r.corner.x = pMS->flash_rect0.corner.x;
|
||||||
|
r.corner.y = pMS->flash_rect0.corner.y;
|
||||||
|
r.extent.width = SHIP_WIN_WIDTH;
|
||||||
|
r.extent.height = SHIP_WIN_HEIGHT;
|
||||||
|
SetContext (SpaceContext);
|
||||||
|
SetFlashRect (&r, (FRAME)0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnlockStarShip (&GLOBAL (built_ship_q),
|
||||||
|
hStarShip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(pMS->delta_item ^= MODIFY_CREW_FLAG))
|
if (!(pMS->delta_item ^= MODIFY_CREW_FLAG))
|
||||||
@@ -860,6 +871,8 @@ DoModifyShips (PMENU_STATE pMS)
|
|||||||
if (hStarShip)
|
if (hStarShip)
|
||||||
StarShipPtr = (SHIP_FRAGMENTPTR)LockStarShip (
|
StarShipPtr = (SHIP_FRAGMENTPTR)LockStarShip (
|
||||||
&GLOBAL (built_ship_q), hStarShip);
|
&GLOBAL (built_ship_q), hStarShip);
|
||||||
|
else
|
||||||
|
StarShipPtr = NULL; // Keeping compiler quiet.
|
||||||
|
|
||||||
SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN,
|
SetMenuSounds (MENU_SOUND_UP | MENU_SOUND_DOWN,
|
||||||
MENU_SOUND_SELECT | MENU_SOUND_CANCEL);
|
MENU_SOUND_SELECT | MENU_SOUND_CANCEL);
|
||||||
|
|||||||
Reference in New Issue
Block a user