Swapped bool values, only_roll changed to attack_interrupts.

This commit is contained in:
Sam 2020-11-20 11:54:56 -06:00
parent 987df30dc4
commit c00720fb44
12 changed files with 13 additions and 13 deletions

View File

@ -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(_) => {},
_ => {

View File

@ -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(_) => {},
_ => {

View File

@ -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(_) => {},
_ => {

View File

@ -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(_) => {},
_ => {

View File

@ -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(_) => {},
_ => {

View File

@ -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));
}

View File

@ -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(_) => {},
_ => {

View File

@ -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(_) => {},
_ => {

View File

@ -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(_) => {},
_ => {

View File

@ -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(_) => {},
_ => {

View File

@ -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(_) => {},
_ => {

View File

@ -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);