mirror of
https://github.com/1dot13/source.git
synced 2026-08-26 14:30:26 +02:00
Fix: after the enemy surrenders, the prisoner handle dialogue would not always appear
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5731 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -6881,9 +6881,9 @@ void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ )
|
|||||||
//if ( guiCurrentScreen == GAME_SCREEN )
|
//if ( guiCurrentScreen == GAME_SCREEN )
|
||||||
UINT32 uSectorID = 0;
|
UINT32 uSectorID = 0;
|
||||||
if ( GetPlayerControlledPrisonSectorId(uSectorID) )
|
if ( GetPlayerControlledPrisonSectorId(uSectorID) )
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, TacticalStr[ PRISONER_DECIDE_STR ], guiCurrentScreen, ( UINT8 )MSG_BOX_FLAG_YESNO, PrisonerMessageBoxCallBack, NULL );
|
DoMessageBox( MSG_BOX_BASIC_STYLE, TacticalStr[ PRISONER_DECIDE_STR ], GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_YESNO, PrisonerMessageBoxCallBack, NULL );
|
||||||
else
|
else
|
||||||
DoMessageBox( MSG_BOX_BASIC_STYLE, TacticalStr[ PRISONER_NO_PRISONS_STR ], guiCurrentScreen, ( UINT8 )MSG_BOX_FLAG_OK, NULL, NULL );
|
DoMessageBox( MSG_BOX_BASIC_STYLE, TacticalStr[ PRISONER_NO_PRISONS_STR ], GAME_SCREEN, ( UINT8 )MSG_BOX_FLAG_OK, NULL, NULL );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10047,6 +10047,9 @@ void PrisonerSurrenderMessageBoxCallBack( UINT8 ubExitValue )
|
|||||||
{
|
{
|
||||||
if (ubExitValue == MSG_BOX_RETURN_YES)
|
if (ubExitValue == MSG_BOX_RETURN_YES)
|
||||||
{
|
{
|
||||||
|
// we have to remove the region, as we are calling a message from within a messagebox
|
||||||
|
MSYS_RemoveRegion(&(gMsgBox.BackRegion) );
|
||||||
|
|
||||||
// we determine the chance that enemy will surrender. This depends on the strength of our and their side
|
// we determine the chance that enemy will surrender. This depends on the strength of our and their side
|
||||||
UINT32 playersidestrength = 0;
|
UINT32 playersidestrength = 0;
|
||||||
UINT32 enemysidestrength = 0;
|
UINT32 enemysidestrength = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user