mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Fixes
Former-commit-id: 0bbbcf187248dd192e7e9a226bcf5b496437d578
This commit is contained in:
parent
4696cd2c8b
commit
746e286b5b
@ -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,
|
||||
|
@ -694,7 +694,7 @@ impl Hud {
|
||||
self.show.debug = !self.show.debug;
|
||||
true
|
||||
}
|
||||
Key::ToggleIngameUi => {
|
||||
GameInput::ToggleIngameUi => {
|
||||
self.show.ingame = !self.show.ingame;
|
||||
true
|
||||
}
|
||||
|
@ -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(
|
||||
|
@ -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,
|
||||
|
@ -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),
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user