Skip to content

Add removeElementData client side#4745

Open
ArranTuna wants to merge 5 commits intomultitheftauto:masterfrom
ArranTuna:removeElementData
Open

Add removeElementData client side#4745
ArranTuna wants to merge 5 commits intomultitheftauto:masterfrom
ArranTuna:removeElementData

Conversation

@ArranTuna
Copy link
Collaborator

@ArranTuna ArranTuna commented Mar 7, 2026

Summary

Fixes #594

removeElementData can now be called on the client which actually deletes (rather than just sets to nil or false) an element data. It also sends a new packet type to the server and syncs it with clients.

Motivation

To actually delete element data so that nil or false isn't being unnecessarily synced to future clients.

Test plan

Although I didn't test with 2 PCs I used it on an object then reconnected to verify that new clients are no longer being synced a removed element data.

Edit: tested with 2 PCs and the remote players have the element data removed correctly.

removeElementData can now be called on the client which actually deletes (rather than just sets to nil or false) an element data. It also sends a new packet type to the server and syncs it with clients.
@ArranTuna ArranTuna requested a review from a team as a code owner March 7, 2026 11:24
@FileEX FileEX added the enhancement New feature or request label Mar 9, 2026
@ArranTuna
Copy link
Collaborator Author

ArranTuna commented Mar 10, 2026

Tested everything with 2 PCs, fixed that client variable wasn't being sent to onElementDataChange when a client used removeElementData.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Client-side removeElementData

2 participants