rename client_time to local_time

This commit is contained in:
Isse 2023-10-13 13:17:52 +02:00
parent 68857d5af7
commit 56175c2730
2 changed files with 5 additions and 5 deletions

View File

@ -16,7 +16,7 @@ layout(std140, set = 0, binding = 0) uniform u_globals {
vec4 moon_dir;
// .x = The `Time` resource, repeated every `tick_overflow`
// .y = a floored (`Time` / `tick_overflow`)
// .z = Client time, not synced between clients.
// .z = Time local to client, not synced between clients.
vec4 tick;
vec4 screen_res;
uvec4 light_shadow_count;

View File

@ -113,7 +113,7 @@ pub struct Scene {
wind_vel: Vec2<f32>,
pub interpolated_time_of_day: Option<f64>,
last_lightning: Option<(Vec3<f32>, f64)>,
client_time: f64,
local_time: f64,
}
pub struct SceneData<'a> {
@ -349,7 +349,7 @@ impl Scene {
wind_vel: Vec2::zero(),
interpolated_time_of_day: None,
last_lightning: None,
client_time: 0.0,
local_time: 0.0,
}
}
@ -525,7 +525,7 @@ impl Scene {
let dt = ecs.fetch::<DeltaTime>().0;
self.client_time += dt as f64 * ecs.fetch::<TimeScale>().0;
self.local_time += dt as f64 * ecs.fetch::<TimeScale>().0;
let positions = ecs.read_storage::<comp::Pos>();
@ -850,7 +850,7 @@ impl Scene {
self.map_bounds,
time_of_day,
scene_data.state.get_time(),
self.client_time,
self.local_time,
renderer.resolution().as_(),
Vec2::new(SHADOW_NEAR, SHADOW_FAR),
lights.len(),