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
This change fixes a logic error in GameEngine::canUpdateRegularGameLogic. It was spotted when loading a save game while max fps was uncapped, but after saveload it gets capped with TheGlobalData->m_useFpsLimit = true, which was then ignored in GameEngine::canUpdateRegularGameLogic. The result was an update timing discrepancy in GameEngine update, which caused glitches on game world visuals.
xezon
added
Bug
Something is not working right, typically is user facing
Minor
Severity: Minor < Major < Critical < Blocker
Gen
Relates to Generals
ZH
Relates to Zero Hour
ThisProject
The issue was introduced by this project, or this task is specific to this project
labels
May 14, 2026
This PR fixes a timing discrepancy bug in GameEngine::canUpdateRegularGameLogic() where changes to TheGlobalData->m_useFpsLimit (e.g. after loading a save game) were not being respected, causing visual glitches.
Replaces raw getFramesPerSecondLimit() / getLogicTimeScaleFps() calls with getActualFramesPerSecondLimit() / getActualLogicTimeScaleFps(flags), which correctly account for m_useFpsLimit, the enabled state, and game/time-halt flags.
Removes the now-redundant !enabled shortcut, since getActualLogicTimeScaleFps() already returns RenderFpsPreset::UncappedFpsValue when the logic time scale is disabled, naturally satisfying logicTimeScaleFps >= maxRenderFps.
Propagates FramePacer::IgnoreFrozenTime | FramePacer::IgnoreHaltedGame flags through the call chain so frozen/halted state is handled in the caller (update()), not baked into the scheduling decision.
Confidence Score: 5/5
The change is a tightly-scoped fix that correctly threads the fps-limit enabled state into the logic update decision. No behavioral regressions are introduced for the network or fast-mode paths.
Both getActualFramesPerSecondLimit() and getActualLogicTimeScaleFps(flags) correctly consolidate the state that was previously read piecemeal, removing the original inconsistency. The dropped !enabled guard is fully covered by getActualLogicTimeScaleFps returning UncappedFpsValue when the scale is disabled, preserving identical runtime behaviour in that branch.
No files require special attention; both changed files are straightforward.
Core bugfix: replaces raw FramePacer getters with getActual* variants in canUpdateRegularGameLogic and threads logicTimeQueryFlags through canUpdateGameLogic so fps-limit and enable-state changes are respected at runtime.
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
BugSomething is not working right, typically is user facingGenRelates to GeneralsMinorSeverity: Minor < Major < Critical < BlockerThisProjectThe issue was introduced by this project, or this task is specific to this projectZHRelates to Zero Hour
1 participant
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 change fixes a logic error in
GameEngine::canUpdateRegularGameLogic. It was spotted when loading a save game while max fps was uncapped, but after saveload it gets capped withTheGlobalData->m_useFpsLimit = true, which was then ignored inGameEngine::canUpdateRegularGameLogic. The result was an update timing discrepancy in GameEngine update, which caused glitches on game world visuals.TODO