Merge pull request #175 from danmcgoo/master

Fix loading saved game prior to commit 7e21048 crash.
This commit is contained in:
Robert Beckebans 2014-10-10 20:31:07 +02:00
commit 46eaf5b259
2 changed files with 15 additions and 6 deletions

View file

@ -1454,11 +1454,19 @@ bool idGameLocal::InitFromSaveGame( const char* mapName, idRenderWorld* renderWo
// FIXME: save smoke particles
savegame.ReadInt( cinematicSkipTime );
savegame.ReadInt( cinematicStopTime );
savegame.ReadInt( cinematicMaxSkipTime );
if( saveGameVersion > BUILD_NUMBER_SAVE_VERSION_BEFORE_SKIP_CINEMATIC )
{
savegame.ReadInt( cinematicSkipTime );
savegame.ReadInt( cinematicStopTime );
savegame.ReadInt( cinematicMaxSkipTime );
}
savegame.ReadBool( inCinematic );
savegame.ReadBool( skipCinematic );
if( saveGameVersion > BUILD_NUMBER_SAVE_VERSION_BEFORE_SKIP_CINEMATIC )
{
savegame.ReadBool( skipCinematic );
}
savegame.ReadInt( ( int& )gameType );

View file

@ -26,7 +26,8 @@ If you have questions concerning this license or the applicable additional terms
===========================================================================
*/
const int BUILD_NUMBER_SAVE_VERSION_CHANGE = 1400; // Altering saves so that the version goes in the Details file that we read in during the enumeration phase
const int BUILD_NUMBER_SAVE_VERSION_BEFORE_SKIP_CINEMATIC = 1400;
const int BUILD_NUMBER_SAVE_VERSION_CHANGE = 1401; // Altering saves so that the version goes in the Details file that we read in during the enumeration phase
const int BUILD_NUMBER = BUILD_NUMBER_SAVE_VERSION_CHANGE;
const int BUILD_NUMBER_MINOR = 0;
const int BUILD_NUMBER_MINOR = 0;