Skip to content

Commit 10db3bb

Browse files
committed
Update TopologyData.cs
1 parent 9076dfe commit 10db3bb

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

Assets/MapEditor/WorldData/TopologyData.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public static TerrainMap<int> GetTerrainMap()
1313
{
1414
return new TerrainMap<int>(top, 1);
1515
}
16+
1617
/// <summary>Returns the Splatmap of the selected Topology Layer.</summary>
1718
/// <param name="layer">The Topology layer to return.</param>
1819
public static float[,,] GetTopologyLayer(int layer)
@@ -24,13 +25,14 @@ public static TerrainMap<int> GetTerrainMap()
2425
for (int j = 0; j < topology.res; j++)
2526
{
2627
if ((topology[i, j] & layer) != 0)
27-
splatMap[i, j, 0] = 0f;
28+
splatMap[i, j, 0] = float.MinValue;
2829
else
29-
splatMap[i, j, 1] = 1f;
30+
splatMap[i, j, 1] = float.MaxValue;
3031
}
3132
});
3233
return splatMap;
3334
}
35+
3436
/// <summary>Converts all the Topology Layer arrays back into a single byte array.</summary>
3537
public static void SaveTopologyLayers()
3638
{
@@ -52,8 +54,5 @@ public static void SaveTopologyLayers()
5254
top = topologyMap.ToByteArray();
5355
}
5456

55-
public static void InitMesh(TerrainMap<int> topology)
56-
{
57-
top = topology.ToByteArray();
58-
}
57+
public static void InitMesh(TerrainMap<int> topology) => top = topology.ToByteArray();
5958
}

0 commit comments

Comments
 (0)