fix homogenous flagging on cell managers
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
bff87fa725
commit
4995e06f87
@ -1233,6 +1233,7 @@ Fix single player loading
|
|||||||
Spawn player in center of single player world
|
Spawn player in center of single player world
|
||||||
Elevation fix + use correct voxel generation in SP worlds
|
Elevation fix + use correct voxel generation in SP worlds
|
||||||
Fix cache key collision bug
|
Fix cache key collision bug
|
||||||
|
Fix homogenous flagging on cell managers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -171,7 +171,12 @@ public class ClientBlockCellManager {
|
|||||||
if(evaluationMap.containsKey(node)){
|
if(evaluationMap.containsKey(node)){
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if(node.isLeaf()){
|
if(node.isLeaf()){
|
||||||
@ -447,7 +452,6 @@ public class ClientBlockCellManager {
|
|||||||
*/
|
*/
|
||||||
private void flagAsMeta(WorldOctTreeNode<BlockDrawCell> node){
|
private void flagAsMeta(WorldOctTreeNode<BlockDrawCell> node){
|
||||||
node.getData().setHasGenerated(true);
|
node.getData().setHasGenerated(true);
|
||||||
node.getData().setHomogenous(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -201,7 +201,12 @@ public class ClientDrawCellManager {
|
|||||||
if(evaluationMap.containsKey(node)){
|
if(evaluationMap.containsKey(node)){
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if(node.isLeaf()){
|
if(node.isLeaf()){
|
||||||
@ -582,7 +587,6 @@ public class ClientDrawCellManager {
|
|||||||
*/
|
*/
|
||||||
private void flagAsMeta(WorldOctTreeNode<DrawCell> node){
|
private void flagAsMeta(WorldOctTreeNode<DrawCell> node){
|
||||||
node.getData().setHasGenerated(true);
|
node.getData().setHasGenerated(true);
|
||||||
node.getData().setHomogenous(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -207,7 +207,12 @@ public class FoliageCellManager {
|
|||||||
if(evaluationMap.containsKey(node)){
|
if(evaluationMap.containsKey(node)){
|
||||||
return false;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
if(node.isLeaf()){
|
if(node.isLeaf()){
|
||||||
@ -504,7 +509,6 @@ public class FoliageCellManager {
|
|||||||
*/
|
*/
|
||||||
private void flagAsMeta(WorldOctTreeNode<FoliageCell> node){
|
private void flagAsMeta(WorldOctTreeNode<FoliageCell> node){
|
||||||
node.getData().setHasGenerated(true);
|
node.getData().setHasGenerated(true);
|
||||||
node.getData().setHomogenous(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -39,7 +39,7 @@ public class PlayerCharacterCreation {
|
|||||||
//
|
//
|
||||||
//attach entity to player object
|
//attach entity to player object
|
||||||
LoggerInterface.loggerEngine.INFO("Spawned entity for player. Entity id: " + newPlayerEntity.getId() + " Player id: " + playerObject.getId());
|
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(
|
playerObject.setWorldPos(new Vector3i(
|
||||||
realm.getServerWorldData().convertRealToChunkSpace(spawnPoint.x),
|
realm.getServerWorldData().convertRealToChunkSpace(spawnPoint.x),
|
||||||
realm.getServerWorldData().convertRealToChunkSpace(spawnPoint.y),
|
realm.getServerWorldData().convertRealToChunkSpace(spawnPoint.y),
|
||||||
@ -73,7 +73,7 @@ public class PlayerCharacterCreation {
|
|||||||
Player player = serverConnectionHandler.getPlayer();
|
Player player = serverConnectionHandler.getPlayer();
|
||||||
player.setPlayerEntity(entity);
|
player.setPlayerEntity(entity);
|
||||||
//custom player btrees
|
//custom player btrees
|
||||||
addPlayerServerBTrees(entity);
|
PlayerCharacterCreation.addPlayerServerBTrees(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -29,7 +29,7 @@ public class ServerTerrainManager {
|
|||||||
/**
|
/**
|
||||||
* The number of threads for chunk generation
|
* 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
|
* Full world discrete size
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user