- Singleplayer: Fixed exploit, when it is enemies turn, you can still move when pressing CTRL + L or CTRL + S to open the Save/Load screen and then close the screen without loading/saving

o I just disabled loading/saving via the load/save screen when it is the enemies turn
o You can still save load via the quicksave slot

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4543 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2011-06-29 17:35:42 +00:00
parent 221bad1406
commit 73a10dceaf
+18
View File
@@ -1561,6 +1561,8 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
gfCameDirectlyFromGame = TRUE;
guiPreviousOptionScreen = GAME_SCREEN;
// cancel, the player can move when it is not its turn!
//Heinz: 28.02.09 BUGFIX: player doesn't need to see save/load screen
//LeaveTacticalScreen( SAVE_LOAD_SCREEN );
DoQuickLoad();
@@ -1568,6 +1570,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
}
else if( InputEvent.usKeyState & CTRL_DOWN )
{
// WANNE: Do not allow saving via the save screen when it is not our turn,
// because there is an explit when you close the save window without saving, you can move your merc even it is not your turn
// IF UI HAS LOCKED, ONLY ALLOW EXIT!
if ( gfDisableRegionActive || gfUserTurnRegionActive )
{
continue;
}
if ( !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) )
{
gfSaveGame = FALSE;
@@ -3816,6 +3826,14 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
else if( !fDisableMapInterfaceDueToBattle && !( gTacticalStatus.uiFlags & ENGAGED_IN_CONV ) && !is_networked)
{
// WANNE: Do not allow saving via the save screen when it is not our turn,
// because there is an explit when you close the save window without saving, you can move your merc even it is not your turn
// IF UI HAS LOCKED, ONLY ALLOW EXIT!
if ( gfDisableRegionActive || gfUserTurnRegionActive )
{
continue;
}
//if the game CAN be saved
if( CanGameBeSaved() )
{