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 -9
View File
@@ -15,9 +15,9 @@
#ifdef JA2EDITOR
#ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8370 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Unfinished Business - Map Editor v1.13.8384 (Development Build)" };
#else
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8370 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.8384 (Development Build)" };
#endif
// ------------------------------
@@ -27,11 +27,11 @@
//DEBUG BUILD VERSION
#ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8370 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Debug: Unfinished Business - v1.13.8384 (Development Build)" };
#elif defined (JA113DEMO)
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8370 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Debug: JA2 Demo - v1.13.8384 (Development Build)" };
#else
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8370 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Debug: v1.13.8384 (Development Build)" };
#endif
#elif defined CRIPPLED_VERSION
@@ -46,16 +46,16 @@
//RELEASE BUILD VERSION
#ifdef JA2UB
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8370 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Release Unfinished Business - v1.13.8384 (Development Build)" };
#elif defined (JA113DEMO)
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8370 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Release JA2 Demo - v1.13.8384 (Development Build)" };
#else
CHAR16 zVersionLabel[256] = { L"Release v1.13.8370 (Development Build)" };
CHAR16 zVersionLabel[256] = { L"Release v1.13.8384 (Development Build)" };
#endif
#endif
CHAR8 czVersionNumber[16] = { "Build 17.01.22" }; //YY.MM.DD
CHAR8 czVersionNumber[16] = { "Build 17.01.29" }; //YY.MM.DD
CHAR16 zTrackingNumber[16] = { L"Z" };
// SAVE_GAME_VERSION is defined in header, change it there
+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;
}