-
Notifications
You must be signed in to change notification settings - Fork 35
Description
because of how bevy clears event queues it currently happens that server events can fail to be received by clients using FixedUpdate.
you might write to the EventWriter, and then a few frames tick past before FixedUpdate runs again, by which time the event is long gone. Double buffering keeps it for 2 ticks only.
On your client, if you want to receive the server events in a FixedUpdate system, you might not see them all (even though replicon receives them and writes them to the EventWriter).
here (server_event.rs) is where the standard add_event
is used, which is what the clients consume via a system using normal EventReaders.
to make this work for fixedupdate clients, that would need to be a manually created Events resource too, like are used for the serverside events (the ones with ToClients<>
wrappers).
but then the question is: where do we clear the event queues?
we don't really know if the client is using fixedupdate..
I could change it to a manually created/cleared Events, and put a system to clear it in in Last
. That would work the same for people who aren't using FixedUpdate.
Then we'd need a setting in the replicon client plugin: using_fixed_update=true
which doesn't add the event clearing system, but makes the consumer add it themselves to fixedupdate.
How does that sound?