mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Merge branch 'crabman/reload-chunks-fix' into 'master'
Fix panic in /reload_chunks if the terrain persistence feature was enabled but disabled in the server settings See merge request veloren/veloren!4150
This commit is contained in:
commit
306be0f9ba
@ -3493,8 +3493,8 @@ fn handle_reload_chunks(
|
||||
server
|
||||
.state
|
||||
.ecs()
|
||||
.write_resource::<crate::terrain_persistence::TerrainPersistence>()
|
||||
.unload_all();
|
||||
.try_fetch_mut::<crate::terrain_persistence::TerrainPersistence>()
|
||||
.map(|mut terrain_persistence| terrain_persistence.unload_all());
|
||||
server.state.clear_terrain();
|
||||
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user