From ed69cf2297f2b846602805ba3dd94849567440cc Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 20 Aug 2024 16:46:02 -0700 Subject: [PATCH] plumb Run into graphics --- src/graphics.rs | 1 + src/physics.rs | 3 +++ src/physics_worker.rs | 1 + 3 files changed, 5 insertions(+) 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), } }