Compare commits

...

1 Commits

Author SHA1 Message Date
ed69cf2297 plumb Run into graphics 2024-08-21 14:21:02 -07:00
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),
} }
} }