mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Combo counter now uses outcomes.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
use common::{
|
||||
comp::{
|
||||
self,
|
||||
skills::{GeneralSkill, Skill},
|
||||
Body, CharacterState, Combo, Energy, EnergyChange, EnergySource, Health, Poise,
|
||||
PoiseChange, PoiseSource, Pos, Stats,
|
||||
@ -18,7 +19,6 @@ use vek::Vec3;
|
||||
|
||||
const ENERGY_REGEN_ACCEL: f32 = 10.0;
|
||||
const POISE_REGEN_ACCEL: f32 = 2.0;
|
||||
const COMBO_DECAY_START: f64 = 5.0; // seconds
|
||||
|
||||
#[derive(SystemData)]
|
||||
pub struct ReadData<'a> {
|
||||
@ -264,7 +264,9 @@ impl<'a> System<'a> for Sys {
|
||||
|
||||
// Decay combo
|
||||
for (_, mut combo) in (&read_data.entities, &mut combos).join() {
|
||||
if combo.counter() > 0 && read_data.time.0 - combo.last_increase() > COMBO_DECAY_START {
|
||||
if combo.counter() > 0
|
||||
&& read_data.time.0 - combo.last_increase() > comp::combo::COMBO_DECAY_START
|
||||
{
|
||||
combo.reset();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user