Skip to content

Commit

Permalink
handle player model in 5.4 better
Browse files Browse the repository at this point in the history
  • Loading branch information
wsor4035 committed Jul 4, 2024
1 parent 486ed15 commit 045ee59
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ i3 = {
max_favs = 6,
max_waypoints = 30,
min_fs_version = 4,
target_fs_version = 6,
item_btn_size = 1.1,
drop_bag_on_die = true,
wielditem_fade_after = 3,
Expand Down
4 changes: 2 additions & 2 deletions src/gui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ local function get_inventory_fs(player, data, fs)
-- fs"style[player_model;bgcolor=black]"
model(0.2, 0.2, armor_skin and 4 or 3.4, ctn_hgt,
"player_model", props.mesh, textures, "0,-150", "false", "false",
true_table(anim) and fmt("%u,%u%s", anim.x, anim.y, data.fs_version >= 5 and ";30" or "") or "")
true_table(anim) and fmt("%u,%u;30", anim.x, anim.y) or "")
else
local size = 2.5
image(0.7, 0.2, size, size * props.visual_size.y, props.textures[1])
Expand Down Expand Up @@ -1751,7 +1751,7 @@ local function make_fs(player, data)
local full_height = 12

fs("formspec_version[%u]size[%f,%f]no_prepend[]bgcolor[#0000]",
i3.settings.min_fs_version, data.inv_width + 8, full_height)
i3.settings.target_fs_version, data.inv_width + 8, full_height)

fs(styles)

Expand Down

0 comments on commit 045ee59

Please sign in to comment.