Fix particles for non-16x textures.

Resize base texture down to 16x first, so mask works
as expected.  Some textures may be blurred, but
we're more concerned with getting the overal color
right more than showing actual patterns.
This commit is contained in:
Aaron Suen 2019-12-30 14:16:14 -05:00
parent f5bf7a5aa9
commit 0d3f26b861

View File

@ -28,7 +28,7 @@ function nodecore.digparticles(nodedef, partdef)
local t = {}
for _ = 1, 4 do
partdef.texture = img .. "^[mask:[combine\\:16x16\\:"
partdef.texture = img .. "^[resize:16x16^[mask:[combine\\:16x16\\:"
.. math_floor(math_random() * 12) .. ","
.. math_floor(math_random() * 12) .. "=nc_api_pummel.png"
t[#t + 1] = minetest.add_particlespawner(partdef)