From 47bf9f1af3d5037b4a9c7a2397019d75ffa1ce46 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 10 Jan 2025 22:08:54 -0800 Subject: [PATCH] pain --- strafe-client/src/mouse_interpolator.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/strafe-client/src/mouse_interpolator.rs b/strafe-client/src/mouse_interpolator.rs index 420ba30..4957ac9 100644 --- a/strafe-client/src/mouse_interpolator.rs +++ b/strafe-client/src/mouse_interpolator.rs @@ -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