diff --git a/Core/FileFormats/RagnarokGND.lua b/Core/FileFormats/RagnarokGND.lua index 2df39e97..864a86aa 100644 --- a/Core/FileFormats/RagnarokGND.lua +++ b/Core/FileFormats/RagnarokGND.lua @@ -391,7 +391,9 @@ function RagnarokGND:GenerateGroundMeshSections() -- -- Copy from NORTH end - if not isOnMapBoundaryU then -- Copy from EAST (if possible) + -- Copy bottom right color if possible + -- Copy from EAST (if possible) + if not isOnMapBoundaryU then if adjacentCubeEast.top_surface_id == -1 then -- Can't copy :/ bottomRightVertexColor = bottomLeftVertexColor @@ -401,6 +403,23 @@ function RagnarokGND:GenerateGroundMeshSections() end end + -- Copy top left color if possible + if not isOnMapBoundaryV then + if adjacentCubeNorth.top_surface_id == -1 then + -- Can't copy :/ + topLeftVertexColor = bottomLeftVertexColor + else + local adjacentGroundSurfaceNorth = self.texturedSurfaces[adjacentCubeNorth.top_surface_id] + topLeftVertexColor = adjacentGroundSurfaceNorth.bottom_left_color + end + + end + + -- Copy top right color if possible + if not isOnMapBoundaryU then + + end + table_insert(mesh.vertexColors, bottomLeftVertexColor.red / 255) table_insert(mesh.vertexColors, bottomLeftVertexColor.green / 255) table_insert(mesh.vertexColors, bottomLeftVertexColor.blue / 255)