From 0be798b6abba0eb09f73992923fe01a602495e59 Mon Sep 17 00:00:00 2001 From: Rhys Lloyd Date: Thu, 19 Feb 2026 08:46:16 -0800 Subject: [PATCH] float sucks --- lib/src/head.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/head.rs b/lib/src/head.rs index 2c40186..b14a4d2 100644 --- a/lib/src/head.rs +++ b/lib/src/head.rs @@ -33,7 +33,7 @@ impl PlaybackHead{ } pub fn advance_time(&mut self,bot:&crate::bot::CompleteBot,time:SessionTime){ let simulation_time=self.timer.time(time); - let mut time_float=simulation_time.get() as f64/PhysicsTime::ONE_SECOND.get() as f64+bot.offset()+self.offset; + let mut time_float=simulation_time.get() as f64/PhysicsTime::ONE_SECOND.get() as f64+self.offset+bot.offset(); loop{ match bot.timelines().output_events.get(self.event_id+1){ Some(next_event)=>{ @@ -65,7 +65,7 @@ impl PlaybackHead{ let t0=event0.time; let t1=event1.time; let time_float=time.get() as f64/PhysicsTime::ONE_SECOND.get() as f64; - let t=((time_float+bot.offset()+self.offset-t0)/(t1-t0)) as f32; + let t=((time_float+self.offset+bot.offset()-t0)/(t1-t0)) as f32; let p=p0.lerp(p1,t); // let v=v0.lerp(v1,t); // let a=a0.lerp(a1,t);