Build production-ready editor authoring workflows
CI / Format, lint, test, build (push) Waiting to run

This commit is contained in:
Rbanh committed 2026-07-11 12:41:04 -04:00
1 parent cc1fa6ea3b
commit 0553a85220
163 files changed
+34547 -1565

No files matched your search

+5 -4
View File
@@ -7,7 +7,6 @@ use protocol::PlayerInputIntent;
use sim::{Crouching, Grounded, JumpState, Player, PlayerVelocity};
use crate::camera::EditorCamera;
use crate::scene_io::SceneIo;
/// Editor/game mode. `Playing` runs the real game sim; use [`PlayPossession`] for camera control.
#[derive(States, Debug, Clone, Copy, PartialEq, Eq, Hash, Default)]
@@ -252,6 +251,8 @@ fn sync_play_input_focus(
}
fn enter_play_mode(world: &mut World) {
// Edit-mode scrubbing must not override authored controller playback in PIE.
game::animation::stop_animation_preview(world);
let snapshot = snapshot_player_sim(world);
world.resource_mut::<PlayModeSnapshot>().player = Some(snapshot);
}
@@ -260,9 +261,9 @@ fn exit_play_mode(world: &mut World) {
if let Some(snapshot) = world.resource_mut::<PlayModeSnapshot>().player.take() {
restore_player_sim(world, &snapshot);
}
if let Some(mut scene_io) = world.get_resource_mut::<SceneIo>() {
scene_io.dirty = true;
}
world.resource_mut::<SimEnabled>().0 = false;
game::animation::reset_authored_animation_runtime(world);
game::audio::reset_authored_audio_runtime(world);
}
fn snapshot_player_sim(world: &mut World) -> PlayerSimSnapshot {