mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
airship fix attempt #521
This commit is contained in:
parent
b862a7aa22
commit
c8350d0654
@ -811,6 +811,15 @@ impl Server {
|
||||
run_now::<terrain::Sys>(self.state.ecs_mut());
|
||||
}
|
||||
|
||||
// Hook rtsim chunk unloads
|
||||
#[cfg(feature = "worldgen")]
|
||||
{
|
||||
let mut rtsim = self.state.ecs().write_resource::<rtsim::RtSim>();
|
||||
for chunk in &self.state.terrain_changes().removed_chunks {
|
||||
rtsim.hook_unload_chunk(*chunk);
|
||||
}
|
||||
}
|
||||
|
||||
// Prevent anchor entity chains which are not currently supported
|
||||
let anchors = self.state.ecs().read_storage::<Anchor>();
|
||||
let anchored_anchor_entities: Vec<Entity> = (
|
||||
|
@ -383,9 +383,9 @@ impl<'a> System<'a> for Sys {
|
||||
// TODO: code duplication for chunk insertion between here and state.rs
|
||||
terrain.remove(key).map(|chunk| {
|
||||
terrain_changes.removed_chunks.insert(key);
|
||||
#[cfg(feature = "worldgen")]
|
||||
rtsim.hook_unload_chunk(key);
|
||||
chunk
|
||||
// The rtsim hook to unload the chunks is later called in
|
||||
// the main server tick function
|
||||
})
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
Loading…
Reference in New Issue
Block a user