Fix door and damage sync of vehicles added with engineRequestModel() #2421
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.
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):
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).