Skip to content

Commit

Permalink
Update RagnarokGND.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
rdw-software committed Dec 13, 2023
1 parent 8a9586a commit e9e54c0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion Core/FileFormats/RagnarokGND.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit e9e54c0

Please sign in to comment.