This commit is contained in:
Quaternions 2025-01-10 22:08:54 -08:00
parent 719c702b95
commit 47bf9f1af3

View File

@ -62,9 +62,14 @@ impl MouseInterpolator{
// if there is zero instruction buffered, it means the mouse is not moving
}
fn is_first_ready(&self)->bool{
// if the last instruction is a mouse instruction
// if the last instruction is a ReplaceMouse instruction
matches!(self.physics_timeline.back(),Some(TimedInstruction{
instruction:PhysicsInputInstruction::ReplaceMouse(_,_),
..
}))
// or if the last instruction is a SetNextMouse instruction
// and there is 2 or more instructions
1<self.physics_timeline.len()&&matches!(self.physics_timeline.back(),Some(TimedInstruction{
||1<self.physics_timeline.len()&&matches!(self.physics_timeline.back(),Some(TimedInstruction{
instruction:PhysicsInputInstruction::SetNextMouse(_),
..
}))