Skip to content

Fix M1A2 tracks twisting as the road wheels turn - #46

Merged
kr4uzi merged 1 commit into
kr4uzi:mainfrom
jussimir:codex/kr4uzi-fix-tank-track-rotation
Nov 17, 2026
Merged

kr4uzi merged 1 commit into
kr4uzi:mainfrom
jussimir:codex/kr4uzi-fix-tank-track-rotation

Conversation

@jussimir

Copy link
Copy Markdown

Stock M1A2 templates set ObjectTemplate.rotateUV 1 on their road-wheel springs. The missing console binding leaves the flag false, allowing the lower track geometry to twist as the wheels turn. This restores the binding to the existing SpringTemplate::m_rotateUV field.

The retail Win32 executor at 0x57C48F reads and writes the flag byte at SpringTemplate + 0x24C. The existing spring physics already uses this flag to keep the track geometry aligned.

Blender comparison

The lower track is highlighted in red on the stock M1A2 mesh. Both views show the wheel parts rotated by 90 degrees.

Before After
The lower track twists with the wheels The lower track stays aligned beneath the wheels

Validation

Compiled the changed translation unit for the macOS arm64 client and dedicated-server images on kr4uzi/OpenBF2:main at 02cc5ac. Rechecked the original BF2 1.50 x86 executable in Ghidra and verified the getter and setter instructions. git diff --check passed.

The same binding restoration was submitted upstream in B2BF/OpenBF2#77, where the MSVC x86 compile, syntax check, and official client link passed.

Codex assisted with preparing, validating, and submitting this port at the author's request.

@kr4uzi
kr4uzi merged commit 5bd6eb5 into kr4uzi:main Nov 17, 2026
4 of 5 checks passed
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.

2 participants