From 2569eae5d80601033474026d279d1a230d2c377a Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 15 Mar 2020 08:23:40 +0100 Subject: [PATCH] Don't make sprint particles in liquids --- mods/PLAYER/mcl_sprint/init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/PLAYER/mcl_sprint/init.lua b/mods/PLAYER/mcl_sprint/init.lua index c191529074..efd39ae607 100644 --- a/mods/PLAYER/mcl_sprint/init.lua +++ b/mods/PLAYER/mcl_sprint/init.lua @@ -86,7 +86,8 @@ minetest.register_globalstep(function(dtime) -- Sprint dirt particles local numParticles = math.random(1, 2) local playerNode = minetest.get_node({x=playerPos["x"], y=playerPos["y"]-1, z=playerPos["z"]}) - if playerNode["name"] ~= "air" then + local def = minetest.registered_nodes[playerNode.name] + if def and def.walkable then for i=1, numParticles, 1 do minetest.add_particle({ pos = {x=playerPos["x"]+math.random(-1,1)*math.random()/2,y=playerPos["y"]+0.1,z=playerPos["z"]+math.random(-1,1)*math.random()/2},