Fix: crash when loading a savegame repeatedly due to initialisation flag not being reset

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8384 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2017-01-30 20:06:45 +00:00
parent cd628ec4f2
commit a6b641d701
2 changed files with 18 additions and 13 deletions
+9 -4
View File
@@ -240,6 +240,11 @@ void SelectedSaveRegionMovementCallBack(MOUSE_REGION * pRegion, INT32 reason );
MOUSE_REGION gSLSEntireScreenRegion;
void SelectedSLSEntireRegionCallBack(MOUSE_REGION * pRegion, INT32 iReason );
#ifdef JA2BETAVERSION
extern BOOLEAN ValidateSoldierInitLinks( UINT8 ubCode );
#endif
extern BOOLEAN fFirstTimeInGameScreen; // added by Flugente
//////////////////////////////////////////////////////
//
@@ -2478,10 +2483,6 @@ void DisplayOnScreenNumber( BOOLEAN fErase )
}
}
#ifdef JA2BETAVERSION
extern BOOLEAN ValidateSoldierInitLinks( UINT8 ubCode );
#endif
void DoneFadeOutForSaveLoadScreen( void )
{
if( !LoadSavedGame( VAL_SLOT_START + gbSelectedSaveLocation ) )
@@ -2569,6 +2570,10 @@ void DoneFadeOutForSaveLoadScreen( void )
}
#endif
}
// Flugente: enforce screen redraw (observed an issue where, on loading a savegame repeatedly, this was not reset, resulting in teampanel not being drawn, causing subsequent crashes)
fFirstTimeInGameScreen = TRUE;
gfStartedFadingOut = FALSE;
}