Made handle_jump use it's own jump_modifier stat

This commit is contained in:
HEIEnthusiast 2023-11-27 16:15:29 -04:00
parent bb2adfb2e5
commit b6c67a7f41
2 changed files with 3 additions and 1 deletions

View File

@ -58,6 +58,7 @@ pub struct Stats {
pub heal_multiplier: f32,
pub max_health_modifiers: StatsModifier,
pub move_speed_modifier: f32,
pub jump_modifier: f32,
pub attack_speed_modifier: f32,
pub friction_modifier: f32,
pub max_energy_modifiers: StatsModifier,
@ -85,6 +86,7 @@ impl Stats {
heal_multiplier: 1.0,
max_health_modifiers: StatsModifier::default(),
move_speed_modifier: 1.0,
jump_modifier: 1.0,
attack_speed_modifier: 1.0,
friction_modifier: 1.0,
max_energy_modifiers: StatsModifier::default(),

View File

@ -1190,7 +1190,7 @@ pub fn handle_jump(
data.entity,
strength * impulse / data.mass.0
* data.scale.map_or(1.0, |s| s.0.powf(13.0).powf(0.25))
* data.stats.move_speed_modifier,
* data.stats.jump_modifier,
));
})
.is_some()