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:
Meep-Eep
2007-05-05 17:11:24 +00:00
parent 52c92d448f
commit dc94da2cc4
4 changed files with 23 additions and 13 deletions
+2
View File
@@ -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
+9 -2
View File
@@ -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();
+2 -2
View File
@@ -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)
{
+1
View File
@@ -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);