From fc81e0ad21ba737ec49b49bc96dbd42d2d8cd424 Mon Sep 17 00:00:00 2001 From: PROMETHIA-27 <42193387+PROMETHIA-27@users.noreply.github.com> Date: Tue, 22 Jul 2025 03:36:37 -0400 Subject: [PATCH] Update Lightyear to 0.22.4 (#59) --- Cargo.lock | 570 ++++++++++++++---- Cargo.toml | 2 +- .../shared/src/control/controller_common.rs | 35 +- 3 files changed, 457 insertions(+), 150 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 4d61c95..aa6724b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4159,8 +4159,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "leafwing-input-manager" -version = "0.17.0" -source = "git+https://github.com/cBournhonesque/leafwing-input-manager/?branch=cb%2Foverride-state-function#604dbd62ffcf56c8295371d2ecb3a6bda28406e2" +version = "0.17.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68ac3ba8262c0e42b22bb917c18ef9dbe773e2b6b279c61a4a520c5d960b5e1a" dependencies = [ "bevy", "dyn-clone", @@ -4175,7 +4176,8 @@ dependencies = [ [[package]] name = "leafwing_input_manager_macros" version = "0.17.0" -source = "git+https://github.com/cBournhonesque/leafwing-input-manager/?branch=cb%2Foverride-state-function#604dbd62ffcf56c8295371d2ecb3a6bda28406e2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2226cb83129176a6c634f2ce0828c2c29896ea0898fc198636f98696b8056890" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -4255,8 +4257,9 @@ dependencies = [ [[package]] name = "lightyear" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "193fba471971c447248028b533e73e85346b7dee2adea9f61cbdf777b7b935bc" dependencies = [ "aeronet_io", "bevy_app", @@ -4266,26 +4269,26 @@ dependencies = [ "document-features", "lightyear_aeronet", "lightyear_avian2d", - "lightyear_avian3d", - "lightyear_connection", - "lightyear_core", - "lightyear_frame_interpolation", + "lightyear_avian3d 0.22.4", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_frame_interpolation 0.22.4", "lightyear_inputs", "lightyear_inputs_bei", "lightyear_inputs_leafwing", "lightyear_inputs_native", - "lightyear_interpolation", - "lightyear_link", - "lightyear_messages", + "lightyear_interpolation 0.22.4", + "lightyear_link 0.22.4", + "lightyear_messages 0.22.4", "lightyear_netcode", - "lightyear_prediction", - "lightyear_replication", - "lightyear_serde", + "lightyear_prediction 0.22.4", + "lightyear_replication 0.22.4", + "lightyear_serde 0.22.4", "lightyear_steam", - "lightyear_sync", - "lightyear_transport", + "lightyear_sync 0.22.4", + "lightyear_transport 0.22.4", "lightyear_udp", - "lightyear_utils", + "lightyear_utils 0.22.4", "lightyear_webtransport", "serde", "thiserror 2.0.12", @@ -4294,34 +4297,37 @@ dependencies = [ [[package]] name = "lightyear_aeronet" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5b1dd9c873a9afed0301929b7e8087f13d003889bcbeca08661c545cd70e049" dependencies = [ "aeronet_io", "bevy_app", "bevy_ecs", "bevy_reflect", - "lightyear_link", + "lightyear_link 0.22.4", "tracing", ] [[package]] name = "lightyear_avian2d" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b625185ef67da5b51934edc85676a17822a408984852dbfcdc8d7f5f618e042" dependencies = [ "avian2d", "bevy_app", "bevy_ecs", "bevy_math", + "bevy_time", "bevy_transform", "bevy_utils", - "lightyear_core", - "lightyear_frame_interpolation", - "lightyear_interpolation", - "lightyear_link", - "lightyear_prediction", - "lightyear_replication", + "lightyear_core 0.22.4", + "lightyear_frame_interpolation 0.22.4", + "lightyear_interpolation 0.22.4", + "lightyear_link 0.22.4", + "lightyear_prediction 0.22.4", + "lightyear_replication 0.22.4", "tracing", ] @@ -4336,12 +4342,33 @@ dependencies = [ "bevy_math", "bevy_transform", "bevy_utils", - "lightyear_core", - "lightyear_frame_interpolation", - "lightyear_interpolation", - "lightyear_link", - "lightyear_prediction", - "lightyear_replication", + "lightyear_core 0.21.1", + "lightyear_frame_interpolation 0.21.1", + "lightyear_interpolation 0.21.1", + "lightyear_link 0.21.1", + "lightyear_prediction 0.21.1", + "lightyear_replication 0.21.1", + "tracing", +] + +[[package]] +name = "lightyear_avian3d" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acfbf0539383ab92373bcb7060443f34ea9b690bc950d0d9d8b38daab914e53" +dependencies = [ + "avian3d", + "bevy_app", + "bevy_ecs", + "bevy_math", + "bevy_transform", + "bevy_utils", + "lightyear_core 0.22.4", + "lightyear_frame_interpolation 0.22.4", + "lightyear_interpolation 0.22.4", + "lightyear_link 0.22.4", + "lightyear_prediction 0.22.4", + "lightyear_replication 0.22.4", "tracing", ] @@ -4355,9 +4382,29 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bytes", - "lightyear_core", - "lightyear_link", - "lightyear_serde", + "lightyear_core 0.21.1", + "lightyear_link 0.21.1", + "lightyear_serde 0.21.1", + "serde", + "smallvec", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "lightyear_connection" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69332e92b5faf89c62b960d29572e375d211cb4a8f4ac066ad2c14d4a333b788" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bytes", + "lightyear_core 0.22.4", + "lightyear_link 0.22.4", + "lightyear_serde 0.22.4", "serde", "smallvec", "thiserror 2.0.12", @@ -4376,8 +4423,27 @@ dependencies = [ "bevy_reflect", "bevy_time", "chrono", - "lightyear_serde", - "lightyear_utils", + "lightyear_serde 0.21.1", + "lightyear_utils 0.21.1", + "serde", + "tracing", +] + +[[package]] +name = "lightyear_core" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d7cf398fcc3a4188a38209b66aff462aa7c57474aafc650ef896e0cc24725b" +dependencies = [ + "bevy_app", + "bevy_derive", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_time", + "chrono", + "lightyear_serde 0.22.4", + "lightyear_utils 0.22.4", "serde", "tracing", ] @@ -4391,49 +4457,68 @@ dependencies = [ "bevy_ecs", "bevy_time", "bevy_transform", - "lightyear_connection", - "lightyear_core", - "lightyear_interpolation", - "lightyear_replication", + "lightyear_connection 0.21.1", + "lightyear_core 0.21.1", + "lightyear_interpolation 0.21.1", + "lightyear_replication 0.21.1", + "tracing", +] + +[[package]] +name = "lightyear_frame_interpolation" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c81fcfc4b65ac5cef9a038a25d755fcc4c9e728f6ed9eb89c53b72a307e2966" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_time", + "bevy_transform", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_interpolation 0.22.4", + "lightyear_replication 0.22.4", "tracing", ] [[package]] name = "lightyear_inputs" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "847b6d9c16fda40f267d7f7405ac970efec6ff9080a842bd7724471cfe3e722a" dependencies = [ "bevy_app", "bevy_ecs", "bevy_platform", "bevy_reflect", - "lightyear_connection", - "lightyear_core", - "lightyear_interpolation", - "lightyear_link", - "lightyear_messages", - "lightyear_prediction", - "lightyear_replication", - "lightyear_sync", - "lightyear_transport", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_interpolation 0.22.4", + "lightyear_link 0.22.4", + "lightyear_messages 0.22.4", + "lightyear_prediction 0.22.4", + "lightyear_replication 0.22.4", + "lightyear_sync 0.22.4", + "lightyear_transport 0.22.4", "serde", "tracing", ] [[package]] name = "lightyear_inputs_bei" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49c85f95c0924841cd6b057acdd297a7bb9b9dd8c675eab454cc84ba5f475762" dependencies = [ "bevy_app", "bevy_ecs", "bevy_enhanced_input", "bevy_platform", "bevy_reflect", - "lightyear_connection", - "lightyear_core", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", "lightyear_inputs", - "lightyear_utils", + "lightyear_utils 0.22.4", "serde", "thiserror 2.0.12", "tracing", @@ -4441,8 +4526,9 @@ dependencies = [ [[package]] name = "lightyear_inputs_leafwing" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33435bd4692e28d00c615a6e1b35913acb8d1d46704b9f9d87599ee5dd734055" dependencies = [ "bevy_app", "bevy_ecs", @@ -4451,7 +4537,7 @@ dependencies = [ "bevy_platform", "bevy_reflect", "leafwing-input-manager", - "lightyear_core", + "lightyear_core 0.22.4", "lightyear_inputs", "serde", "tracing", @@ -4459,13 +4545,15 @@ dependencies = [ [[package]] name = "lightyear_inputs_native" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1074d9f7d85797ce2b05d462d0c7b4091665664f0aaa1234b2c89a847d6b8dfc" dependencies = [ "bevy_app", + "bevy_derive", "bevy_ecs", "bevy_reflect", - "lightyear_core", + "lightyear_core 0.22.4", "lightyear_inputs", "serde", "tracing", @@ -4484,13 +4572,38 @@ dependencies = [ "bevy_reflect", "bevy_time", "bevy_utils", - "lightyear_connection", - "lightyear_core", - "lightyear_messages", - "lightyear_replication", - "lightyear_serde", - "lightyear_sync", - "lightyear_utils", + "lightyear_connection 0.21.1", + "lightyear_core 0.21.1", + "lightyear_messages 0.21.1", + "lightyear_replication 0.21.1", + "lightyear_serde 0.21.1", + "lightyear_sync 0.21.1", + "lightyear_utils 0.21.1", + "serde", + "tracing", +] + +[[package]] +name = "lightyear_interpolation" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e81e1871f21da4e7b966186fa1e1abdb33dbd4c9cfde43a23c8a14b533ae4759" +dependencies = [ + "bevy_app", + "bevy_derive", + "bevy_ecs", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_time", + "bevy_utils", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_messages 0.22.4", + "lightyear_replication 0.22.4", + "lightyear_serde 0.22.4", + "lightyear_sync 0.22.4", + "lightyear_utils 0.22.4", "serde", "tracing", ] @@ -4504,8 +4617,24 @@ dependencies = [ "bevy_ecs", "bevy_reflect", "bytes", - "lightyear_core", - "lightyear_utils", + "lightyear_core 0.21.1", + "lightyear_utils 0.21.1", + "rand 0.9.1", + "tracing", +] + +[[package]] +name = "lightyear_link" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa5856b9910ac9214c04ad0b20da4fc16ccbfd6c09355353ec6bb622b27d934b" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_reflect", + "bytes", + "lightyear_core 0.22.4", + "lightyear_utils 0.22.4", "rand 0.9.1", "tracing", ] @@ -4519,12 +4648,32 @@ dependencies = [ "bevy_ecs", "bevy_reflect", "bytes", - "lightyear_connection", - "lightyear_core", - "lightyear_link", - "lightyear_serde", - "lightyear_transport", - "lightyear_utils", + "lightyear_connection 0.21.1", + "lightyear_core 0.21.1", + "lightyear_serde 0.21.1", + "lightyear_transport 0.21.1", + "lightyear_utils 0.21.1", + "serde", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "lightyear_messages" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "169eea15e685ebff31d9263d1b4513408313897a008c763a1b0b91a0fb1e552a" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_reflect", + "bytes", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_link 0.22.4", + "lightyear_serde 0.22.4", + "lightyear_transport 0.22.4", + "lightyear_utils 0.22.4", "serde", "thiserror 2.0.12", "tracing", @@ -4532,8 +4681,9 @@ dependencies = [ [[package]] name = "lightyear_netcode" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49426dec872253d4ab6e6871ef935802549bb31374036257fd0e47e75cec6f33" dependencies = [ "aeronet_io", "bevy_app", @@ -4542,12 +4692,12 @@ dependencies = [ "bevy_time", "bytes", "chacha20poly1305", - "lightyear_connection", - "lightyear_core", - "lightyear_link", - "lightyear_serde", - "lightyear_transport", - "lightyear_utils", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_link 0.22.4", + "lightyear_serde 0.22.4", + "lightyear_transport 0.22.4", + "lightyear_utils 0.22.4", "no_std_io2", "rand 0.9.1", "thiserror 2.0.12", @@ -4568,16 +4718,45 @@ dependencies = [ "bevy_platform", "bevy_reflect", "bevy_time", - "lightyear_connection", - "lightyear_core", - "lightyear_frame_interpolation", - "lightyear_interpolation", - "lightyear_link", - "lightyear_messages", - "lightyear_replication", - "lightyear_serde", - "lightyear_sync", - "lightyear_utils", + "lightyear_connection 0.21.1", + "lightyear_core 0.21.1", + "lightyear_frame_interpolation 0.21.1", + "lightyear_interpolation 0.21.1", + "lightyear_link 0.21.1", + "lightyear_replication 0.21.1", + "lightyear_serde 0.21.1", + "lightyear_sync 0.21.1", + "lightyear_utils 0.21.1", + "parking_lot", + "seahash", + "serde", + "tracing", +] + +[[package]] +name = "lightyear_prediction" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f256d99bb82370509cb34d2b56447c4ae4db9e7d3519d501cef256d3d7de587" +dependencies = [ + "bevy_app", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_math", + "bevy_platform", + "bevy_reflect", + "bevy_time", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_frame_interpolation 0.22.4", + "lightyear_interpolation 0.22.4", + "lightyear_link 0.22.4", + "lightyear_messages 0.22.4", + "lightyear_replication 0.22.4", + "lightyear_serde 0.22.4", + "lightyear_sync 0.22.4", + "lightyear_utils 0.22.4", "parking_lot", "seahash", "serde", @@ -4588,6 +4767,35 @@ dependencies = [ name = "lightyear_replication" version = "0.21.1" source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +dependencies = [ + "avian3d", + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_ptr", + "bevy_reflect", + "bevy_time", + "bevy_transform", + "bytes", + "dashmap", + "lightyear_connection 0.21.1", + "lightyear_core 0.21.1", + "lightyear_link 0.21.1", + "lightyear_messages 0.21.1", + "lightyear_serde 0.21.1", + "lightyear_transport 0.21.1", + "lightyear_utils 0.21.1", + "serde", + "smallvec", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "lightyear_replication" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c91650857e0aaef9403ddbd589b94e9df54651d5e046215b09c9581517afd4e9" dependencies = [ "avian2d", "avian3d", @@ -4600,13 +4808,13 @@ dependencies = [ "bevy_transform", "bytes", "dashmap", - "lightyear_connection", - "lightyear_core", - "lightyear_link", - "lightyear_messages", - "lightyear_serde", - "lightyear_transport", - "lightyear_utils", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_link 0.22.4", + "lightyear_messages 0.22.4", + "lightyear_serde 0.22.4", + "lightyear_transport 0.22.4", + "lightyear_utils 0.22.4", "serde", "smallvec", "thiserror 2.0.12", @@ -4632,19 +4840,40 @@ dependencies = [ "variadics_please", ] +[[package]] +name = "lightyear_serde" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8abacb721279778366728344102240d279e3f72693c2c8ed8a9feb527bf8b4da" +dependencies = [ + "bevy_derive", + "bevy_ecs", + "bevy_platform", + "bevy_ptr", + "bevy_reflect", + "bincode", + "bytes", + "no_std_io2", + "serde", + "thiserror 2.0.12", + "tracing", + "variadics_please", +] + [[package]] name = "lightyear_steam" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40f19ee16713f70eb8b03f95d00533b497ebdb63bded9cdc85864e9998e14f48" dependencies = [ "aeronet_io", "aeronet_steam", "bevy_app", "bevy_ecs", "lightyear_aeronet", - "lightyear_connection", - "lightyear_core", - "lightyear_link", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_link 0.22.4", "thiserror 2.0.12", "tracing", ] @@ -4661,13 +4890,37 @@ dependencies = [ "bevy_reflect", "bevy_time", "bevy_utils", - "lightyear_connection", - "lightyear_core", - "lightyear_link", - "lightyear_messages", - "lightyear_serde", - "lightyear_transport", - "lightyear_utils", + "lightyear_connection 0.21.1", + "lightyear_core 0.21.1", + "lightyear_link 0.21.1", + "lightyear_messages 0.21.1", + "lightyear_serde 0.21.1", + "lightyear_transport 0.21.1", + "lightyear_utils 0.21.1", + "serde", + "tracing", +] + +[[package]] +name = "lightyear_sync" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf0cc472ae1a69f31fb044522be52d54ed0fb21ac87ae4e9cc81177b6222491" +dependencies = [ + "bevy_app", + "bevy_derive", + "bevy_diagnostic", + "bevy_ecs", + "bevy_reflect", + "bevy_time", + "bevy_utils", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_link 0.22.4", + "lightyear_messages 0.22.4", + "lightyear_serde 0.22.4", + "lightyear_transport 0.22.4", + "lightyear_utils 0.22.4", "serde", "tracing", ] @@ -4688,13 +4941,42 @@ dependencies = [ "enum_dispatch", "governor", "indexmap", - "lightyear_connection", - "lightyear_core", - "lightyear_link", - "lightyear_serde", - "lightyear_utils", + "lightyear_connection 0.21.1", + "lightyear_core 0.21.1", + "lightyear_link 0.21.1", + "lightyear_serde 0.21.1", + "lightyear_utils 0.21.1", "nonzero_ext", - "ringbuffer", + "ringbuffer 0.15.0", + "serde", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "lightyear_transport" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "596415739d85219669af6e12c08590f79880422643ce0b1c9df9f220badb3237" +dependencies = [ + "bevy_app", + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "bevy_time", + "bevy_utils", + "bytes", + "crossbeam-channel", + "enum_dispatch", + "governor", + "indexmap", + "lightyear_connection 0.22.4", + "lightyear_core 0.22.4", + "lightyear_link 0.22.4", + "lightyear_serde 0.22.4", + "lightyear_utils 0.22.4", + "nonzero_ext", + "ringbuffer 0.16.0", "serde", "thiserror 2.0.12", "tracing", @@ -4702,16 +4984,17 @@ dependencies = [ [[package]] name = "lightyear_udp" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f150d0153bcb576db14754a0c1d1cc210e078e65ca6b335333dbb8ef5a8703f" dependencies = [ "aeronet_io", "bevy_app", "bevy_ecs", "bevy_platform", "bytes", - "lightyear_core", - "lightyear_link", + "lightyear_core 0.22.4", + "lightyear_link 0.22.4", "thiserror 2.0.12", "tracing", ] @@ -4725,15 +5008,30 @@ dependencies = [ "bevy_platform", "bevy_reflect", "hashbrown 0.15.4", - "lightyear_serde", + "lightyear_serde 0.21.1", + "paste", + "seahash", +] + +[[package]] +name = "lightyear_utils" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "260feac85385f1698c712711480dd2f359bb5e9b04247ddca1801d0a9fd90633" +dependencies = [ + "bevy_ecs", + "bevy_platform", + "bevy_reflect", + "hashbrown 0.15.4", "paste", "seahash", ] [[package]] name = "lightyear_webtransport" -version = "0.21.1" -source = "git+https://github.com/cBournhonesque/lightyear.git?rev=03cbf419a2c0595261b64420bc0332fc3fe1cc3f#03cbf419a2c0595261b64420bc0332fc3fe1cc3f" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900ba027710e1df8c9624d336280e7809beedfe50b249cef7a3add4ce67a1bbc" dependencies = [ "aeronet_io", "aeronet_webtransport", @@ -4741,7 +5039,7 @@ dependencies = [ "bevy_ecs", "bevy_reflect", "lightyear_aeronet", - "lightyear_link", + "lightyear_link 0.22.4", "thiserror 2.0.12", "tracing", ] @@ -6442,6 +6740,12 @@ version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3df6368f71f205ff9c33c076d170dd56ebf68e8161c733c0caa07a7a5509ed53" +[[package]] +name = "ringbuffer" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b0b88a509053cbfd535726dcaaceee631313cef981266119527a1d110f6d2b" + [[package]] name = "robust" version = "1.2.0" @@ -6795,7 +7099,7 @@ dependencies = [ "bevy_trenchbroom", "happy_feet", "lightyear", - "lightyear_avian3d", + "lightyear_avian3d 0.21.1", "nil 0.14.0", "rand 0.8.5", "ron", diff --git a/Cargo.toml b/Cargo.toml index 5bdb91b..bc5890f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ bevy_trenchbroom = { version = "0.8.1", features = ["avian"] } happy_feet = { git = "https://github.com/atornity/happy_feet.git", rev = "1b24ed95f166e63af35e7b6f9f0053d6d28e1f1a", features = [ "serde", ] } -lightyear = { git = "https://github.com/cBournhonesque/lightyear.git", rev = "03cbf419a2c0595261b64420bc0332fc3fe1cc3f", default-features = false, features = [ +lightyear = { version = "0.22.4", default-features = false, features = [ "interpolation", "netcode", "prediction", diff --git a/crates/shared/src/control/controller_common.rs b/crates/shared/src/control/controller_common.rs index 0d02115..ec36f00 100644 --- a/crates/shared/src/control/controller_common.rs +++ b/crates/shared/src/control/controller_common.rs @@ -11,10 +11,7 @@ use crate::{ player::{Player, PlayerBodyMesh}, }; use avian3d::{math::*, prelude::*}; -use bevy::{ - ecs::{component::HookContext, world::DeferredWorld}, - prelude::*, -}; +use bevy::prelude::*; use happy_feet::prelude::{ Character, CharacterDrag, CharacterGravity, CharacterMovement, CharacterPlugins, GroundFriction, Grounding, GroundingConfig, KinematicVelocity, MoveInput, SteppingBehaviour, @@ -47,6 +44,8 @@ pub fn plugin(app: &mut App) { FixedPreUpdate, decelerate.run_if(in_state(GameState::Playing)), ); + + app.add_systems(Update, add_controller_bundle); } fn set_animation_flags( @@ -160,20 +159,24 @@ pub struct MovementSpeedFactor(pub f32); #[derive(Component, Reflect, Default, Debug, Serialize, Deserialize, PartialEq)] #[reflect(Component)] -#[component(on_add = add_controller_bundle)] pub struct PlayerCharacterController; -fn add_controller_bundle(mut world: DeferredWorld, ctx: HookContext) { - let head = world - .entity(ctx.entity) - .get::() - .expect("player must be spawned with an `ActiveHead`") - .0; - let controls = world.resource::().head_stats(head).controls; - world - .commands() - .entity(ctx.entity) - .insert(CharacterControllerBundle::new(controls)); +fn add_controller_bundle( + mut commands: Commands, + controllers: Query< + (Entity, &ActiveHead), + (With, Without), + >, + db: Option>, +) { + let Some(db) = db else { return }; + + for (controller, head) in controllers { + let controls = db.head_stats(head.0).controls; + commands + .entity(controller) + .insert(CharacterControllerBundle::new(controls)); + } } /// A bundle that contains the components needed for a basic