Fix tank mouse aiming - #116
Open
mrfox-1 wants to merge 6 commits into
Open
Conversation
mrfox-1
marked this pull request as ready for review
July 24, 2026 01:07
jeffory
added a commit
to jeffory/GoldenEye-Recomp
that referenced
this pull request
Aug 2, 2026
GoldenEye's ordinary mouse hook writes Bond's camera yaw. While Bond is mounted, the game rebuilds that yaw every simulation tick from the tank body and native turret orientation, so horizontal mouse movement was immediately overwritten. Vertical movement is handled separately and already worked. Detect the game's authoritative mounted-state flag and shift the native turret target and its smoothed current value by the same mouse delta, back-solving the accumulator from this build's own smoothing reciprocal. The native tank update stays responsible for steering, collision rollback, controller input, and the final camera. Ported from mrfox-1's community fix (v2.1.0), submitted upstream as SunJaycy#116 (fixes upstream issue SunJaycy#93) and still awaiting review there. Fork-specific adaptations vs. the upstream patch: - Driven from cdx (the ge_mouse_smooth EMA output) rather than upstream's raw mdx, because our camera/crosshair/sway paths all consume cdx. Tank aim therefore gets the same feel as on-foot aim under the user's smoothing setting instead of a discontinuity on mount/dismount. At the default ge_mouse_smooth=0 this is identical to upstream. - Only the camera-yaw and gun-sway reads are switched to the suppressed delta. The menu cursor stays on raw mdx, and the aim-mode-1 crosshair stays on cdx -- upstream suppresses the yaw write, not the crosshair. - Upstream's second camera hunk has no counterpart here: it rewrites the Goldeneye1.2.4 aim-mode rework, which this fork never took (our merge-base is three upstream releases earlier and we reimplemented mouse-look independently). Inert on Android, where ge_app.h forces ge_mouselook_enable off. Co-authored-by: mrfox-1 <noreply@github.com>
jeffory
added a commit
to jeffory/GoldenEye-Recomp
that referenced
this pull request
Aug 2, 2026
Ports mrfox-1's GoldenEye-Recomp-Watch-Music-Fix v2.1.0 (upstream PRs SunJaycy#114 and SunJaycy#116) with fork-specific adaptations: guest-context clobber safety around the XACT cue wrappers, the tick placed above the ge_mouselook_enable gate so it runs on Android, and the tank path re-expressed against our EMA-smoothed mouse delta.
zZeck
added a commit
to zZeck/GoldenEye-Recomp
that referenced
this pull request
Aug 4, 2026
While Bond is mounted, the game rebuilds the camera yaw from the tank body + native turret orientation every simulation tick, so the on-foot mouse-look yaw write is immediately overwritten and mouse-X couldn't turn the tank. Detect the mounted-state flag and shift the native turret target + its smoothed current value by the same mouse delta instead, back-solving the accumulator from this build's smoothing reciprocal; the native tank update keeps steering, collision, controller input, and the final camera. Vertical aim already worked. Ported from mrfox-1's community fix (v2.1.0), via jeffory's fork; upstream PR SunJaycy#116 (issue SunJaycy#93). Driven from our EMA-smoothed cdx so tank aim matches on-foot feel under ge_mouse_smooth (identical to upstream at smooth=0). Co-authored-by: mrfox-1 <noreply@github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
Root cause
The existing mouse hook writes Bond's ordinary camera yaw. While Bond is mounted, GoldenEye rebuilds that yaw every simulation tick from the tank body and turret orientation, so horizontal mouse movement is immediately overwritten. Vertical movement is handled separately and therefore continued to work.
This patch shifts the turret target and current smoothed orientation by the same mouse delta. The native tank update remains responsible for steering, collision rollback, controller input, and final camera orientation.
User impact
Mouse and keyboard players can aim the tank turret horizontally and vertically without holding Aim. W/A/S/D driving remains functional at the same time.
Fixes #93.
Validation
git diff --checkpasses.