Skip to content

Current Gear HUD is limited to 10 gears #323

Open

Description

@HBbrody

Describe the bug
The Current Gear HUD briefly shows 10 instead of the selected gear while shifting.

CurrentGearOverlay.Render clamps the gear with Clip(0, 11) before indexing _gearBitmaps. Index 11 draws a 10, so any value above the range is drawn as 10 rather than ignored.

To Reproduce

  1. Activate the Current Gear HUD, Forza Horizon 6.
  2. Drive and shift up and down repeatedly.
  3. Now and then a 10 flashes up for a frame or two.

Expected behavior
The selected gear, or the previous one held over, never a gear the car does not have.

Desktop

  • OS: Windows 11
  • Version: Race Element 2.7.1.6

Activity

  1. changed the title [-]Current Gear HUD flashes 10 while shifting[/-] [+]Current Gear HUD is limited to 10 gears[/+] on Sep 26, 2026
  2. RiddleTime commented on Sep 26, 2026

    @RiddleTime
    Owner

    I appreciate the more concise description!

  3. HBbrody commented on Sep 26, 2026

    @HBbrody
    ContributorAuthor

    To be clear about the symptom: this happens on a 6 gear car. Upshift, and for one
    or two frames the HUD shows a 10, then snaps to the correct gear.

    The HUD holds 12 prerendered bitmaps: R, N and 1 to 10, picked by index, so index
    11 is the 10. During a shift the sim sends a gear value that is outside that range
    for a frame, and Clip(0, 11) pulls it to the nearest valid index, which is the 10.
    That is the flash.

    #324 ignores out of range values instead of pulling them to the edge, so the gear
    already on screen stays up until a valid value arrives.

    The 10 gear ceiling is real but separate. Adding bitmaps without changing the clamp would just flash the new top of the range
    instead of a 10.

    Image

    Forza Horizon 6, car in 5th. The common LocalCarData panel reports Gear: 12 while the game shows 5, so the value is out of range rather than a high gear. Clip(0, 11) pins it to index 11, which is the bitmap for 10.

    With 50 bitmaps this sample would render as an 11 instead, so the range check has to be against the gear count, not the cache.

  4. RiddleTime commented on Sep 29, 2026

    @RiddleTime
    Owner

    Are you not confused with the the N from Neutral?

  5. HBbrody commented on Sep 29, 2026

    @HBbrody
    ContributorAuthor

    No, it is a 10 on screen, not the N. Caught it in a frame: the HUD shows a 10 while the car is in 2nd.

    Image

    Easy to reproduce on a stock car with no gearbox upgrades. The one in the shot is a stock 2001 Acura Integra Type R.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions