diff --git a/common/src/states/basic_ranged.rs b/common/src/states/basic_ranged.rs index 81f1485baf..3652c40e1e 100644 --- a/common/src/states/basic_ranged.rs +++ b/common/src/states/basic_ranged.rs @@ -28,7 +28,7 @@ impl CharacterBehavior for Data { fn behavior(&self, data: &JoinData) -> StateUpdate { let mut update = StateUpdate::from(data); - handle_move(data, &mut update, 0.2); + handle_move(data, &mut update, 0.3); handle_jump(data, &mut update); if self.prepare_timer < self.prepare_duration diff --git a/voxygen/src/menu/char_selection/mod.rs b/voxygen/src/menu/char_selection/mod.rs index a8c767c9fc..3ca05435d4 100644 --- a/voxygen/src/menu/char_selection/mod.rs +++ b/voxygen/src/menu/char_selection/mod.rs @@ -117,7 +117,7 @@ impl PlayState for CharSelectionState { global_state.window.renderer_mut(), self.client.borrow().get_tick(), humanoid_body.clone(), - loadout, + loadout.as_ref(), ); // Draw the UI to the screen. diff --git a/voxygen/src/menu/char_selection/ui.rs b/voxygen/src/menu/char_selection/ui.rs index a1ff30d842..2c8d7ac104 100644 --- a/voxygen/src/menu/char_selection/ui.rs +++ b/voxygen/src/menu/char_selection/ui.rs @@ -333,9 +333,31 @@ impl CharSelectionUi { } } - pub fn get_loadout(&mut self) -> Option<&comp::Loadout> { + pub fn get_loadout(&mut self) -> Option { match &mut self.mode { - Mode::Select(_) => None, + Mode::Select(characterdata) => { + let loadout = comp::Loadout { + active_item: characterdata + .as_ref() + .and_then(|d| d.tool.as_ref()) + .map(|tool| comp::ItemConfig { + item: (*load_expect::(&tool)).clone(), + ability1: None, + ability2: None, + ability3: None, + block_ability: None, + dodge_ability: None, + }), + second_item: None, + shoulder: None, + chest: None, + belt: None, + hand: None, + pants: None, + foot: None, + }; + Some(loadout) + }, Mode::Create { loadout, tool, .. } => { loadout.active_item = tool.map(|tool| comp::ItemConfig { item: (*load_expect::(tool)).clone(), @@ -345,7 +367,7 @@ impl CharSelectionUi { block_ability: None, dodge_ability: None, }); - Some(loadout) + Some(loadout.clone()) }, } }