Partial fix (part 3) #2277, fix #2034: Fix sync door opening, fix sync of vehicle parts (doors, lights, panels and wheels) states on custom allocated vehicle model IDs #2398
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 pull makes the server treat vehicle IDs outside the range 400-611 (VEHICLE_NONE) as having doors, thus enables sync, which the client expected and was misinterpreting wrong data as door open ratio sync, which had a knock-on effect on door, lights, panels and wheel states sync.
Because to the client the vehicle copies the type of its parent, if it's a doorless type (i.e. boat, bike, bmx, etc.) it wouldn't normally send door sync. This pull forces this data to be sent for all custom vehicle IDs, the sever always reads this data for non-standard models, always sends it off to other clients, and all clients (with this patch) will read this data and apply it only if it makes sense (i.e. the vehicle has doors on the client)