Skip to content

Conversation

@BCG2000
Copy link
Contributor

@BCG2000 BCG2000 commented Oct 25, 2021

This fixes the issue where vehicles added with engineRequestModel() display several bugs when someone else drives them, such as the doors constantly switching between open and closed, as well as the tires always appearing popped (#2277 (comment)).

It does this by sending the parent model ID instead of the allocated clientside model ID during a vehicle pure sync (to match the one on the server, which is always the parent model).

Test resource is the same one from #2247.
Example of fix working (click to open YouTube video):
Alt text

Also, #2399 has to be merged as well to fix any remaining sync inconsistency.

EDIT: I forgot to add the description in the commit message (so what it is doing is clearer). When squashing I ask it to be this if possible:
Make CNetAPI::WriteVehiclePuresync() use parent model ID when syncing vehicles added with engineRequestModel().

Also this can close #2034, but #2277 can possibly remain open so people can keep listing bugs (not sure, up to you).

BCG2000 added 7 commits May 30, 2021 07:57
Make CClientVehicleManager::GetMaxPassengerCount() and CVehicleNames::GetVehicleTypeName() use parent model ID if used on a vehicle added with engineRequestModel().
Fix door and damage sync of vehicles added with engineRequestModel().
Copy link
Member

@lopezloo lopezloo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@lopezloo lopezloo merged commit 51d3288 into multitheftauto:master Oct 28, 2021
@lopezloo lopezloo added the bug Something isn't working label Oct 28, 2021
@StrixG StrixG added this to the Next Release (1.6.0) milestone Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add-on vehicle behaving weird

3 participants