Closed y0014984 closed 10 months ago
How is syncing currently handled when the barrel is moved? Manually updated?
How is syncing currently handled when the barrel is moved? Manually updated?
I create the marker after the barrel is placed (final action to complete the OPFOR phase). So there is no need for syncing the marker currently. But vanilla has options to sync markers if we have to.
Mostly accomplished. Instead of creating a local marker on every player (how can then change and delete it) I create a static marker. These markers are synced between all members of one faction. Only the owner of the marker can change and delete it. So I decided to make the commander of every faction the owner of the marker. Only these commanders can change or delete the marker. If accidentally the marker is changed or deleted I added a visual indicator (a small dot) to the circle marker. If no marker is there you can still see the dot. I think this is enough to accomplish this task.
Currently, the Flag Marker is created locally on all clients. Every client can change and delete it's copy. Not sure if we can change that. Perhaps if we change the markerType to synched marker. That way only 2 markers, one for each side needs to be created. But one player needs to be the owner. Perhaps you can set the owner to server? My first tests were unsuccessful.
Another approch would be to integrate the Flag Marker or any other kind of symbol into the circle marker, which is not changeable or deleteable.
Last option would be to create our own marker system that is integrated in the circle marker ui class.