From 0b683a8ac0556c2985b1d8d929650ca537a83d1a Mon Sep 17 00:00:00 2001 From: Flugente Date: Sat, 15 Dec 2012 16:06:55 +0000 Subject: [PATCH] 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 --- Tactical/Overhead.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tactical/Overhead.cpp b/Tactical/Overhead.cpp index 0f9641f2..8e68a03c 100644 --- a/Tactical/Overhead.cpp +++ b/Tactical/Overhead.cpp @@ -6881,9 +6881,9 @@ void RemoveCapturedEnemiesFromSectorInfo( INT16 sMapX, INT16 sMapY, INT8 bMapZ ) //if ( guiCurrentScreen == GAME_SCREEN ) UINT32 uSectorID = 0; 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 - 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) { + // 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 UINT32 playersidestrength = 0; UINT32 enemysidestrength = 0;