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
xezon
added
Minor
Severity: Minor < Major < Critical < Blocker
Gen
Relates to Generals
Fix
Is fixing something, but is not user facing
labels
May 3, 2026
This PR ports three bug fixes from GeneralsMD (Zero Hour) to Generals (vanilla) in LookAtXlat.cpp, following up on #2421. The changes fix an inverted pitch direction when dragging the mouse, initialize the anchor position when pitch adjustment begins (preventing an immediate jump), and add DESTROY_MESSAGE to the FOV begin/end cases so those messages are properly consumed.
Confidence Score: 5/5
Safe to merge — all changes are faithful ports of verified fixes from the GeneralsMD sibling file.
All four changes align exactly with the already-merged GeneralsMD reference (PR #2421): the pitch sign flip, anchor initialisation, and two DESTROY_MESSAGE additions. No logic is introduced net-new, and no custom rules are violated.
Four targeted fixes: inverted pitch sign corrected (+ → -), missing anchor init added for MSG_META_DEMO_BEGIN_ADJUST_PITCH, and missing DESTROY_MESSAGE added for both FOV begin/end cases — all matching the GeneralsMD reference.
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Mouse Move Event] --> B{m_isPitching?}
B -- Yes --> C["angle = Scale * (currentPos.y - anchor.y)"]
C --> D["userSetPitch(getPitch() - angle) fixed: was +"]
D --> E[m_anchor = currentPos]
F[MSG_META_DEMO_BEGIN_ADJUST_PITCH] --> G[m_isPitching = true]
G --> H["m_anchor = m_currentPos added: prevents jump on first move"]
H --> I["disp = DESTROY_MESSAGE"]
J[MSG_META_DEMO_BEGIN_ADJUST_FOV] --> K[m_isChangingFOV = true]
K --> L[m_anchor = m_currentPos]
L --> M["disp = DESTROY_MESSAGE added: message now consumed"]
N[MSG_META_DEMO_END_ADJUST_FOV] --> O[m_isChangingFOV = false]
O --> P["disp = DESTROY_MESSAGE added: message now consumed"]
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
FixIs fixing something, but is not user facingGenRelates to GeneralsMinorSeverity: Minor < Major < Critical < Blocker
2 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 for #2421 which was not replicated to Generals.