From 8ffbca204b01979235855f6eb7c3754e8a393985 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Wed, 21 Feb 2024 02:31:50 -0800 Subject: [PATCH] wishful thinking --- src/physics.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/physics.rs b/src/physics.rs index c5d78bb..1da6608 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -103,7 +103,7 @@ impl InputState{ &self.next_mouse } fn set_next_mouse(&mut self,next_mouse:MouseState){ - (self.next_mouse,self.mouse)=(next_mouse,self.next_mouse); + (self.next_mouse,self.mouse)=(next_mouse,self.next_mouse.clone()); } fn replace_mouse(&mut self,mouse:MouseState,next_mouse:MouseState){ (self.next_mouse,self.mouse)=(next_mouse,mouse); @@ -111,13 +111,13 @@ impl InputState{ fn set_control(&mut self,control:Controls,state:bool){ self.controls.set(control,state) } - const fn time_delta(&self)->Time{ + fn time_delta(&self)->Time{ self.next_mouse.time-self.mouse.time } - const fn mouse_delta(&self)->glam::IVec2{ + fn mouse_delta(&self)->glam::IVec2{ self.next_mouse.pos-self.mouse.pos } - const fn lerp_delta(&self,time:Time)->glam::IVec2{ + fn lerp_delta(&self,time:Time)->glam::IVec2{ //these are deltas let dm=self.mouse_delta().as_i64vec2(); let t=(time-self.mouse.time).nanos();