From c00720fb4472082b3f53c5b084d8644ec4c77c96 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 20 Nov 2020 11:54:56 -0600 Subject: [PATCH] Swapped bool values, only_roll changed to attack_interrupts. --- common/src/states/basic_beam.rs | 2 +- common/src/states/basic_melee.rs | 2 +- common/src/states/basic_ranged.rs | 2 +- common/src/states/charged_melee.rs | 2 +- common/src/states/charged_ranged.rs | 2 +- common/src/states/combo_melee.rs | 2 +- common/src/states/dash_melee.rs | 2 +- common/src/states/leap_melee.rs | 2 +- common/src/states/repeater_ranged.rs | 2 +- common/src/states/shockwave.rs | 2 +- common/src/states/spin_melee.rs | 2 +- common/src/states/utils.rs | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/common/src/states/basic_beam.rs b/common/src/states/basic_beam.rs index a6bfbd6532..1a0d7bbcb4 100644 --- a/common/src/states/basic_beam.rs +++ b/common/src/states/basic_beam.rs @@ -64,7 +64,7 @@ impl CharacterBehavior for Data { handle_move(data, &mut update, 0.4); handle_jump(data, &mut update); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, true); + handle_interrupt(data, &mut update, false); match update.character { CharacterState::BasicBeam(_) => {}, _ => { diff --git a/common/src/states/basic_melee.rs b/common/src/states/basic_melee.rs index 57248ff7f7..7a8204ee32 100644 --- a/common/src/states/basic_melee.rs +++ b/common/src/states/basic_melee.rs @@ -48,7 +48,7 @@ impl CharacterBehavior for Data { handle_move(data, &mut update, 0.7); handle_jump(data, &mut update); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, true); + handle_interrupt(data, &mut update, false); match update.character { CharacterState::BasicMelee(_) => {}, _ => { diff --git a/common/src/states/basic_ranged.rs b/common/src/states/basic_ranged.rs index 64a1ac5125..3cbf1ac966 100644 --- a/common/src/states/basic_ranged.rs +++ b/common/src/states/basic_ranged.rs @@ -49,7 +49,7 @@ impl CharacterBehavior for Data { handle_move(data, &mut update, 0.3); handle_jump(data, &mut update); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, true); + handle_interrupt(data, &mut update, false); match update.character { CharacterState::BasicRanged(_) => {}, _ => { diff --git a/common/src/states/charged_melee.rs b/common/src/states/charged_melee.rs index 4895971a2c..6c91a317af 100644 --- a/common/src/states/charged_melee.rs +++ b/common/src/states/charged_melee.rs @@ -60,7 +60,7 @@ impl CharacterBehavior for Data { handle_move(data, &mut update, 0.7); handle_jump(data, &mut update); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, true); + handle_interrupt(data, &mut update, false); match update.character { CharacterState::ChargedMelee(_) => {}, _ => { diff --git a/common/src/states/charged_ranged.rs b/common/src/states/charged_ranged.rs index 23977db133..7266029133 100644 --- a/common/src/states/charged_ranged.rs +++ b/common/src/states/charged_ranged.rs @@ -64,7 +64,7 @@ impl CharacterBehavior for Data { handle_move(data, &mut update, 0.3); handle_jump(data, &mut update); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, true); + handle_interrupt(data, &mut update, false); match update.character { CharacterState::ChargedRanged(_) => {}, _ => { diff --git a/common/src/states/combo_melee.rs b/common/src/states/combo_melee.rs index 9ca71484b8..dfc3022c47 100644 --- a/common/src/states/combo_melee.rs +++ b/common/src/states/combo_melee.rs @@ -111,7 +111,7 @@ impl CharacterBehavior for Data { handle_orientation(data, &mut update, 1.0); handle_move(data, &mut update, 0.3); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, !self.static_data.is_interruptible); + handle_interrupt(data, &mut update, self.static_data.is_interruptible); if let CharacterState::Roll(roll) = &mut update.character { roll.was_combo = Some((self.stage, self.combo)); } diff --git a/common/src/states/dash_melee.rs b/common/src/states/dash_melee.rs index c0b4769714..b62854e2a4 100644 --- a/common/src/states/dash_melee.rs +++ b/common/src/states/dash_melee.rs @@ -67,7 +67,7 @@ impl CharacterBehavior for Data { handle_orientation(data, &mut update, 1.0); handle_move(data, &mut update, 0.1); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, !self.static_data.is_interruptible); + handle_interrupt(data, &mut update, self.static_data.is_interruptible); match update.character { CharacterState::DashMelee(_) => {}, _ => { diff --git a/common/src/states/leap_melee.rs b/common/src/states/leap_melee.rs index 866261035b..b49f49c342 100644 --- a/common/src/states/leap_melee.rs +++ b/common/src/states/leap_melee.rs @@ -54,7 +54,7 @@ impl CharacterBehavior for Data { handle_move(data, &mut update, 0.3); handle_jump(data, &mut update); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, true); + handle_interrupt(data, &mut update, false); match update.character { CharacterState::LeapMelee(_) => {}, _ => { diff --git a/common/src/states/repeater_ranged.rs b/common/src/states/repeater_ranged.rs index 4aa26274aa..48a50d2627 100644 --- a/common/src/states/repeater_ranged.rs +++ b/common/src/states/repeater_ranged.rs @@ -52,7 +52,7 @@ impl CharacterBehavior for Data { handle_move(data, &mut update, 1.0); handle_jump(data, &mut update); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, true); + handle_interrupt(data, &mut update, false); match update.character { CharacterState::RepeaterRanged(_) => {}, _ => { diff --git a/common/src/states/shockwave.rs b/common/src/states/shockwave.rs index b8c7e986d9..62a019ac66 100644 --- a/common/src/states/shockwave.rs +++ b/common/src/states/shockwave.rs @@ -54,7 +54,7 @@ impl CharacterBehavior for Data { handle_move(data, &mut update, self.static_data.move_efficiency); if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, true); + handle_interrupt(data, &mut update, false); match update.character { CharacterState::Shockwave(_) => {}, _ => { diff --git a/common/src/states/spin_melee.rs b/common/src/states/spin_melee.rs index 784ecfbd30..ebc1b8bb40 100644 --- a/common/src/states/spin_melee.rs +++ b/common/src/states/spin_melee.rs @@ -72,7 +72,7 @@ impl CharacterBehavior for Data { } if !ability_key_is_pressed(data, self.static_data.ability_key) { - handle_interrupt(data, &mut update, !self.static_data.is_interruptible); + handle_interrupt(data, &mut update, self.static_data.is_interruptible); match update.character { CharacterState::SpinMelee(_) => {}, _ => { diff --git a/common/src/states/utils.rs b/common/src/states/utils.rs index 979cee9f70..a2f5aec505 100644 --- a/common/src/states/utils.rs +++ b/common/src/states/utils.rs @@ -420,8 +420,8 @@ pub fn unwrap_tool_data<'a>(data: &'a JoinData) -> Option<&'a Tool> { } } -pub fn handle_interrupt(data: &JoinData, update: &mut StateUpdate, only_dodge: bool) { - if !only_dodge { +pub fn handle_interrupt(data: &JoinData, update: &mut StateUpdate, attacks_interrupt: bool) { + if attacks_interrupt { handle_ability1_input(data, update); handle_ability2_input(data, update); handle_ability3_input(data, update);