From: PilzAdam Date: Sat, 3 Nov 2012 17:07:49 +0000 (+0100) Subject: Fix a bug in falling code where entities get stuck X-Git-Tag: 0.4.4~91^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=21317be49362ed13701ab5ab609020f8bfbec418;p=oweals%2Fminetest.git Fix a bug in falling code where entities get stuck --- diff --git a/builtin/falling.lua b/builtin/falling.lua index 4a7f4167e..3912727c3 100644 --- a/builtin/falling.lua +++ b/builtin/falling.lua @@ -111,6 +111,11 @@ function nodeupdate_single(p) end function nodeupdate(p) + -- Round p to prevent falling entities to get stuck + p.x = math.floor(p.x+0.5) + p.y = math.floor(p.y+0.5) + p.z = math.floor(p.z+0.5) + for x = -1,1 do for y = -1,1 do for z = -1,1 do