Engine messages not going through - #980
Merged
stavrosfa merged 1 commit intoAug 3, 2026
Merged
Conversation
Remove back to back calculation of citizen moods.
ajhalme
approved these changes
Jul 30, 2026
ajhalme
left a comment
Contributor
There was a problem hiding this comment.
Seems reasonable.
Maybe some of the animation stuff isn't getting loaded up right for "busy" units, like the worker digging a hole animation.
Contributor
Author
The animations have been like this for a very long time. It's an initialization issue, not how (or if) the animation is loaded. Have you noticed any animations missing or something?
You mean the mining animation?! 😅 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug where, if you load a game where there are no more selectable (not busy) units, and you try for example to update the Domestic advisors' slider values ( I noticed the bug while working on #979), this will either lag a lot, or simply not go through at all.
I am not 100% sure why this is happening when a game is loaded like that, but not when we are in game and have no more selectable units, but I could see the engine sending a lot of
MsgPerformUnitActionmessages when the player is expected to simply end their turn.So the main fix is to exit early from the
UnitSelector's process when the blinker signal has been emitted.If you want to reproduce it, load a game (I tried
.SAV) where you have finished you turn and the blinker is on, and try to update the Domestic advisor's slider values.Another thing I noticed was that we update the citizens' moods back to back, one in the
MsgChangeSlidersafter updating the values, and then right after we send a newMsgUpdateUiAfterDomesticChangemessage wihch does the exact same thing and seems redundant, so I removed it.