From: melchior Date: Sat, 14 Nov 2020 22:15:50 +0000 (-0500) Subject: Fix for "New" chunks not being recognised X-Git-Tag: V0.1.6~18 X-Git-Url: http://git.osdn.net/view?p=automap%2Fautomap.git;a=commitdiff_plain;h=15f317f88bd03d04c8ff038db2ddcd20638f2f82 Fix for "New" chunks not being recognised --- diff --git a/Automap/Automap.csproj b/Automap/Automap.csproj index 932b360..2d887bc 100644 --- a/Automap/Automap.csproj +++ b/Automap/Automap.csproj @@ -99,7 +99,7 @@ - + diff --git a/Automap/Data/ColumnCounter.cs b/Automap/Data/ColumnCounter.cs index 55e770f..ae9c26f 100644 --- a/Automap/Data/ColumnCounter.cs +++ b/Automap/Data/ColumnCounter.cs @@ -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; } diff --git a/Automap/Subsystems/AutomapSystem.cs b/Automap/Subsystems/AutomapSystem.cs index d07624f..ddd2c66 100644 --- a/Automap/Subsystems/AutomapSystem.cs +++ b/Automap/Subsystems/AutomapSystem.cs @@ -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) ); }