diff --git a/common/src/comp/stats.rs b/common/src/comp/stats.rs index a3c6ee49d1..f5a7494bb2 100644 --- a/common/src/comp/stats.rs +++ b/common/src/comp/stats.rs @@ -1,7 +1,7 @@ use crate::state::Time; use specs::{Component, FlaggedStorage, NullStorage, VecStorage}; -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, Serialize, Deserialize)] pub struct Health { pub current: u32, pub maximum: u32, @@ -15,7 +15,7 @@ impl Health { } } -#[derive(Clone, Debug, Serialize, Deserialize)] +#[derive(Clone, Copy, Debug, Serialize, Deserialize)] pub struct Stats { pub hp: Health, pub xp: u32, diff --git a/voxygen/src/hud/mod.rs b/voxygen/src/hud/mod.rs index 4102a718fe..fff60328f6 100644 --- a/voxygen/src/hud/mod.rs +++ b/voxygen/src/hud/mod.rs @@ -694,7 +694,7 @@ impl Hud { self.show.debug = !self.show.debug; true } - Key::ToggleIngameUi => { + GameInput::ToggleIngameUi => { self.show.ingame = !self.show.ingame; true } diff --git a/voxygen/src/scene/figure.rs b/voxygen/src/scene/figure.rs index 75e3633d35..e6ccc2707c 100644 --- a/voxygen/src/scene/figure.rs +++ b/voxygen/src/scene/figure.rs @@ -397,7 +397,7 @@ impl FigureMgr { comp::Animation::Attack => character::AttackAnimation::update_skeleton( state.skeleton_mut(), time, - animation_history.time, + animation_info.time, ), comp::Animation::Gliding => { character::GlidingAnimation::update_skeleton( diff --git a/voxygen/src/session.rs b/voxygen/src/session.rs index ca04c4f4d0..5da08e22bd 100644 --- a/voxygen/src/session.rs +++ b/voxygen/src/session.rs @@ -125,14 +125,12 @@ impl PlayState for SessionState { Event::Close => { return PlayStateResult::Shutdown; } - // Attack key pressed Event::InputUpdate(GameInput::Attack, true) => { self.client.borrow_mut().attack(); self.client.borrow_mut().respawn(); } Event::InputUpdate(GameInput::Jump, true) => { self.client.borrow_mut().jump(); - } Event::InputUpdate(GameInput::MoveForward, state) => self.key_state.up = state, Event::InputUpdate(GameInput::MoveBack, state) => self.key_state.down = state, Event::InputUpdate(GameInput::MoveLeft, state) => self.key_state.left = state, diff --git a/voxygen/src/settings.rs b/voxygen/src/settings.rs index 14d625601d..a1aa91557c 100644 --- a/voxygen/src/settings.rs +++ b/voxygen/src/settings.rs @@ -41,7 +41,7 @@ pub struct ControlSettings { pub toggle_debug: KeyMouse, pub fullscreen: KeyMouse, pub screenshot: KeyMouse, - pub toggle_ingame_ui: VirtualKeyCode, + pub toggle_ingame_ui: KeyMouse, pub pan_sensitivity: f32, pub zoom_sensitivity: f32, pub attack: KeyMouse, @@ -100,7 +100,7 @@ impl Default for Settings { toggle_debug: KeyMouse::Key(VirtualKeyCode::F3), fullscreen: KeyMouse::Key(VirtualKeyCode::F11), screenshot: KeyMouse::Key(VirtualKeyCode::F4), - toggle_ingame_ui: VirtualKeyCode::F6, + toggle_ingame_ui: KeyMouse::Key(VirtualKeyCode::F6), pan_sensitivity: 1.0, zoom_sensitivity: 1.0, attack: KeyMouse::Mouse(MouseButton::Left), diff --git a/voxygen/src/window.rs b/voxygen/src/window.rs index aa01158954..22d119b80a 100644 --- a/voxygen/src/window.rs +++ b/voxygen/src/window.rs @@ -113,18 +113,12 @@ impl Window { key_map.insert(settings.controls.map, GameInput::Map); key_map.insert(settings.controls.bag, GameInput::Bag); key_map.insert(settings.controls.quest_log, GameInput::QuestLog); - key_map.insert( - settings.controls.character_window, - GameInput::CharacterWindow, - ); + key_map.insert(settings.controls.character_window, GameInput::CharacterWindow); key_map.insert(settings.controls.social, GameInput::Social); key_map.insert(settings.controls.spellbook, GameInput::Spellbook); key_map.insert(settings.controls.settings, GameInput::Settings); key_map.insert(settings.controls.help, GameInput::Help); - key_map.insert( - settings.controls.toggle_interface, - GameInput::ToggleInterface, - ); + key_map.insert(settings.controls.toggle_interface, GameInput::ToggleInterface); key_map.insert(settings.controls.toggle_debug, GameInput::ToggleDebug); key_map.insert(settings.controls.fullscreen, GameInput::Fullscreen); key_map.insert(settings.controls.screenshot, GameInput::Screenshot);