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 is a follow-up to #2809 and fixes a mismatch in Generals that was caused by unifying the AssistedTargetingUpdate module's setup with Zero Hour, which allowed the module's update logic to run for one frame.
Stubbjax
added
Bug
Something is not working right, typically is user facing
Minor
Severity: Minor < Major < Critical < Blocker
Gen
Relates to Generals
ThisProject
The issue was introduced by this project, or this task is specific to this project
labels
Aug 26, 2026
The constructor-based approach is appropriate because template references are immutable module setup data and the module is event-driven rather than frame-driven. Explicitly sleeping during construction prevents the unwanted first update without introducing conditional update logic or save-load-specific initialization.
Files changed (1) +5 / -12
Bug fix (1) +5 / -12
AssistedTargetingUpdate.cppInitialize targeting lasers before disabling scheduled updates+5/-12
Initialize targeting lasers before disabling scheduled updates
• Moves laser template lookup into module construction and immediately sets the module to sleep forever. Removes lookup work from the update and load post-processing paths, eliminating the single scheduled frame that caused Generals synchronization mismatches.
The PR prevents AssistedTargetingUpdate from running for an initial simulation frame by resolving its feedback-laser templates during construction and immediately putting the module to sleep indefinitely.
Moves feedback-laser template resolution from update() and loadPostProcess() into the constructor.
Initializes the module wake frame to UPDATE_SLEEP_FOREVER.
Leaves update() as a permanently sleeping no-op.
Confidence Score: 5/5
The PR appears safe to merge, with no actionable correctness, security, or maintainability issues identified.
Constructor-time wake scheduling is supported by the object-registration lifecycle, and save loading reconstructs the module through the constructor so its derived template pointers are restored.
Initializes template references and permanent sleep state during module construction, eliminating the unintended first-frame update without introducing an actionable defect.
Maybe this should be gated so that when this code is merged the issue does not crop up again by someone else merging the same files.
xezon
changed the title
bugfix: Resolve mismatch caused by updating AssistedTargetingUpdate for one frame
bugfix(update): Resolve mismatch caused by updating AssistedTargetingUpdate for one frame
Aug 26, 2026
Maybe this should be gated so that when this code is merged the issue does not crop up again by someone else merging the same files.
Yes, I think that's a good idea.
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 project
4 participants
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 is a follow-up to #2809 and fixes a mismatch in Generals that was caused by unifying the
AssistedTargetingUpdatemodule's setup with Zero Hour, which allowed the module's update logic to run for one frame.