Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

xezon
Copy link

@xezon xezon commented Sep 18, 2025

This change removes the double initialization of camera zoom and angles in GameLogic::startNewGame. User facing nothing changes.

TODO

  • Replicate in Generals

@xezon xezon added Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing labels Sep 18, 2025
}

// Set up the camera height based on the map height & globalData.
TheTacticalView->initHeightForMap();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initHeightForMap relies on m_pos to calculate the ground height. Since m_pos is only updated after lookAt is called, removing this second initHeightForMap means the height adjustment would be skipped for the initial camera position. That’s why this call seems necessary.


// Set up the camera height based on the map height & globalData.
TheTacticalView->initHeightForMap();
TheTacticalView->setAngleAndPitchToDefault();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both setAngleAndPitchToDefault() and setZoomToDefault() call setCameraTransform() which also relies on m_pos

@xezon
Copy link
Author

xezon commented Sep 26, 2025

I think height above ground update needs looking at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Minor Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.