Bläddra i källkod

change grass polygon count

Kolja Strohm 1 år sedan
förälder
incheckning
a658bc0490
2 ändrade filer med 5 tillägg och 6 borttagningar
  1. 4 5
      FactoryCraft/Dimension.cpp
  2. 1 1
      FactoryCraft/StaticInitializerOrder.cpp

+ 4 - 5
FactoryCraft/Dimension.cpp

@@ -240,9 +240,7 @@ void Dimension::thread()
                 {
                     if (newLight[i] != light[i])
                     {
-                        chunk->setLightData(chunkPos,
-                            newLight,
-                            isForeground);
+                        chunk->setLightData(chunkPos, newLight, isForeground);
                         for (int j = 0; j < 6; j++)
                             internalLightUpdateQueue.add(
                                 position
@@ -350,7 +348,8 @@ const Block* Dimension::zBlockOrDefault(Framework::Vec3<int> location)
     return &NoBlock::INSTANCE;
 }
 
-int Dimension::getBlockType(Framework::Vec3<int> location) {
+int Dimension::getBlockType(Framework::Vec3<int> location)
+{
     Chunk* c = zChunk(Game::INSTANCE->getChunkCenter(location.x, location.y));
     if (c)
     {
@@ -492,7 +491,7 @@ void Dimension::setChunk(Chunk* chunk, Punkt center)
     }
     if (chunk) chunk->onLoaded();
     laterHandler.execute();
-    updateLightAtChunkBorders(center);
+    if (chunk) updateLightAtChunkBorders(center);
 }
 
 void Dimension::save(Text worldDir) const

+ 1 - 1
FactoryCraft/StaticInitializerOrder.cpp

@@ -228,7 +228,7 @@ void initializeBlockTypes()
         ->initializeDefault();
     (new GrassBlockType(BlockTypeEnum::GRASS,
          ItemTypeEnum::GRASS,
-         ModelInfo("grass", "blocks.ltdb/grass.png", 16).setTransparent(),
+         ModelInfo("grass", "blocks.ltdb/grass.png", 1).setTransparent(),
          "Grass",
          0x5076C011))
         ->initializeDefault();