- fixed shifting of the current item in save/load menus

Virtual <New save game> item wasn't taken into account
This commit is contained in:
alexey.lysiuk 2020-02-06 17:43:17 +02:00 committed by Christoph Oelckers
parent 438fa1b267
commit c54f813ea9

View file

@ -260,7 +260,7 @@ void FSavegameManager::NotifyNewSave(const FString &file, const FString &title,
if (okForQuicksave) if (okForQuicksave)
{ {
if (quickSaveSlot == nullptr || quickSaveSlot == (FSaveGameNode*)1 || forceQuicksave) quickSaveSlot = node; if (quickSaveSlot == nullptr || quickSaveSlot == (FSaveGameNode*)1 || forceQuicksave) quickSaveSlot = node;
LastAccessed = LastSaved = i; LastAccessed = LastSaved = i - 1; // without <new save> item
} }
return; return;
} }
@ -276,7 +276,7 @@ void FSavegameManager::NotifyNewSave(const FString &file, const FString &title,
if (okForQuicksave) if (okForQuicksave)
{ {
if (quickSaveSlot == nullptr || quickSaveSlot == (FSaveGameNode*)1 || forceQuicksave) quickSaveSlot = node; if (quickSaveSlot == nullptr || quickSaveSlot == (FSaveGameNode*)1 || forceQuicksave) quickSaveSlot = node;
LastAccessed = LastSaved = index; LastAccessed = LastSaved = index - 1; // without <new save> item
} }
else else
{ {