Fix swinging chassis handling flag not applying#5086
Open
TheCrazy17 wants to merge 1 commit into
Open
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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