mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
fix panic in /reload_chunks if the terrain persistence feature was enabled but disabled in the settings
This commit is contained in:
parent
7c4ac6492e
commit
ff5b485dbc
@ -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