diff --git a/src/graphics.rs b/src/graphics.rs index 2af4816..eef641b 100644 --- a/src/graphics.rs +++ b/src/graphics.rs @@ -102,6 +102,7 @@ pub struct FrameState{ pub body:crate::physics::Body, pub camera:crate::physics::PhysicsCamera, pub time:integer::Time, + pub run:strafesnet_common::run::Run, } pub struct GraphicsState{ diff --git a/src/physics.rs b/src/physics.rs index 4a78d37..deed51b 100644 --- a/src/physics.rs +++ b/src/physics.rs @@ -1046,6 +1046,9 @@ impl PhysicsContext{ pub const fn get_next_mouse(&self)->&MouseState{ self.state.input_state.get_next_mouse() } + pub const fn run(&self)->run::Run{ + self.state.run + } /// use with caution, this is the only non-instruction way to mess with physics pub fn generate_models(&mut self,map:&map::CompleteMap){ self.state.clear(); diff --git a/src/physics_worker.rs b/src/physics_worker.rs index 7744ffa..9bcdb22 100644 --- a/src/physics_worker.rs +++ b/src/physics_worker.rs @@ -184,6 +184,7 @@ impl MouseInterpolator{ crate::graphics::FrameState{ body:self.physics.camera_body(), camera:self.physics.camera(), + run:self.physics.run(), time:self.timer.time(time), } }