diff --git a/strafe-client/src/mouse_interpolator.rs b/strafe-client/src/mouse_interpolator.rs index b447990..233355d 100644 --- a/strafe-client/src/mouse_interpolator.rs +++ b/strafe-client/src/mouse_interpolator.rs @@ -122,7 +122,12 @@ impl MouseInterpolator{ // case 3: stop // a mouse event is buffered, but no mouse events have transpired within 10ms - // push buffered mouse instruction and flush buffer to output + // This is a potential source of non-determinism + // since the timestamp from the first instruction after timeout is used + // and not the precise timeout timestamp. + // This can be fixed by polling the mouse interpolator for timeout externally + // and then conditionally running the timeout right before every instruction. + // Essentially moving this if statement outside where the timer is accessible. if self.get_mouse_timedout_at(ins.time).is_some(){ // push buffered mouse instruction and flush buffer to output self.timeout_mouse(ins.instruction.time);