Skip to content

Commit

Permalink
fix(gui_building_grid_gl4): use correct water level value (#3030)
Browse files Browse the repository at this point in the history
This fixes the grid display when map_waterlevel is set (which really
moves the map rather than the water, which stays at zero), and uses the
proper water level engine function for when the water level might
actually be non-zero in the future.
  • Loading branch information
salinecitrine committed May 18, 2024
1 parent 2d36386 commit b701f60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion luaui/Widgets/gui_building_grid_gl4.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ local config = {
lineColor = { 0.70, 1.0, 0.70 }, -- color of the lines
}

local waterLevel = Spring.GetModOptions().map_waterlevel
local waterLevel = Spring.GetWaterPlaneLevel and Spring.GetWaterPlaneLevel() or 0

local cmdShowForUnitDefID
local isPregame = Spring.GetGameFrame() == 0 and not isSpec
Expand Down

0 comments on commit b701f60

Please sign in to comment.