mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'isse/test-world-fix' into 'master'
Fix compilation with worldgen turned off. See merge request veloren/veloren!3531
This commit is contained in:
commit
9f9bfc8fb3
@ -12,7 +12,6 @@
|
||||
option_zip,
|
||||
unwrap_infallible
|
||||
)]
|
||||
#![cfg_attr(not(feature = "worldgen"), feature(const_panic))]
|
||||
|
||||
pub mod automod;
|
||||
mod character_creator;
|
||||
@ -39,7 +38,9 @@ pub mod sys;
|
||||
#[cfg(feature = "persistent_world")]
|
||||
pub mod terrain_persistence;
|
||||
#[cfg(not(feature = "worldgen"))] mod test_world;
|
||||
|
||||
mod weather;
|
||||
|
||||
pub mod wiring;
|
||||
|
||||
// Reexports
|
||||
@ -546,12 +547,13 @@ impl Server {
|
||||
|
||||
// Initiate real-time world simulation
|
||||
#[cfg(feature = "worldgen")]
|
||||
rtsim::init(&mut state, &world, index.as_index_ref(), spawn_point);
|
||||
{
|
||||
rtsim::init(&mut state, &world, index.as_index_ref(), spawn_point);
|
||||
weather::init(&mut state, &world);
|
||||
}
|
||||
#[cfg(not(feature = "worldgen"))]
|
||||
rtsim::init(&mut state);
|
||||
|
||||
weather::init(&mut state, &world);
|
||||
|
||||
let this = Self {
|
||||
state,
|
||||
world,
|
||||
@ -689,8 +691,10 @@ impl Server {
|
||||
sys::msg::add_server_systems(dispatcher_builder);
|
||||
sys::add_server_systems(dispatcher_builder);
|
||||
#[cfg(feature = "worldgen")]
|
||||
rtsim::add_server_systems(dispatcher_builder);
|
||||
weather::add_server_systems(dispatcher_builder);
|
||||
{
|
||||
rtsim::add_server_systems(dispatcher_builder);
|
||||
weather::add_server_systems(dispatcher_builder);
|
||||
}
|
||||
},
|
||||
false,
|
||||
);
|
||||
|
@ -20,6 +20,7 @@ pub fn add_server_systems(dispatch_builder: &mut DispatcherBuilder) {
|
||||
dispatch::<sync::Sys>(dispatch_builder, &[&tick::Sys::sys_name()]);
|
||||
}
|
||||
|
||||
#[cfg(feature = "worldgen")]
|
||||
pub fn init(state: &mut State, world: &world::World) {
|
||||
let weather_size = world.sim().get_size() / CHUNKS_PER_CELL;
|
||||
let sim = WeatherSim::new(weather_size, world);
|
||||
|
@ -53,7 +53,7 @@ impl Lod {
|
||||
client.world_data().lod_base.raw(),
|
||||
client.world_data().lod_alt.raw(),
|
||||
client.world_data().lod_horizon.raw(),
|
||||
client.world_data().chunk_size().as_() / weather::CHUNKS_PER_CELL,
|
||||
(client.world_data().chunk_size().as_() / weather::CHUNKS_PER_CELL).map(|e| e.max(1)),
|
||||
settings.graphics.lod_detail.max(100).min(2500),
|
||||
/* TODO: figure out how we want to do this without color borders?
|
||||
* water_color().into_array().into(), */
|
||||
|
Loading…
Reference in New Issue
Block a user