Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ noise = "0.9.0"
ctrlc = "3.5.2"
num_cpus = "1.17.0"
typename = "0.1.2"
bevy_ecs = { version = "0.18.1", features = ["multi_threaded", "trace", "debug"], default-features = false }
bevy_math = { version = "0.18.1", features = ["serialize"] }
bevy_ecs = { version = "0.19.0", features = ["multi_threaded", "trace", "debug"], default-features = false }
bevy_math = { version = "0.19.0", features = ["serialize"] }
rustc-hash = "2.1.2"
once_cell = "1.21.4"
mime_guess = "2.0.5"
Expand Down
10 changes: 6 additions & 4 deletions src/game_systems/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use bevy_ecs::prelude::ApplyDeferred;
use bevy_ecs::schedule::{ExecutorKind, IntoScheduleConfigs, Schedule, SystemSet};
use bevy_ecs::schedule::{
IntoScheduleConfigs, MultiThreadedExecutor, Schedule, SingleThreadedExecutor, SystemSet,
};
use std::time::Duration;
use temper_commands::infrastructure::register_command_systems;
use temper_scheduler::{MissedTickBehavior, Scheduler, TimedSchedule, drain_registered_schedules};
Expand Down Expand Up @@ -146,7 +148,7 @@ fn register_world_sync_schedule_systems(schedule: &mut Schedule) {
}

fn register_chunk_gc_schedule_systems(schedule: &mut Schedule) {
schedule.set_executor_kind(ExecutorKind::SingleThreaded);
schedule.set_executor(MultiThreadedExecutor::new());
schedule.configure_sets(
(
ChunkGcPhase::MarkForSave,
Expand Down Expand Up @@ -185,7 +187,7 @@ pub fn register_schedules(
state: GlobalState,
) {
let build_tick = |schedule: &mut Schedule| {
schedule.set_executor_kind(ExecutorKind::SingleThreaded);
schedule.set_executor(MultiThreadedExecutor::new());
register_tick_systems(schedule);
};
let tick_period = Duration::from_secs(1) / state.config.tps;
Expand Down Expand Up @@ -222,7 +224,7 @@ pub fn register_schedules(
.with_behavior(MissedTickBehavior::Skip)
.with_phase(Duration::from_millis(250)),
);
shutdown_schedule.set_executor_kind(ExecutorKind::SingleThreaded);
shutdown_schedule.set_executor(SingleThreadedExecutor::new());

// Force the chunk-saving systems to run before the world flushing and shutdown packet sending systems;
// otherwise we might end up with a world not fully saved if the server is killed at the wrong time during shutdown
Expand Down