Skip to content

Fix swinging chassis handling flag not applying#5086

Open
TheCrazy17 wants to merge 1 commit into
multitheftauto:masterfrom
TheCrazy17:fix/swinging-chassis
Open

Fix swinging chassis handling flag not applying#5086
TheCrazy17 wants to merge 1 commit into
multitheftauto:masterfrom
TheCrazy17:fix/swinging-chassis

Conversation

@TheCrazy17

Copy link
Copy Markdown
Contributor

Summary

Makes the swinging chassis handling flag actually apply when it's changed on a vehicle, instead of only doing something if the vehicle was created with that flag already set. Also makes sure turning the flag on for the Firela (ladder fire truck) doesn't break its ladder, since the game reuses the same internal slot for both.

Motivation

Fixes #1117. The game only reads the swinging chassis flag once, when the vehicle is actually constructed, to set up how much the chassis is allowed to wobble. Changing the handling afterwards (handling editor, setVehicleHandling, setModelHandling) updates the stored value but never redoes that setup, so the flag looked like it did nothing regardless of when you changed it.

Test plan

Spawn a Greenwood, disable the swinging chassis flag in hedit and confirm it stops wobbling right away, without having to respawn the vehicle. Enable it back and it will work.

Spawn a Firela (Firetruck with Ladder), force enable the swinging chassis flag on it in hedit and confirm the ladder still works normally instead of turning into a wobbling chassis.

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.

…ing changes; the game only reads it once when the vehicle is created, so live changes never took effect. Also stop it from touching the Firela's ladder, which reuses the same slot.
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.

Swinging_Chassis handling flag does not work

1 participant