-
-
Notifications
You must be signed in to change notification settings - Fork 464
Add spawnFlyingComponent argument to setVehicleWheelStates() #2128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spawnFlyingComponent argument to setVehicleWheelStates() #2128
Conversation
In the video I saw you had to interact with the vehicle to make it recalculate the physics. Is there a way to do that automatically? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR would've been easier to review if you set a default value for spawnFlyingComponent
.
Next time please try to keep code changes to minimal.
But thanks for the PR! I dont see any glaring issues.
I don't actually know. This has been default behaviour since forever, but it's inconsistent, sometimes it just falls down when other times it just mantains like that until you interact with the vehicle (even if you deleted all 4 wheels). When driving it does not happen tho. I'll see what you reviewed in a moment, thanks. EDIT:
What should I do next time? I didn't understand what are you referring to. Just in case the default value is Also, shouldn't I edit the |
Reformated the if statment so it looks cleaner
Pushed to last, didn't test, for some reason custom builds crash on my PC now
why this pr is not merged until now |
I think this PR can be closed because #3592 is doing the job |
indeed this can be closed as #3592 has already been merged |
This pull request is related to #2121. I could work in #2122 as well but I don't promise anything.
Now
setVehicleWheelStates
has a new boolean argument calledspawnFlyingComponent
just likesetVehicleDoorState
. If it is set to true and a wheel is changed to2
then it will make the wheel visually detach from the vehicle like in this video: https://youtu.be/1zpKGbvpbnYI would really check twice this pull before mergin it. It is my first time pulling to MTA and I could be breaking the Coding Guidelines or doing something that is not the smartest.
Thank you!