move mouse and physics types to common

This commit is contained in:
Quaternions 2024-08-05 13:35:54 -07:00
parent eb99ea3707
commit 0985661e45
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ pub enum Instruction{
Create,
Delete,
Push{
ins:strafesnet_common::instruction::TimedInstruction<crate::physics::PhysicsInputInstruction>,
ins:strafesnet_common::instruction::TimedInstruction<strafesnet_common::physics::Instruction>,
},
}

View File

@ -13,7 +13,7 @@ pub enum WindowInstruction{
//holds thread handles to dispatch to
struct WindowContext<'a>{
manual_mouse_lock:bool,
mouse:crate::physics::MouseState,//std::sync::Arc<std::sync::Mutex<>>
mouse:strafesnet_common::mouse::MouseState,//std::sync::Arc<std::sync::Mutex<>>
screen_size:glam::UVec2,
user_settings:crate::settings::UserSettings,
window:&'a winit::window::Window,
@ -113,7 +113,7 @@ impl WindowContext<'_>{
"z"=>Some(InputInstruction::Zoom(s)),
"r"=>if s{
//mouse needs to be reset since the position is absolute
self.mouse=crate::physics::MouseState::default();
self.mouse=strafesnet_common::mouse::MouseState::default();
Some(InputInstruction::Restart)
}else{None},
"f"=>if s{Some(InputInstruction::PracticeFly)}else{None},
@ -200,7 +200,7 @@ impl<'a> WindowContextSetup<'a>{
let graphics_thread=crate::graphics_worker::new(self.graphics,setup_context.config,setup_context.surface,setup_context.device,setup_context.queue);
WindowContext{
manual_mouse_lock:false,
mouse:crate::physics::MouseState::default(),
mouse:strafesnet_common::mouse::MouseState::default(),
//make sure to update this!!!!!
screen_size,
user_settings:self.user_settings,