1. Fix an assert when winning or losing a skirmish game. 2. Remove some debug messages 3. Now display the mission result screen on the end of a

skirmish/multiplayer game.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1359 4a71c877-e1ca-e34f-864e-861f7616d084
master
Gerard Krol 2007-04-04 11:17:48 +00:00
parent d19a616013
commit b8c4065e15
5 changed files with 24 additions and 23 deletions

View File

@ -1054,6 +1054,12 @@ void intIntelButtonPressed(BOOL proxMsg, UDWORD id)
ASSERT( proxMsg != TRUE,
"intIntelButtonPressed: Shouldn't be able to get a proximity message!" );
if(id == 0)
{
intRemoveIntelMap();
return;
}
/* message button has been pressed - clear the old button and messageView*/
if (messageID != 0)
{
@ -1257,12 +1263,12 @@ void intRemoveIntelMap(void)
// Start the window close animation.
Form = (W_TABFORM*)widgGetFromID(psWScreen,IDINTMAP_FORM);
ASSERT(Form != NULL, "intRemoveIntelMap: Form is NULL");
if(Form)
{
Form->display = intClosePlainForm;
Form->disableChildren = TRUE;
Form->pUserData = (void*)0; // Used to signal when the close anim has finished.
}
ClosingIntelMap = TRUE;
//remove the text label
widgDelete(psWScreen, IDINTMAP_PAUSELABEL);

View File

@ -956,7 +956,6 @@ UDWORD i;
{
if(keyPressed(i))
{
debug(LOG_WARNING, "%i pressed (KEY_Q: %i, KEY_P: %i)", i, KEY_Q, KEY_P);
return(i); // top row key pressed
}
}
@ -965,7 +964,6 @@ UDWORD i;
{
if(keyPressed(i))
{
debug(LOG_WARNING, "%i pressed (KEY_A: %i, KEY_L: %i)", i, KEY_A, KEY_L);
return(i); // middle row key pressed
}
}
@ -974,7 +972,6 @@ UDWORD i;
{
if(keyPressed(i))
{
debug(LOG_WARNING, "%i pressed (KEY_Z: %i, KEY_M: %i)", i, KEY_Z, KEY_M);
return(i); // bottomw row key pressed
}
}

View File

@ -3371,12 +3371,12 @@ static BOOL _intAddMissionResult(BOOL result, BOOL bPlaySuccess)
sButInit.pTip = NULL;
sButInit.pDisplay = displayTextOption;
//if won or in debug mode
if(result || getDebugMappingStatus())
if(result || getDebugMappingStatus() || bMultiPlayer)
{
//continue
sButInit.x = MISSION_2_X;
// Won the game, so display "Quit to main menu"
if(testPlayerHasWon())
if(testPlayerHasWon() && !bMultiPlayer)
{
sButInit.id = IDMISSIONRES_QUIT;
sButInit.y = MISSION_2_Y-8;
@ -3397,7 +3397,7 @@ static BOOL _intAddMissionResult(BOOL result, BOOL bPlaySuccess)
/* Only add save option if in the game for real, ie, not fastplay.
And the player hasn't just completed the whole game
Don't add save option if just lost and in debug mode*/
if (!testPlayerHasWon() && !(testPlayerHasLost() && getDebugMappingStatus()))
if (!bMultiPlayer && !testPlayerHasWon() && !(testPlayerHasLost() && getDebugMappingStatus()))
{
//save
sButInit.id = IDMISSIONRES_SAVE;
@ -3534,18 +3534,10 @@ static void missionContineButtonPressed( void )
}*/
// intRemoveMissionResultNoAnim();
//just being paranoid here - definately don't want this in the final build
#ifdef DEBUG
//in the final build we won't be able to get here beciase the CONTINUE button will not be available
//if we're in debug mode and we've lost it is preferred if we just return to the game
if (getDebugMappingStatus() && testPlayerHasLost())
if (bMultiPlayer)
{
intRemoveMissionResultNoAnim();
}
#endif
}
void intProcessMissionResult(UDWORD id)

View File

@ -3244,6 +3244,8 @@ BOOL scrGameOverMessage(void)
return FALSE;
}
// stop the game time??
//create the message
psMessage = addMessage(msgType, FALSE, player);
@ -3267,8 +3269,9 @@ BOOL scrGameOverMessage(void)
}*/
}
//this now called when the video Quit is processed
//displayGameOver(gameOver);
// this should be called when the video Quit is processed
// not always is tough, so better be sure
displayGameOver(gameOver);
return TRUE;
}

View File

@ -425,6 +425,7 @@ BOOL displayGameOver(BOOL bDidit)
// this bit decides whether to auto quit to front end.
//if(!getDebugMappingStatus())
if(!bMultiPlayer)
{
if(bDidit)
{
@ -446,6 +447,8 @@ BOOL displayGameOver(BOOL bDidit)
else
{
updateMultiStatsLoses();
clearMissionWidgets();
intAddMissionResult(bDidit, TRUE);
}
}