Merge pull request 'Fix boss bars scaling issue with non 16x texture packs' (#2767) from talamh/MineClone2:bossbars_fix into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2767 Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
commit
efcd0c8dcc
|
@ -13,13 +13,13 @@ function mcl_bossbars.recalculate_colors()
|
||||||
local frame_count = color_count * 2
|
local frame_count = color_count * 2
|
||||||
for i, color in ipairs(colors) do
|
for i, color in ipairs(colors) do
|
||||||
local idx = i * 2 - 1
|
local idx = i * 2 - 1
|
||||||
local image = "mcl_bossbars.png"
|
local image = "(mcl_bossbars.png"
|
||||||
.. "^[transformR270"
|
.. "^[transformR270"
|
||||||
.. "^[verticalframe:" .. frame_count .. ":" .. (idx - 1)
|
.. "^[verticalframe:" .. frame_count .. ":" .. (idx - 1)
|
||||||
.. "^(mcl_bossbars_empty.png"
|
.. "^(mcl_bossbars_empty.png"
|
||||||
.. "^[lowpart:%d:mcl_bossbars.png"
|
.. "^[lowpart:%d:mcl_bossbars.png"
|
||||||
.. "^[transformR270"
|
.. "^[transformR270"
|
||||||
.. "^[verticalframe:" .. frame_count .. ":" .. idx .. ")"
|
.. "^[verticalframe:" .. frame_count .. ":" .. idx .. "))^[resize:1456x40"
|
||||||
local _, hex = mcl_util.get_color(color)
|
local _, hex = mcl_util.get_color(color)
|
||||||
sorted[color] = {
|
sorted[color] = {
|
||||||
image = image,
|
image = image,
|
||||||
|
@ -162,7 +162,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
position = {x = 0.5, y = 0},
|
position = {x = 0.5, y = 0},
|
||||||
alignment = {x = 0, y = 1},
|
alignment = {x = 0, y = 1},
|
||||||
offset = {x = 0, y = i * 40 + 25},
|
offset = {x = 0, y = i * 40 + 25},
|
||||||
scale = {x = 3, y = 3},
|
scale = {x = 0.375, y = 0.375},
|
||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user