Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: loadSaveResearch should not restore "pending" bits #4024

Conversation

past-due
Copy link
Member

@past-due past-due commented Jul 23, 2024

EDIT: Nevermind, see comment below.

These are only used for the UI in modes that use the netqueues (i.e. skirmish, etc), and only set while waiting for the netqueue to process a research action.

However, savegames do not contain the netqueues, so if a save occurs between the time that the user takes a UI action (which sets the state to pending) and when the tick is processed, it could lead to research topics disappearing on saveload (since pending state is restored, but not the changes queued for the unprocessed game tick).

Testing:

These are only used for the UI in modes that use the netqueues (i.e. skirmish, etc), and only set while waiting for the netqueue to process a research action. However, savegames do not contain the netqueues, so if a save occurs between the time that the user takes a UI action (which sets the state to pending) and when the tick is processed, it could lead to research topics disappearing on saveload (since pending state is restored, but not the changes queued for the unprocessed game tick).
@past-due
Copy link
Member Author

past-due commented Jul 23, 2024

This simple change reintroduced the bug mentioned in #1536 (comment)

The cause is some oddities in how research cancelling occurs... Will have to address that in a later PR.

@past-due past-due closed this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant