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