Skip to content

Implement #1916: Make client-side setVehicleHandling to work on vehicles created server-side #1935

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

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

Grafu
Copy link
Contributor

@Grafu Grafu commented Dec 21, 2020

No description provided.

@Dutchman101
Copy link
Member

Dutchman101 commented Dec 21, 2020

This PR probably needs to be closed as per the below comment:

"I agree with you but this is too much effort for me. So I give up at this point. Good luck"

Originally posted by @Grafu in #1916 (comment)

.. in response to a discussion about the desyncs this would bring

Will close if there's no other feedback (or more opinions regarding the 'desync' discussion) soon

@LosFaul
Copy link
Contributor

LosFaul commented Dec 21, 2020

i think we should handle it diplomaticly

i could open a new issue based on this PR after it would be merged
which would be about extending setVehicleHandling for localPlayer controlled vehicle with sync option

what you guys think?

@patrikjuvonen patrikjuvonen added the enhancement New feature or request label Dec 29, 2020
@botder
Copy link
Member

botder commented Jan 6, 2021

Adding sync to that would require a server trip to avoid desync and at that point you could've used the serverside function in the first place. I am against this pull request unless somebody has a better idea.

@Fernando-A-Rocha
Copy link
Contributor

Adding sync to that would require a server trip to avoid desync and at that point you could've used the serverside function in the first place. I am against this pull request unless somebody has a better idea.

As I mentioned on the #custom-model-ids channel, intentional desync is not a problem, it is up to the developer and you can easily make "sync" by having all clients set the same handling on X vehicle. This usecase is necessary for engineRequestModel vehicles to work properly with custom handling as their model is changed (setElementModel) clientside and this already causes desync.

Thank you for the additional considerations.

@Fernando-A-Rocha
Copy link
Contributor

Adding sync to that would require a server trip to avoid desync and at that point you could've used the serverside function in the first place. I am against this pull request unless somebody has a better idea.

@botder
Please re open this PR and consider merging it. There is no need for sync here, for the same reason as there is no sync in setElementModel when it changes a server-created element's model on a client.

@botder botder reopened this Sep 15, 2023
@PlatinMTA
Copy link
Contributor

@botder
Please re open this PR and consider merging it. There is no need for sync here, for the same reason as there is no sync in setElementModel when it changes a server-created element's model on a client.

The current solution is pretty bad (ask the server to set the handling after the client loads the model for example).

Having this function work like rocha asks would help quite a lot.

@botder botder merged commit 4b86e46 into multitheftauto:master Sep 15, 2023
@botder botder added this to the 1.6.1 milestone Sep 15, 2023
MTABot pushed a commit that referenced this pull request Sep 15, 2023
4b86e46 Allow setVehicleHandling to modify server-side vehicles on client (PR #1935)
e1d0fcb Visual Studio Update
@Xenius97
Copy link
Contributor

This could be a security issue, i don't recommend to merge it to master. With lua injection you can troll servers by modifying vehicle handling (eg. on race servers).

@botder
Copy link
Member

botder commented Sep 16, 2023

With Lua injection you could also give your own vehicle more velocity/acceleration before the merge.

Fernando-A-Rocha added a commit to Fernando-A-Rocha/mta-add-models that referenced this pull request Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sync
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants