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:
@ -311,8 +311,6 @@ pub struct Client {
|
|||||||
|
|
||||||
flashing_lights_enabled: bool,
|
flashing_lights_enabled: bool,
|
||||||
|
|
||||||
pub debug_vectors_enabled: bool,
|
|
||||||
|
|
||||||
/// Terrrain view distance
|
/// Terrrain view distance
|
||||||
server_view_distance_limit: Option<u32>,
|
server_view_distance_limit: Option<u32>,
|
||||||
view_distance: Option<u32>,
|
view_distance: Option<u32>,
|
||||||
@ -989,7 +987,6 @@ impl Client {
|
|||||||
dt_adjustment: 1.0,
|
dt_adjustment: 1.0,
|
||||||
|
|
||||||
connected_server_constants: server_constants,
|
connected_server_constants: server_constants,
|
||||||
debug_vectors_enabled: false,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,6 +123,8 @@ pub struct Scene {
|
|||||||
pub interpolated_time_of_day: Option<f64>,
|
pub interpolated_time_of_day: Option<f64>,
|
||||||
last_lightning: Option<(Vec3<f32>, f64)>,
|
last_lightning: Option<(Vec3<f32>, f64)>,
|
||||||
local_time: f64,
|
local_time: f64,
|
||||||
|
|
||||||
|
pub debug_vectors_enabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct SceneData<'a> {
|
pub struct SceneData<'a> {
|
||||||
@ -362,6 +364,7 @@ impl Scene {
|
|||||||
interpolated_time_of_day: None,
|
interpolated_time_of_day: None,
|
||||||
last_lightning: None,
|
last_lightning: None,
|
||||||
local_time: 0.0,
|
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.fluid_vel.take().map(|id| self.debug.remove_shape(id));
|
||||||
lines.wind.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));
|
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 ecs = client.state().ecs();
|
||||||
|
|
||||||
let vels = &ecs.read_component::<comp::Vel>();
|
let vels = &ecs.read_component::<comp::Vel>();
|
||||||
|
@ -103,7 +103,7 @@ impl EguiState {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
EguiAction::SetShowDebugVector(enabled) => {
|
EguiAction::SetShowDebugVector(enabled) => {
|
||||||
client.debug_vectors_enabled = enabled;
|
scene.debug_vectors_enabled = enabled;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user