altv-issues
altv-issues copied to clipboard
streamSyncedMetaChange is triggered for unchanged data
Description of the problem
Array & Object variables acts weirdly on entity streamSyncedMetaChange.
Reproduction steps
Serverside:
alt.on('playerConnect', (player) => {
player.setStreamSyncedMeta('test', 'yes');
player.setStreamSyncedMeta('test_with_array', ['pickaxe', 'hatchet']);
});
alt.setInterval(() => {
const players = alt.Player.all;
players.forEach((p) => p.setStreamSyncedMeta('test', 'yes'));
}, 10000);
Clientside:
alt.on('streamSyncedMetaChange', (baseObject, key, value, oldValue) => {
alt.log({ key, value, oldValue });
});
Re-set the "test" meta variable (it could be any), upon setting it, its gonna call the test_with_array like it was changed. Same thing goes for if we have more array/object variables set under the player.
Expected behaviour
Additional context
No response
Operating system
Windows 11
Version
16.2.13
Crashdump ID
No response
Confirmation of issue's presence
- [X] By submitting this ticket, I affirm that I have verified the presence of this issue on the latest RC (Release Candidate) version available at the time of writing this ticket.