diff options
author | PilzAdam <adam-k@outlook.com> | 2012-11-03 18:07:49 +0100 |
---|---|---|
committer | PilzAdam <adam-k@outlook.com> | 2012-11-03 18:07:49 +0100 |
commit | 21317be49362ed13701ab5ab609020f8bfbec418 (patch) | |
tree | 30681efae060754667e284b9a0d495f0b8450574 /builtin | |
parent | 41c00e87d42580881d8c7001f39014814e3b55f2 (diff) | |
download | minetest-21317be49362ed13701ab5ab609020f8bfbec418.tar.gz minetest-21317be49362ed13701ab5ab609020f8bfbec418.tar.bz2 minetest-21317be49362ed13701ab5ab609020f8bfbec418.zip |
Fix a bug in falling code where entities get stuck
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/falling.lua | 5 |
1 files changed, 5 insertions, 0 deletions
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 |