OSDN Git Service

Fix for "New" chunks not being recognised
authormelchior <melchior@users.osdn.me>
Sat, 14 Nov 2020 22:15:50 +0000 (17:15 -0500)
committermelchior <melchior@users.osdn.me>
Sat, 14 Nov 2020 22:15:50 +0000 (17:15 -0500)
Automap/Automap.csproj
Automap/Data/ColumnCounter.cs
Automap/Subsystems/AutomapSystem.cs

index 932b360..2d887bc 100644 (file)
@@ -99,7 +99,7 @@
     <Compile Include="Subsystems\JsonGenerator.cs" />
        <Compile Include="Subsystems\Snapshot.cs" />
        <Compile Include="Data\JSON\BlockPosJson.cs" />
-       <Compile Include="Data\ColumnChanges.cs" />
+       <Compile Include="Data\ColumnCounter.cs" />
   </ItemGroup>
   <ItemGroup>
     <Folder Include="VS_libs\" />
index 55e770f..ae9c26f 100644 (file)
@@ -40,10 +40,11 @@ namespace Automap
                EditTally[chunkY]++;
                }
 
-               public ColumnCounter Update(Vec3i chunkCoord, int chunkSize)
+               public ColumnCounter Update(Vec3i chunkCoord, int chunkSize, bool partlyNewOrLoaded = false)
                {
                int chunkY = chunkCoord.Y % chunkSize;
                EditTally[chunkY]++;
+               if (partlyNewOrLoaded) NewOrLoaded = true;;
 
                return this;
                }
index d07624f..ddd2c66 100644 (file)
@@ -138,7 +138,7 @@ namespace Automap
                
                columnCounters.AddOrUpdate(topPosition, 
                                              new ColumnCounter(chunkSize, newOrEdit, chunkCoord), 
-                                             (chkPos, chkChng) => chkChng.Update(chunkCoord, chunkSize)
+                                             (chkPos, chkChng) => chkChng.Update(chunkCoord, chunkSize, newOrEdit)
                                             );
                
                }