Things
This commit is contained in:
@@ -28,7 +28,7 @@ import static org.lwjgl.opengl.GL43C.*;
|
|||||||
public class NodeCleaner {
|
public class NodeCleaner {
|
||||||
//TODO: use batch_visibility_set to clear visibility data when nodes are removed!! (TODO: nodeManager will need to forward info to this)
|
//TODO: use batch_visibility_set to clear visibility data when nodes are removed!! (TODO: nodeManager will need to forward info to this)
|
||||||
|
|
||||||
private static final int OUTPUT_COUNT = 64;
|
private static final int OUTPUT_COUNT = 128;
|
||||||
|
|
||||||
private static final int BATCH_SET_SIZE = 2048;
|
private static final int BATCH_SET_SIZE = 2048;
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ public class NodeCleaner {
|
|||||||
|
|
||||||
private void onDownload(long ptr, long size) {
|
private void onDownload(long ptr, long size) {
|
||||||
//StringBuilder b = new StringBuilder();
|
//StringBuilder b = new StringBuilder();
|
||||||
for (int i = 0; i < 64; i++) {
|
for (int i = 0; i < OUTPUT_COUNT; i++) {
|
||||||
long pos = Integer.toUnsignedLong(MemoryUtil.memGetInt(ptr + 8 * i))<<32;
|
long pos = Integer.toUnsignedLong(MemoryUtil.memGetInt(ptr + 8 * i))<<32;
|
||||||
pos |= Integer.toUnsignedLong(MemoryUtil.memGetInt(ptr + 8 * i + 4));
|
pos |= Integer.toUnsignedLong(MemoryUtil.memGetInt(ptr + 8 * i + 4));
|
||||||
if (pos == 0) {
|
if (pos == 0) {
|
||||||
|
|||||||
@@ -706,6 +706,15 @@ public class NodeManager {
|
|||||||
// in this case we should not mark the node as inflight as it casuse very bad things to happen
|
// in this case we should not mark the node as inflight as it casuse very bad things to happen
|
||||||
// we should only mark inflight when there is actually a request
|
// we should only mark inflight when there is actually a request
|
||||||
if (nodeType == NODE_TYPE_LEAF) {
|
if (nodeType == NODE_TYPE_LEAF) {
|
||||||
|
if (this.nodeData.getNodeGeometry(nodeId) == NULL_GEOMETRY_ID) {
|
||||||
|
//Weird case that not sure how possible
|
||||||
|
Logger.warn("Got request for leaf that doesnt have geometry, this should not be possible at pos " + WorldEngine.pprintPos(pos));
|
||||||
|
if (!this.updateRouter.watch(pos, WorldEngine.UPDATE_TYPE_BLOCK_BIT)) {
|
||||||
|
Logger.warn("Node: " + nodeId + " at pos: " + WorldEngine.pprintPos(pos) + " got update request, but geometry was already being watched");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Check if the node is already in-flight, if it is, dont do any processing
|
//Check if the node is already in-flight, if it is, dont do any processing
|
||||||
if (this.nodeData.isNodeRequestInFlight(nodeId)) {
|
if (this.nodeData.isNodeRequestInFlight(nodeId)) {
|
||||||
Logger.warn("Tried processing a node that already has a request in flight: " + nodeId + " pos: " + WorldEngine.pprintPos(pos) + " ignoring");
|
Logger.warn("Tried processing a node that already has a request in flight: " + nodeId + " pos: " + WorldEngine.pprintPos(pos) + " ignoring");
|
||||||
|
|||||||
Reference in New Issue
Block a user