Skip to content

fix(gta-core-five): NPC vehicles tipping over & oversensitive skid audio at high FPS - #4066

Open
DaniGP17 wants to merge 1 commit into
citizenfx:masterfrom
DaniGP17:fix/wheel-physics-tyre-screech-high-fps
Open

fix(gta-core-five): NPC vehicles tipping over & oversensitive skid audio at high FPS#4066
DaniGP17 wants to merge 1 commit into
citizenfx:masterfrom
DaniGP17:fix/wheel-physics-tyre-screech-high-fps

Conversation

@DaniGP17

Copy link
Copy Markdown
Contributor

Goal of this PR

Fixes two issues with the fixed-step wheel integration (#4059) that show up at high frame rates: NPC vehicles sometimes start leaning to one side until they almost tip over, and the tyre skid sounds trigger way too easily from small steering inputs.

How is this PR achieving the goal

The problem was that on frames where the accumulator skips the integrator, some per-frame state the game expects was left stale. Now skipped frames re-apply the last step's force/torque delta (continuous delivery instead of one big pulse, which was keeping NPCs from ever falling asleep), do the WF_HIT flag shuffle the integrator normally does at the end of each step (a stale flag made the still-vehicle contact filter reject valid ground contacts), and ease the slip readouts towards the last step's values instead of freezing them, since the skid audio differentiates those per frame and the frozen values made the apparent slip rate look fps/60 times higher than it really is

This PR applies to the following area(s)

FiveM

Successfully tested on

Game builds: 3407

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

Engineering discord:

@github-actions github-actions Bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant