mirror of
https://github.com/minetest-mods/skinsdb.git
synced 2025-04-01 17:50:25 +02:00
Fix client-side out-of-bounds '[combine' warnings
This commit is contained in:
parent
a0ed992121
commit
247bcdd058
@ -109,7 +109,7 @@ function skin_class:get_preview()
|
|||||||
--Right Leg
|
--Right Leg
|
||||||
skin = skin .. "([combine:16x32:0,0=" .. player_skin .. "^[mask:skindb_mask_rleg.png)^"
|
skin = skin .. "([combine:16x32:0,0=" .. player_skin .. "^[mask:skindb_mask_rleg.png)^"
|
||||||
|
|
||||||
-- 64x skins have non-mirrored arms and legs
|
-- 64x64 skins have non-mirrored arms and legs
|
||||||
local left_arm
|
local left_arm
|
||||||
local left_leg
|
local left_leg
|
||||||
|
|
||||||
@ -126,17 +126,21 @@ function skin_class:get_preview()
|
|||||||
--Left Leg
|
--Left Leg
|
||||||
skin = skin .. left_leg
|
skin = skin .. left_leg
|
||||||
|
|
||||||
-- Add overlays for 64x skins. these wont appear if skin is 32x because it will be cropped out
|
if self:get_meta("format") == "1.8" then
|
||||||
--Chest Overlay
|
-- Add overlays for 64x64 skins. This check is needed to avoid
|
||||||
skin = skin .. "([combine:16x32:-16,-28=" .. player_skin .. "^[mask:skindb_mask_chest.png)^"
|
-- client-side out-of-bounds "[combine" warnings.
|
||||||
--Right Arm Overlay
|
|
||||||
skin = skin .. "([combine:16x32:-44,-28=" .. player_skin .. "^[mask:skindb_mask_rarm.png)^"
|
--Chest Overlay
|
||||||
--Right Leg Overlay
|
skin = skin .. "([combine:16x32:-16,-28=" .. player_skin .. "^[mask:skindb_mask_chest.png)^"
|
||||||
skin = skin .. "([combine:16x32:0,-16=" .. player_skin .. "^[mask:skindb_mask_rleg.png)^"
|
--Right Arm Overlay
|
||||||
--Left Arm Overlay
|
skin = skin .. "([combine:16x32:-44,-28=" .. player_skin .. "^[mask:skindb_mask_rarm.png)^"
|
||||||
skin = skin .. "([combine:16x32:-40,-44=" .. player_skin .. "^[mask:(skindb_mask_rarm.png^[transformFX))^"
|
--Right Leg Overlay
|
||||||
--Left Leg Overlay
|
skin = skin .. "([combine:16x32:0,-16=" .. player_skin .. "^[mask:skindb_mask_rleg.png)^"
|
||||||
skin = skin .. "([combine:16x32:4,-32=" .. player_skin .. "^[mask:(skindb_mask_rleg.png^[transformFX))"
|
--Left Arm Overlay
|
||||||
|
skin = skin .. "([combine:16x32:-40,-44=" .. player_skin .. "^[mask:(skindb_mask_rarm.png^[transformFX))^"
|
||||||
|
--Left Leg Overlay
|
||||||
|
skin = skin .. "([combine:16x32:4,-32=" .. player_skin .. "^[mask:(skindb_mask_rleg.png^[transformFX))"
|
||||||
|
end
|
||||||
|
|
||||||
-- Full Preview
|
-- Full Preview
|
||||||
skin = "(((" .. skin .. ")^[resize:64x128)^[mask:skindb_transform.png)"
|
skin = "(((" .. skin .. ")^[resize:64x128)^[mask:skindb_transform.png)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user