plumb Run into graphics

This commit is contained in:
Quaternions 2024-08-20 16:46:02 -07:00
parent b2a84e3be1
commit ed69cf2297
3 changed files with 5 additions and 0 deletions

View File

@ -102,6 +102,7 @@ pub struct FrameState{
pub body:crate::physics::Body, pub body:crate::physics::Body,
pub camera:crate::physics::PhysicsCamera, pub camera:crate::physics::PhysicsCamera,
pub time:integer::Time, pub time:integer::Time,
pub run:strafesnet_common::run::Run,
} }
pub struct GraphicsState{ pub struct GraphicsState{

View File

@ -1046,6 +1046,9 @@ impl PhysicsContext{
pub const fn get_next_mouse(&self)->&MouseState{ pub const fn get_next_mouse(&self)->&MouseState{
self.state.input_state.get_next_mouse() 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 /// use with caution, this is the only non-instruction way to mess with physics
pub fn generate_models(&mut self,map:&map::CompleteMap){ pub fn generate_models(&mut self,map:&map::CompleteMap){
self.state.clear(); self.state.clear();

View File

@ -184,6 +184,7 @@ impl MouseInterpolator{
crate::graphics::FrameState{ crate::graphics::FrameState{
body:self.physics.camera_body(), body:self.physics.camera_body(),
camera:self.physics.camera(), camera:self.physics.camera(),
run:self.physics.run(),
time:self.timer.time(time), time:self.timer.time(time),
} }
} }