diff --git a/server/src/bridge/types.rs b/server/src/bridge/types.rs index 7dbc94bec..6d3a13f09 100644 --- a/server/src/bridge/types.rs +++ b/server/src/bridge/types.rs @@ -308,6 +308,23 @@ pub enum PlayerAction { ToggleStanceDown, } +impl PlayerAction { + /// Returns true for directional movement commands. + pub fn is_movement(&self) -> bool { + matches!( + self, + PlayerAction::MoveNorth + | PlayerAction::MoveSouth + | PlayerAction::MoveEast + | PlayerAction::MoveWest + | PlayerAction::MoveNortheast + | PlayerAction::MoveNorthwest + | PlayerAction::MoveSoutheast + | PlayerAction::MoveSouthwest + ) + } +} + /// Available interaction verbs for a nearby entity (D-060, #404) /// Embedded in ObserverSnapshot.nearby_interactions. #[derive(Debug, Clone, Serialize, Deserialize)] diff --git a/server/src/simulation/input.rs b/server/src/simulation/input.rs index fb8a34fac..12c0390bc 100644 --- a/server/src/simulation/input.rs +++ b/server/src/simulation/input.rs @@ -92,12 +92,17 @@ pub fn process_player_input( inventory_items: Query<(Entity, &CarriedBy, &ItemName, &InventorySlot)>, ) { let current_tick = time.tick; + let paused = time.paused(); let inputs = input_queue.drain_for_tick(current_tick); // Track whether any movement was attempted this tick (for cooldown tick advance) let mut move_attempted = false; for input in inputs { + // Discard movement while paused (D-052). Pause/Unpause still processed. + if paused && input.action.is_movement() { + continue; + } match input.action { PlayerAction::MoveNorth => { move_attempted = true;