Fixed roll not returning to wield if initiated from a wielded character state.

This commit is contained in:
Sam 2023-01-28 15:15:35 -05:00
parent f866bc053c
commit 9c43c016a3

View File

@ -1105,22 +1105,22 @@ fn handle_ability(
}
}
update.used_inputs.push(input);
if let CharacterState::Roll(roll) = &mut update.character {
if let CharacterState::ComboMelee(c) = data.character {
roll.was_combo = Some((c.static_data.ability_info.input, c.stage));
roll.was_wielded = true;
} else {
if data.character.is_wield() || data.character.was_wielded() {
roll.was_wielded = true;
}
if data.character.is_stealthy() {
roll.is_sneaking = true;
}
}
}
return true;
}
}
if let CharacterState::Roll(roll) = &mut update.character {
if let CharacterState::ComboMelee(c) = data.character {
roll.was_combo = Some((c.static_data.ability_info.input, c.stage));
roll.was_wielded = true;
} else {
if data.character.is_wield() {
roll.was_wielded = true;
}
if data.character.is_stealthy() {
roll.is_sneaking = true;
}
}
}
false
}