mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'nixda/Energy_regeneration' into 'master'
#1694 Faster Energy Regeneration-acceleration while sitting See merge request veloren/veloren!3768
This commit is contained in:
commit
105dbc77ee
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Added
|
||||
- Command to toggle experimental shaders.
|
||||
- Faster Energy Regeneration while sitting.
|
||||
|
||||
### Changed
|
||||
- Bats move slower and use a simple proportional controller to maintain altitude
|
||||
|
@ -165,7 +165,14 @@ impl<'a> System<'a> for Sys {
|
||||
if res {
|
||||
let energy = &mut *energy;
|
||||
energy.change_by(energy.regen_rate * dt);
|
||||
energy.regen_rate = (energy.regen_rate + ENERGY_REGEN_ACCEL * dt).min(10.0);
|
||||
if matches!(character_state, CharacterState::Sit) {
|
||||
// Higher Energy-regeneration while sitting
|
||||
energy.regen_rate =
|
||||
(energy.regen_rate + ENERGY_REGEN_ACCEL * dt * 1.5).min(25.0);
|
||||
} else {
|
||||
energy.regen_rate =
|
||||
(energy.regen_rate + ENERGY_REGEN_ACCEL * dt).min(10.0);
|
||||
}
|
||||
}
|
||||
|
||||
let res_poise = { poise.current() < poise.maximum() };
|
||||
|
Loading…
Reference in New Issue
Block a user