fix arena loading
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
bd80b09d41
commit
bdb4394ab3
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user