diff --git a/Cargo.toml b/Cargo.toml index 5b40dd7..aa32a5c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,3 +1,22 @@ [workspace] resolver = "2" members = ["client"] + +[patch.crates-io] +bevy = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_app = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_ecs = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_log = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_math = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_reflect = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_tasks = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_transform = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_utils = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_platform = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_color = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_gizmos = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_render = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_input = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_time = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } +bevy_window = { git = "https://github.com/bevyengine/bevy.git", tag = "v0.16.1" } + diff --git a/client/Cargo.toml b/client/Cargo.toml index a29dc88..57e4c92 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -9,11 +9,11 @@ build = "build.rs" [dependencies] -bevy = { version = "0.15.1", features = ["jpeg", "trace_tracy", "trace_tracy_memory", "serialize"] } +bevy = { version = "0.16.1", features = ["jpeg", "trace_tracy", "trace_tracy_memory", "serialize"] } rand = "0.8.5" serde = { version = "1.0", features = ["derive"] } toml = "0.8" -big_space = "0.9.1" +big_space = { git = "https://github.com/aevyrie/big_space.git", rev = "5345af11d4ce138bacf5a9a3ab53d1c3b3b103c7" } noise = "0.9.0" itertools = "0.13.0" bitvec = "1.0.1" diff --git a/client/src/app.rs b/client/src/app.rs index 958713e..b72c41e 100644 --- a/client/src/app.rs +++ b/client/src/app.rs @@ -10,7 +10,7 @@ impl Plugin for AppPlugin { app.add_plugins(crate::plugins::environment::environment_plugin::EnvironmentPlugin); //app.add_plugins(crate::plugins::network::network_plugin::NetworkPlugin); app.add_plugins(crate::plugins::input::input_plugin::InputPlugin); - app.add_plugins(WireframePlugin); + app.add_plugins(WireframePlugin::default()); app.add_systems(Update, (debug_gizmos)); app.register_type::>>(); diff --git a/client/src/main.rs b/client/src/main.rs index 8b1b77c..23d92c9 100644 --- a/client/src/main.rs +++ b/client/src/main.rs @@ -13,7 +13,7 @@ use bevy::render::RenderPlugin; use bevy::DefaultPlugins; use bevy::input::gamepad::AxisSettingsError::DeadZoneUpperBoundGreaterThanLiveZoneUpperBound; use bevy::window::PresentMode; -use big_space::plugin::BigSpacePlugin; +use big_space::plugin::BigSpaceDefaultPlugins; use toml; use crate::config::Config; use crate::plugins::big_space::big_space_plugin::BigSpaceIntegrationPlugin; diff --git a/client/src/plugins/big_space/big_space_plugin.rs b/client/src/plugins/big_space/big_space_plugin.rs index 8850753..0674030 100644 --- a/client/src/plugins/big_space/big_space_plugin.rs +++ b/client/src/plugins/big_space/big_space_plugin.rs @@ -1,5 +1,7 @@ use bevy::math::DVec3; use bevy::prelude::*; +use bevy::ecs::prelude::ChildOf; + use big_space::prelude::*; /// Plugin enabling high precision coordinates using `big_space`. @@ -14,7 +16,7 @@ pub struct RootGrid(pub Entity); impl Plugin for BigSpaceIntegrationPlugin { fn build(&self, app: &mut App) { - app.add_plugins(BigSpacePlugin::::default()); + app.add_plugins(BigSpaceDefaultPlugins); app.add_systems(PreStartup, (spawn_root, cache_root.after(spawn_root))); app.add_systems(PostStartup, (fix_invalid_children)); @@ -25,13 +27,13 @@ impl Plugin for BigSpaceIntegrationPlugin { // 1) build the Big-Space root fn spawn_root(mut commands: Commands) { - commands.spawn_big_space_default::(|_| {}); + commands.spawn_big_space_default(|_| {}); } // 2) cache the root entity for later use fn cache_root( mut commands: Commands, - roots: Query, Without)>, // top-level grid + roots: Query, Without)>, // top-level grid ) { if let Ok(entity) = roots.get_single() { @@ -42,10 +44,10 @@ fn cache_root( fn fix_invalid_children( mut commands: Commands, - bad: Query, Without>, With)>, + bad: Query, Without, With)>, ) { for e in &bad { - commands.entity(e).insert(GridCell::::ZERO); + commands.entity(e).insert(GridCell::ZERO); } } @@ -61,14 +63,14 @@ pub fn move_by( -pub fn teleport_to( +pub fn teleport_to( e: Entity, target: DVec3, - grids: Grids<'_, '_, P>, - mut q: Query<(&Parent, &mut GridCell

, &mut Transform)>, + grids: Grids<'_, '_>, + mut q: Query<(&ChildOf, &mut GridCell, &mut Transform)>, ) { - let (parent, mut cell, mut tf) = q.get_mut(e).unwrap(); - let grid = grids.parent_grid(parent.get()).unwrap(); + let (child_of, mut cell, mut tf) = q.get_mut(e).unwrap(); + let grid = grids.parent_grid(child_of.parent()).unwrap(); let (new_cell, local) = grid.translation_to_grid(target); diff --git a/client/src/plugins/environment/environment_plugin.rs b/client/src/plugins/environment/environment_plugin.rs index f6ae4e7..c28841c 100644 --- a/client/src/plugins/environment/environment_plugin.rs +++ b/client/src/plugins/environment/environment_plugin.rs @@ -64,10 +64,12 @@ fn log_mesh_count(meshes: Res>, time: Res