Remove excess code

This commit is contained in:
Adam Whitehurst 2020-03-21 10:32:32 -07:00
parent 180ec89060
commit 3ae2b8de2e
2 changed files with 4 additions and 15 deletions

View File

@ -138,16 +138,6 @@ pub fn handle_unwield(data: &JoinData, update: &mut StateUpdate) {
}
}
/// Checks that player can Swap and updates Loadout
pub fn handle_swap_loadout(data: &JoinData, update: &mut StateUpdate) {
if let CharacterState::Wielding { .. } = update.character {
if data.inputs.swap_loadout.is_pressed() {
//TODO
println!("YAH NAH");
}
}
}
/// Checks that player can glide and updates `CharacterState` if so
pub fn handle_glide(data: &JoinData, update: &mut StateUpdate) {
if let CharacterState::Idle { .. } | CharacterState::Wielding { .. } = update.character {

View File

@ -319,11 +319,10 @@ impl PlayState for SessionState {
Event::InputUpdate(GameInput::WallLeap, state) => {
self.inputs.wall_leap.set_state(state)
},
// Event::InputUpdate(GameInput::ToggleWield, state) => {
// self.inputs.toggle_wield.set_state(state);
// },
Event::InputUpdate(GameInput::ToggleWield, state)
| Event::InputUpdate(GameInput::SwapLoadout, state) => {
Event::InputUpdate(GameInput::ToggleWield, state) => {
self.inputs.toggle_wield.set_state(state);
},
Event::InputUpdate(GameInput::SwapLoadout, state) => {
let mut client = self.client.borrow_mut();
let entity = client.entity();
let loadout = client