You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When /authentication/api/userchannel/ProfileService/UpdateUserSaveFileTable is accessed, the client sends not just one, but an entire list of metadata of multiple saves. This is currently handled by always taking the last item from the list and using its token and sessionID to save the current session. However, this is not always correct, as the list is not sorted with respect to the timestamp.
To reproduce
Add log(LogLevel.DEBUG, JSON.stringify(req.body.clientSaveFileList)) at the start of the function that handles the request (attached below).
Compile and run Peacock. Start the game with it.
Start any mission with saves enabled.
Try saving the game at different save slots and observe the output.
Additional context
Peacock version v5.6.2.
A possible solution is to sort the list with respect to the timestamp and use the token and sessionID of the latest save.
After that, saving in save slot 1 caused the client to send the following SaveFile list (note that the latest save is in QuickSave0 according to the timestamp!)
Describe the bug
When
/authentication/api/userchannel/ProfileService/UpdateUserSaveFileTable
is accessed, the client sends not just one, but an entire list of metadata of multiple saves. This is currently handled by always taking the last item from the list and using its token and sessionID to save the current session. However, this is not always correct, as the list is not sorted with respect to the timestamp.To reproduce
log(LogLevel.DEBUG, JSON.stringify(req.body.clientSaveFileList))
at the start of the function that handles the request (attached below).Additional context
Peacock version v5.6.2.
A possible solution is to sort the list with respect to the timestamp and use the token and sessionID of the latest save.
Peacock/components/profileHandler.ts
Lines 630 to 659 in d95553b
Sample output in chronological order (tested on The Finishing Line):
Saving in save slot 1 caused the client to send the following SaveFile list
After that, saving in save slot 2 caused the client to send the following SaveFile list
After that, saving in save slot 3 caused the client to send the following SaveFile list
After that, saving in save slot 1 caused the client to send the following SaveFile list (note that the latest save is in QuickSave0 according to the timestamp!)
After that, an autosave caused the client to send the following SaveFile list (note that the latest save is in AutoSave 3 according to the timestamp!)
The text was updated successfully, but these errors were encountered: