Skip to content

Fix vehicle door model flags not applying via setVehicleHandling - #5294

Open
TheCrazy17 wants to merge 3 commits into
multitheftauto:masterfrom
TheCrazy17:fix/reverse-bonnet-boot-flags
Open

Fix vehicle door model flags not applying via setVehicleHandling#5294
TheCrazy17 wants to merge 3 commits into
multitheftauto:masterfrom
TheCrazy17:fix/reverse-bonnet-boot-flags

Conversation

@TheCrazy17

@TheCrazy17 TheCrazy17 commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Summary

GTA:SA only applies these handling model flags once, inside the vehicle's native constructor, so a live handling change (or a vehicle simply spawning through MTA's own creation path) never picked them up correctly:

  • reverse_bonnet: bonnet hinges and opens the other way around instead of the default direction.
  • hanging_boot: boot hangs open instead of swinging like a rigid lid.
  • tailgate_boot: boot opens like a pickup style tailgate instead of a regular lid.
  • no_doors: marks the four side doors as missing; meant for vehicles with no door model at all, like the RC cars.

This PR recalculates the bonnet and boot hinge setup whenever handling changes, the same way an existing fix already does for the swinging chassis flag. It also fixes the order handling gets reapplied on stream in, since restoring a door's open ratio before the hinge fix ran baked in the wrong angle. no_doors additionally hides the door mesh directly, since a locked vehicle's front doors were quietly turning the request into a dent instead of hiding it.

Example of reverse_bonnet:
image

image

Motivation

Related to #1993, which lists several handling flags that have a real effect in game but can't be applied through scripting. This PR resolves no_doors from that list; reverse_bonnet, hanging_boot and tailgate_boot share the exact same root cause and are fixed alongside it.

Also, requested by, and made with care for, @rxyyy

Test plan

  • Applied each flag live via setVehicleHandling/setModelHandling on a normal car and confirmed the bonnet/boot now open the correct way, and side doors disappear for no_doors, including on a locked vehicle.
  • Confirmed vanilla vehicles that ship with reverse_bonnet by default (Enforcer looks like its bugged by default, Firetruck, Tractor, SWAT Van) open correctly too.
  • Streamed a vehicle with an open, flagged bonnet out and back in; the hinge stays correct instead of resetting to the default direction.

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@TheCrazy17 TheCrazy17 changed the title Fix reverse_bonnet, hanging_boot, tailgate_boot and no_doors vehicle model flags Fix vehicle door model flags not applying via setVehicleHandling Aug 30, 2026
@rxyyy

rxyyy commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Thank you bro, this has been driving me insane.

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