Skip to content

bugfix(client): Stop camera tracking units outside visibility - #3191

Draft
OmarAglan wants to merge 1 commit into
TheSuperHackers:mainfrom
OmarAglan:fix/issue-18-camera-fog
Draft

bugfix(client): Stop camera tracking units outside visibility#3191
OmarAglan wants to merge 1 commit into
TheSuperHackers:mainfrom
OmarAglan:fix/issue-18-camera-fog

Conversation

@OmarAglan

Copy link
Copy Markdown

Stops the Zero Hour camera from tracking a selected unit after it becomes invisible to the observed or local player.

Camera tracking now stops when:

  • The selected drawable or its object no longer exists.
  • The drawable becomes hidden, including through stealth.
  • The object becomes fully fogged or shrouded.

Partially visible objects remain trackable. Camera tracking also continues to work when shroud is disabled.

This change targets Zero Hour only. The equivalent Base Generals implementation will follow after the Zero Hour change has been tested.

Testing

  • Static diff and whitespace validation
  • Compile a Zero Hour build
  • Confirm tracking works while a unit is visible
  • Confirm tracking stops immediately when an aircraft enters fog or shroud
  • Confirm tracking stops when a unit becomes hidden through stealth
  • Confirm the camera remains at the last visible position
  • Confirm tracking works when shroud is disabled
  • Confirm observer vision uses the observed player's visibility

AI usage

The investigation and initial implementation were produced with assistance from OpenAI Codex. The author directed the scope and project documentation format. Runtime testing is pending.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client camera can follow units into the fog

1 participant