There is a subtle bug introduced by updating the pre-prediction logic.
I recently distinguish between Replicated (an entity that is currently being replicated from the remote) and InitialReplicated(an entity that was initially spawned from a remote).
In the case of pre-prediction, the current ordering is:
client spawns entity with PrePredicted
server receives it and adds Replicated and InitialReplicated (upon replication)
server observer notices the PrePredicted and transfer the authority from client to server, removing the Replicatedcomponent (since the entity is now owned by the server)
the system in server.rs queries on Replicated, but the component does not exist anymore.
The solution is for now to update it to use InitialReplicated. It's a bit confusing, annoying and not ideal but I don't see an easier fix right now
There is a subtle bug introduced by updating the pre-prediction logic.
I recently distinguish between
Replicated
(an entity that is currently being replicated from the remote) andInitialReplicated
(an entity that was initially spawned from a remote). In the case of pre-prediction, the current ordering is:PrePredicted
Replicated
andInitialReplicated
(upon replication)PrePredicted
and transfer the authority from client to server, removing theReplicated
component (since the entity is now owned by the server)The solution is for now to update it to use
InitialReplicated
. It's a bit confusing, annoying and not ideal but I don't see an easier fix right nowFixes https://github.com/cBournhonesque/lightyear/issues/701