float sucks

This commit is contained in:
2026-02-19 08:46:16 -08:00
parent 4a8c9e05a1
commit 0be798b6ab

View File

@@ -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);