Fix assertion when ending the battle with a simultaneous death.
git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2752 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
Changes towards version 0.7:
|
||||
- Ending the battle with a simultaneous death no longer triggers an
|
||||
assertion - SvdB
|
||||
- Concurrent supermelee ship selection - SvdB
|
||||
- New generic, unthreaded flashing code - SvdB
|
||||
- Cleanup of 3DO ship spin support; spin speech works now - Alex
|
||||
|
||||
@@ -458,8 +458,9 @@ Battle (void)
|
||||
LockMutex (GraphicsLock);
|
||||
|
||||
AbortBattle:
|
||||
if (LOBYTE (GLOBAL (CurrentActivity)) == SUPER_MELEE &&
|
||||
(GLOBAL (CurrentActivity) & CHECK_ABORT))
|
||||
if (LOBYTE (GLOBAL (CurrentActivity)) == SUPER_MELEE)
|
||||
{
|
||||
if (GLOBAL (CurrentActivity) & CHECK_ABORT)
|
||||
{
|
||||
// Do not return to the main menu when a game is aborted,
|
||||
// (just to the supermelee menu).
|
||||
@@ -474,6 +475,12 @@ AbortBattle:
|
||||
|
||||
GLOBAL (CurrentActivity) &= ~CHECK_ABORT;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Show the result of the battle.
|
||||
MeleeGameOver ();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef NETPLAY
|
||||
uninitBattleInputBuffers();
|
||||
|
||||
@@ -469,7 +469,7 @@ DrawPickMeleeFrame (COUNT which_player)
|
||||
}
|
||||
|
||||
// Pre: caller holds the graphics lock.
|
||||
static void
|
||||
void
|
||||
MeleeGameOver (void)
|
||||
{
|
||||
COUNT playerI;
|
||||
@@ -523,13 +523,13 @@ MeleeShipDeath (STARSHIP *ship, COUNT which_player) {
|
||||
if (battle_counter[0] == 0 || battle_counter[1] == 0)
|
||||
{
|
||||
// One side is out of ships. Game over.
|
||||
MeleeGameOver ();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Post: the NetState for all players is NetState_interBattle
|
||||
static BOOLEAN
|
||||
GetMeleeStarShips (COUNT playerMask, HSTARSHIP *ships)
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "libs/compiler.h"
|
||||
|
||||
BOOLEAN MeleeShipDeath (STARSHIP *ship, COUNT which_player);
|
||||
void MeleeGameOver (void);
|
||||
BOOLEAN GetInitialMeleeStarShips (HSTARSHIP *result);
|
||||
BOOLEAN GetNextMeleeStarShip (COUNT which_player, HSTARSHIP *result);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user