Buff swim thrust for humans reduce gains from skillpoints

This is intended to give a swim speed of 4.7 m/s when unskilled, and 7.2 when skilled
However, this turns out to be horrifically fps-dependant, both after this branch and in master. Needs further research into fixes
This commit tunes it for 60 fps
This commit is contained in:
Treeco 2021-08-07 08:26:52 +01:00
parent 2fc62bfe7f
commit a48fa0f349
2 changed files with 3 additions and 3 deletions

View File

@ -576,7 +576,7 @@ pub enum SwimSkill {
impl Boost for SwimSkill { impl Boost for SwimSkill {
fn boost(self) -> BoostValue { fn boost(self) -> BoostValue {
match self { match self {
Self::Speed => 40.into(), Self::Speed => 25.into(),
} }
} }
} }

View File

@ -184,7 +184,7 @@ impl Body {
Body::FishMedium(_) => Some(50.0 * self.mass().0), Body::FishMedium(_) => Some(50.0 * self.mass().0),
Body::FishSmall(_) => Some(50.0 * self.mass().0), Body::FishSmall(_) => Some(50.0 * self.mass().0),
Body::Dragon(_) => Some(200.0 * self.mass().0), Body::Dragon(_) => Some(200.0 * self.mass().0),
Body::Humanoid(_) => Some(200.0 * self.mass().0), Body::Humanoid(_) => Some(2500.0 * self.mass().0),
Body::Theropod(body) => match body.species { Body::Theropod(body) => match body.species {
theropod::Species::Sandraptor theropod::Species::Sandraptor
| theropod::Species::Snowraptor | theropod::Species::Snowraptor
@ -375,7 +375,7 @@ fn swim_move(
let mut water_accel = force / data.mass.0; let mut water_accel = force / data.mass.0;
if let Ok(Some(level)) = data.skill_set.skill_level(Skill::Swim(SwimSkill::Speed)) { if let Ok(Some(level)) = data.skill_set.skill_level(Skill::Swim(SwimSkill::Speed)) {
water_accel *= 1.4_f32.powi(level.into()); water_accel *= 1.25_f32.powi(level.into());
} }
let dir = if data.body.can_strafe() { let dir = if data.body.can_strafe() {