fix homogenous flagging on cell managers
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good

This commit is contained in:
austin 2024-12-03 18:26:23 -05:00
parent bff87fa725
commit 4995e06f87
6 changed files with 22 additions and 9 deletions

View File

@ -1233,6 +1233,7 @@ Fix single player loading
Spawn player in center of single player world
Elevation fix + use correct voxel generation in SP worlds
Fix cache key collision bug
Fix homogenous flagging on cell managers

View File

@ -171,7 +171,12 @@ public class ClientBlockCellManager {
if(evaluationMap.containsKey(node)){
return false;
}
if(node.getData().hasGenerated() && node.getData().isHomogenous()){
if(node.getData().hasGenerated() &&
(
node.getData().isHomogenous() ||
this.getMinDistance(playerPos, node, distCache) > SIXTEENTH_RES_DIST
)
){
return false;
}
if(node.isLeaf()){
@ -447,7 +452,6 @@ public class ClientBlockCellManager {
*/
private void flagAsMeta(WorldOctTreeNode<BlockDrawCell> node){
node.getData().setHasGenerated(true);
node.getData().setHomogenous(true);
}
/**

View File

@ -201,7 +201,12 @@ public class ClientDrawCellManager {
if(evaluationMap.containsKey(node)){
return false;
}
if(node.getData().hasGenerated() && node.getData().isHomogenous()){
if(node.getData().hasGenerated() &&
(
node.getData().isHomogenous() ||
this.getMinDistance(playerPos, node, distCache) > SIXTEENTH_RES_DIST
)
){
return false;
}
if(node.isLeaf()){
@ -582,7 +587,6 @@ public class ClientDrawCellManager {
*/
private void flagAsMeta(WorldOctTreeNode<DrawCell> node){
node.getData().setHasGenerated(true);
node.getData().setHomogenous(true);
}
/**

View File

@ -207,7 +207,12 @@ public class FoliageCellManager {
if(evaluationMap.containsKey(node)){
return false;
}
if(node.getData().hasGenerated() && node.getData().isHomogenous()){
if(node.getData().hasGenerated() &&
(
node.getData().isHomogenous() ||
this.getMinDistance(absVoxelPos, node, distCache) > SIXTEENTH_RES_DIST
)
){
return false;
}
if(node.isLeaf()){
@ -504,7 +509,6 @@ public class FoliageCellManager {
*/
private void flagAsMeta(WorldOctTreeNode<FoliageCell> node){
node.getData().setHasGenerated(true);
node.getData().setHomogenous(true);
}
/**

View File

@ -39,7 +39,7 @@ public class PlayerCharacterCreation {
//
//attach entity to player object
LoggerInterface.loggerEngine.INFO("Spawned entity for player. Entity id: " + newPlayerEntity.getId() + " Player id: " + playerObject.getId());
attachEntityToPlayerObject(newPlayerEntity,playerObject,connectionHandler);
PlayerCharacterCreation.attachEntityToPlayerObject(newPlayerEntity,playerObject,connectionHandler);
playerObject.setWorldPos(new Vector3i(
realm.getServerWorldData().convertRealToChunkSpace(spawnPoint.x),
realm.getServerWorldData().convertRealToChunkSpace(spawnPoint.y),
@ -73,7 +73,7 @@ public class PlayerCharacterCreation {
Player player = serverConnectionHandler.getPlayer();
player.setPlayerEntity(entity);
//custom player btrees
addPlayerServerBTrees(entity);
PlayerCharacterCreation.addPlayerServerBTrees(entity);
}
/**

View File

@ -29,7 +29,7 @@ public class ServerTerrainManager {
/**
* The number of threads for chunk generation
*/
public static final int GENERATION_THREAD_POOL_SIZE = 1;
public static final int GENERATION_THREAD_POOL_SIZE = 2;
/**
* Full world discrete size