- store current time in the save game node when saving a new game

- when overwriting a save force it to reposition itself in the list in case any of its details have changed
This commit is contained in:
Rachael Alexanderson 2024-12-29 16:28:34 -05:00 committed by Rachael Alexanderson
parent 902bf03c47
commit d42e3b0037

View file

@ -183,12 +183,18 @@ void FSavegameManagerBase::NotifyNewSave(const FString &file, const FString &tit
#endif
{
node->SaveTitle = title;
node->CreationTime = myasctime();
node->bOldVersion = false;
node->bMissingWads = false;
// refresh my game's position on the list (needed if time/name changed)
SaveGames.Delete(i);
int index = InsertSaveNode(node);
if (okForQuicksave)
{
if (quickSaveSlot == nullptr || quickSaveSlot == (FSaveGameNode*)1 || forceQuicksave) quickSaveSlot = node;
LastAccessed = LastSaved = i;
LastAccessed = LastSaved = index;
}
return;
}
@ -196,6 +202,7 @@ void FSavegameManagerBase::NotifyNewSave(const FString &file, const FString &tit
auto node = new FSaveGameNode;
node->SaveTitle = title;
node->CreationTime = myasctime();
node->Filename = file;
node->bOldVersion = false;
node->bMissingWads = false;