fix arena loading
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-12-06 12:40:50 -05:00
parent bd80b09d41
commit bdb4394ab3
3 changed files with 14 additions and 0 deletions

View File

@ -1245,6 +1245,9 @@ Small collision engine code formatting
Fix testing apparatus for native code on windows
Fix doxygen also pointing at native code lib folder
(14/06/2024)
Fix arena loading
# TODO

View File

@ -79,9 +79,12 @@ public class SceneLoader {
((GriddedDataCellManager)realm.getDataCellManager()).loadAllCells();
}
if(file.getRealmDescriptor() != null && file.getRealmDescriptor().getType().equals(RealmDescriptor.REALM_DESCRIPTOR_GRIDDED)){
serverWorldData.getServerTerrainManager().overrideChunkGenerator(new DefaultChunkGenerator());
if(serverWorldData.getServerTerrainManager().getChunkGenerator() instanceof DefaultChunkGenerator){
DefaultChunkGenerator chunkGenerator = (DefaultChunkGenerator)serverWorldData.getServerTerrainManager().getChunkGenerator();
chunkGenerator.setBaseVoxelId(file.getRealmDescriptor().getBaseVoxel());
} else {
throw new Error("Failed to load " + serverWorldData.getServerTerrainManager().getChunkGenerator());
}
}
} break;

View File

@ -234,6 +234,14 @@ public class ServerTerrainManager {
public TerrainModel getModel() {
return model;
}
/**
* Overrides the chunk generator
* @param generator The new chunk generator
*/
public void overrideChunkGenerator(ChunkGenerator generator){
this.chunkGenerator = generator;
}
/**
* Performs logic once a server chunk is available