From b8714fbbc803fbfbcb94dcb15452233e5ae675ba Mon Sep 17 00:00:00 2001 From: Quaternions Date: Thu, 29 Aug 2024 17:23:13 -0700 Subject: [PATCH] wip gameplay_style --- src/gameplay_style.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameplay_style.rs b/src/gameplay_style.rs index c415e51..329e2db 100644 --- a/src/gameplay_style.rs +++ b/src/gameplay_style.rs @@ -1,6 +1,6 @@ const VALVE_SCALE:Planar64=Planar64::raw(1<<28);// 1/16 -use crate::integer::{Time,Ratio64,Planar64,Planar64Vec3}; +use crate::integer::{Time,Ratio64,Planar64,Planar64Vec3,WideMul,WideDot}; use crate::controls_bitflag::Controls; #[derive(Clone,Debug)] @@ -72,7 +72,7 @@ impl JumpImpulse{ let g=gravity.wide_length(); let v_g=gravity.wide_dot(velocity); //do it backwards - velocity-gravity.with_length(((v_g*v_g+g*height.widen()*2).sqrt()+v_g)/g) + velocity-gravity.with_length(((v_g.wide_mul(v_g)+g.wide_mul(height).wide_mul(2)).sqrt()+v_g).ratio(g)) }, &JumpImpulse::Linear(jump_speed)=>velocity+jump_dir.with_length(jump_speed), &JumpImpulse::Energy(energy)=>{