cBournhonesque / lightyear

A networking library to make multiplayer games for the Bevy game engine
https://cbournhonesque.github.io/lightyear/book
Apache License 2.0
498 stars 51 forks source link

Fix pre-prediction example #703

Closed cBournhonesque closed 4 days ago

cBournhonesque commented 4 days ago

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:

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

Fixes https://github.com/cBournhonesque/lightyear/issues/701