diff --git a/client/src/lib.rs b/client/src/lib.rs index 34ed295b39..21a482e56b 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -1929,9 +1929,9 @@ impl Client { self.tick_terrain()?; // Send a ping to the server once every second - if self.state.get_time() - self.last_server_ping > 1. { + if self.state.get_true_time() - self.last_server_ping > 1. { self.send_msg_err(PingMsg::Ping)?; - self.last_server_ping = self.state.get_time(); + self.last_server_ping = self.state.get_true_time(); } // 6) Update the server about the player's physics attributes. @@ -2266,9 +2266,16 @@ impl Client { return Err(Error::Other("Failed to find entity from uid.".into())); } }, - ServerGeneral::TimeOfDay(time_of_day, calendar, new_time, time_scale) => { + ServerGeneral::TimeOfDay( + time_of_day, + calendar, + new_time, + new_true_time, + time_scale, + ) => { self.target_time_of_day = Some(time_of_day); *self.state.ecs_mut().write_resource() = calendar; + *self.state.ecs_mut().write_resource() = new_true_time; let mut time = self.state.ecs_mut().write_resource::