diff --git a/client/src/lib.rs b/client/src/lib.rs index f53dda3672..7b3b33ab3c 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -237,8 +237,9 @@ pub struct Client { local_command_gen: CommandGenerator, next_control: Controller, - inter_tick_rewind_time: Option, - _rewind_fluctuation_budget: f64, + inter_tick_reverted_time: Option, + inter_tick_time_syncs: usize, + rewind_fluctuation_budget: f64, network: Option, participant: Option, @@ -723,8 +724,9 @@ impl Client { local_command_gen: CommandGenerator::default(), next_control: Controller::default(), - inter_tick_rewind_time: None, - _rewind_fluctuation_budget: 0.0, + inter_tick_reverted_time: None, + inter_tick_time_syncs: 0, + rewind_fluctuation_budget: 0.0, network: Some(network), participant: Some(participant), @@ -1703,7 +1705,8 @@ impl Client { // 1) Build up a list of events for this frame, to be passed to the frontend. let mut frontend_events = Vec::new(); - self.inter_tick_rewind_time = None; + self.inter_tick_reverted_time = None; + self.inter_tick_time_syncs = 0; // Prepare for new events { @@ -1734,10 +1737,16 @@ impl Client { frontend_events.append(&mut self.handle_new_messages()?); // Simulate Ahead - common_base::plot!("recived_time_sync", 0.0); - if let Some(rewind_time) = self.inter_tick_rewind_time { - common_base::plot!("recived_time_sync", 1.0); - let _time = self.state.ecs().read_resource::