Browse Source

send more blocks on chunk loading and not later when the chunk neighbor is set

Kolja Strohm 1 year ago
parent
commit
defe6108f7
2 changed files with 5 additions and 1 deletions
  1. 5 0
      FactoryCraft/Chunk.cpp
  2. 0 1
      FactoryCraft/Dimension.cpp

+ 5 - 0
FactoryCraft/Chunk.cpp

@@ -238,6 +238,11 @@ bool Chunk::isVisible(int index) const
                         if (pos.y >= CHUNK_SIZE) pos.y -= CHUNK_SIZE;
                         n = zNeighbours[d]->zBlockAt(pos);
                     }
+                    else if (pos.z >= 0 && pos.z < WORLD_HEIGHT && d < 4
+                             && !zNeighbours[d])
+                    {
+                        return 1;
+                    }
                     if (n.isA()
                         && (((Block*)n)->isPassable()
                             || ((Block*)n)->isTransparent()))

+ 0 - 1
FactoryCraft/Dimension.cpp

@@ -261,7 +261,6 @@ void Dimension::thread()
             std::cout << "100000 light updates needed " << time << " seconds\n";
             time = 0;
             index = 0;
-            Sleep(250);
             messer.messungStart();
         }
     }