mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Move debug_vectors_enabled flag to Scene
This commit is contained in:
parent
ff3f1b9b1c
commit
ce98de4370
@ -311,8 +311,6 @@ pub struct Client {
|
||||
|
||||
flashing_lights_enabled: bool,
|
||||
|
||||
pub debug_vectors_enabled: bool,
|
||||
|
||||
/// Terrrain view distance
|
||||
server_view_distance_limit: Option<u32>,
|
||||
view_distance: Option<u32>,
|
||||
@ -989,7 +987,6 @@ impl Client {
|
||||
dt_adjustment: 1.0,
|
||||
|
||||
connected_server_constants: server_constants,
|
||||
debug_vectors_enabled: false,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -123,6 +123,8 @@ pub struct Scene {
|
||||
pub interpolated_time_of_day: Option<f64>,
|
||||
last_lightning: Option<(Vec3<f32>, f64)>,
|
||||
local_time: f64,
|
||||
|
||||
pub debug_vectors_enabled: bool,
|
||||
}
|
||||
|
||||
pub struct SceneData<'a> {
|
||||
@ -362,6 +364,7 @@ impl Scene {
|
||||
interpolated_time_of_day: None,
|
||||
last_lightning: None,
|
||||
local_time: 0.0,
|
||||
debug_vectors_enabled: false,
|
||||
}
|
||||
}
|
||||
|
||||
@ -1649,7 +1652,7 @@ impl Scene {
|
||||
lines.fluid_vel.take().map(|id| self.debug.remove_shape(id));
|
||||
lines.wind.take().map(|id| self.debug.remove_shape(id));
|
||||
lines.vel.take().map(|id| self.debug.remove_shape(id));
|
||||
if client.debug_vectors_enabled {
|
||||
if self.debug_vectors_enabled {
|
||||
let ecs = client.state().ecs();
|
||||
|
||||
let vels = &ecs.read_component::<comp::Vel>();
|
||||
|
@ -103,7 +103,7 @@ impl EguiState {
|
||||
}
|
||||
},
|
||||
EguiAction::SetShowDebugVector(enabled) => {
|
||||
client.debug_vectors_enabled = enabled;
|
||||
scene.debug_vectors_enabled = enabled;
|
||||
},
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user