1
0
forked from MTSR/mapserver
This commit is contained in:
Andrey Stepanov 2024-11-04 11:15:02 +05:00
parent 37244d7f69
commit 7d853c2180
Signed by: Koldun
GPG Key ID: 53DE683337F5D25F

View File

@ -149,7 +149,7 @@ func (r *MapBlockRenderer) Render(pos1, pos2 *types.MapBlockCoords) (*image.NRGB
for x := 0; x < 16; x++ {
for z := 0; z < 16; z++ {
var colors_stack [15]color.RGBA
var colors_stack [16]color.RGBA
var visible_nodes_count uint8 = 0
for y := 15; y >= 0; y-- {
if xzOccupationMap[x][z] {
@ -243,6 +243,10 @@ func (r *MapBlockRenderer) Render(pos1, pos2 *types.MapBlockCoords) (*image.NRGB
}
}
if visible_nodes_count == 0 {
continue
}
visible_nodes_count--
result_color := colors_stack[visible_nodes_count]
if visible_nodes_count > 0 {