mirror of
https://gitlab.com/veloren/veloren
synced 2026-08-16 16:26:07 -04:00
Minor Charge Tweak
This commit is contained in:
parent
1292019541
commit
85b8d21cc7
2 changed files with 3 additions and 3 deletions
|
|
@ -116,7 +116,7 @@ impl CharacterBehavior for Data {
|
|||
},
|
||||
StageSection::Charge => {
|
||||
if input_is_pressed(data, self.static_data.ability_info.input)
|
||||
&& update.energy.current() >= 1.0
|
||||
&& (update.energy.current() >= self.static_data.energy_drain * data.dt.0)
|
||||
&& self.timer < self.static_data.charge_duration
|
||||
{
|
||||
let charge = (self.timer.as_secs_f32()
|
||||
|
|
@ -134,7 +134,7 @@ impl CharacterBehavior for Data {
|
|||
.energy
|
||||
.change_by(-self.static_data.energy_drain * data.dt.0);
|
||||
} else if input_is_pressed(data, self.static_data.ability_info.input)
|
||||
&& update.energy.current() >= 1.0
|
||||
&& (update.energy.current() >= self.static_data.energy_drain * data.dt.0)
|
||||
{
|
||||
// Maintains charge
|
||||
if let CharacterState::ChargedMelee(c) = &mut update.character {
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ impl CharacterBehavior for Data {
|
|||
},
|
||||
StageSection::Charge => {
|
||||
if (!input_is_pressed(data, self.static_data.ability_info.input)
|
||||
|| update.energy.current() < 1.0)
|
||||
|| (update.energy.current() <= self.static_data.energy_drain * data.dt.0))
|
||||
&& !self.exhausted
|
||||
{
|
||||
let charge_frac = self.charge_frac();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue