mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Swapped bool values, only_roll changed to attack_interrupts.
This commit is contained in:
parent
987df30dc4
commit
c00720fb44
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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));
|
||||
}
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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(_) => {},
|
||||
_ => {
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user