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:
parent
f5bf7a5aa9
commit
0d3f26b861
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user