Enable energy recharge while gliding

This commit is contained in:
Ludvig Böklin 2021-04-25 15:17:51 +02:00
parent c0f43aafb1
commit afef73e90d
3 changed files with 4 additions and 4 deletions

View File

@ -81,6 +81,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Projectiles now generally have a different arc because they no longer have their own gravity modifier
- Increased agent system target search efficiency speeding up the server
- Added more parallelization to terrain serialization and removed extra cloning speeding up the server
- Energy now recharges while gliding
### Removed

View File

@ -17,7 +17,6 @@ pub struct Energy {
pub enum EnergySource {
Ability,
Climb,
Glide,
LevelUp,
HitEnemy,
Regen,

View File

@ -190,6 +190,7 @@ impl<'a> System<'a> for Sys {
| CharacterState::Sit { .. }
| CharacterState::Dance { .. }
| CharacterState::Sneak { .. }
| CharacterState::Glide { .. }
| CharacterState::GlideWield { .. }
| CharacterState::Wielding { .. }
| CharacterState::Equipping { .. }
@ -232,9 +233,8 @@ impl<'a> System<'a> for Sys {
poise.regen_rate = (poise.regen_rate + POISE_REGEN_ACCEL * dt).min(10.0);
}
},
// Ability and glider use does not regen and sets the rate back to zero.
CharacterState::Glide { .. }
| CharacterState::BasicMelee { .. }
// Ability use does not regen and sets the rate back to zero.
CharacterState::BasicMelee { .. }
| CharacterState::DashMelee { .. }
| CharacterState::LeapMelee { .. }
| CharacterState::SpinMelee { .. }