Updated KeyCode values to prepend Key (e.g., KeyCode::W -> KeyCode::KeyW)
Replaced Cube and Plane meshes with their new math primitives as recommended for depreciation reasons
Explicitly converted Color into a StandardMaterial rather than relying on implicit into()
Updated AddRollbackCommandExtension to match new lifetime generics for EntityCommands
Implemented EntityMapper (which is now a trait instead of a type) for RollbackEntityMap, which will return the provided entity if it is not contained in the mapping. This ensures entities which are not tracked by the rollback map are not modified.
Replaced the inner HashMap of the RollbackEntityMap with an EntityHashMap, which is an optimised type provided by Bevy.
Updated the Component and Resource entity mapper plugins to use the new EntityMapper implementation provided by RollbackEntityMap. This removes a significant TODO on their implementations where if a mapping was done over a non-rollback entity, the mapping had to be undone.
Ran fmt and clippy and ensured clean output.
Tests and the synctest example work as expected. I haven't had a chance to verify this against a real multiplayer application, so if anyone has the free time to test this branch out, please do!
Objective
Solution
Input
references toButtonInput
KeyCode
values to prependKey
(e.g.,KeyCode::W
->KeyCode::KeyW
)Cube
andPlane
meshes with their new math primitives as recommended for depreciation reasonsColor
into aStandardMaterial
rather than relying on implicitinto()
AddRollbackCommandExtension
to match new lifetime generics forEntityCommands
EntityMapper
(which is now a trait instead of a type) forRollbackEntityMap
, which will return the provided entity if it is not contained in the mapping. This ensures entities which are not tracked by the rollback map are not modified.HashMap
of theRollbackEntityMap
with anEntityHashMap
, which is an optimised type provided by Bevy.Component
andResource
entity mapper plugins to use the newEntityMapper
implementation provided byRollbackEntityMap
. This removes a significant TODO on their implementations where if a mapping was done over a non-rollback entity, the mapping had to be undone.fmt
andclippy
and ensured clean output.Tests and the synctest example work as expected. I haven't had a chance to verify this against a real multiplayer application, so if anyone has the free time to test this branch out, please do!