mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Merged revision(s) 7049 from branches/ja2_source_official_2014:
Fix: problems with loading IMP profiles between different game versions (checked on IMP from 6670, 6901, 7047) (by anv) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7050 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
|
||||
#include "Soldier Profile.h"
|
||||
|
||||
#include "SaveLoadGame.h"
|
||||
|
||||
// Changed by ADB (rev 1513) to resolve IMPs created prior to structural changes
|
||||
//#define IMP_FILENAME_SUFFIX ".dat"
|
||||
#define OLD_IMP_FILENAME_SUFFIX ".dat"
|
||||
@@ -1529,15 +1531,21 @@ BOOLEAN LoadImpCharacter( STR nickName )
|
||||
|
||||
// read in the profile
|
||||
//if ( !gMercProfiles[ iProfileId ].Load(hFile, false) )
|
||||
|
||||
// anv: before loading profile we need to set guiCurrentSaveGameVersion to profile's version
|
||||
// and set it back to SAVE_GAME_VERSION right after or else new saves will be broken!
|
||||
guiCurrentSaveGameVersion = version;
|
||||
|
||||
if ( !gMercProfiles[ iProfileId ].Load(hFile, isOldVersion, false, false) )
|
||||
{
|
||||
guiCurrentSaveGameVersion = SAVE_GAME_VERSION;
|
||||
DoLapTopMessageBox( MSG_BOX_IMP_STYLE, pImpPopUpStrings[ 7 ], LAPTOP_SCREEN, MSG_BOX_FLAG_OK, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
guiCurrentSaveGameVersion = SAVE_GAME_VERSION;
|
||||
|
||||
// close file
|
||||
FileClose(hFile);
|
||||
|
||||
//CHRISL: At this point, we need to resort profile inventory so that NewInv items don't accidentally appear in OldInv
|
||||
DistributeInitialGear(&gMercProfiles[iProfileId]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user