diff --git a/strafe-client/src/mouse_interpolator.rs b/strafe-client/src/mouse_interpolator.rs index 3baa4a6..0c9d6c8 100644 --- a/strafe-client/src/mouse_interpolator.rs +++ b/strafe-client/src/mouse_interpolator.rs @@ -90,8 +90,17 @@ impl MouseInterpolator{ let buffer_state=core::mem::replace(&mut self.buffer_state,BufferState::Unbuffered); match buffer_state{ BufferState::Unbuffered=>(), - BufferState::Initializing(_time,mouse_state) - |BufferState::Buffered(_time,mouse_state)=>{ + BufferState::Initializing(_time,mouse_state)=>{ + // only a single mouse move was sent in 10ms, this is very much an edge case! + self.push_mouse_and_flush_buffer(TimedInstruction{ + time:mouse_state.time, + instruction:MouseInstruction::ReplaceMouse{ + m1:MouseState{pos:mouse_state.pos,time}, + m0:mouse_state, + }, + }); + } + BufferState::Buffered(_time,mouse_state)=>{ // convert to BufferState::Unbuffered // use the first instruction which should be a mouse instruction // to push a ReplaceMouse instruction