diff options
author | PilzAdam <adam-k@outlook.com> | 2012-11-03 15:14:14 -0700 |
---|---|---|
committer | PilzAdam <adam-k@outlook.com> | 2012-11-03 15:14:14 -0700 |
commit | 23837e43525e332ea140b58e0f5d1e2b89f1149f (patch) | |
tree | 784ecbc00586ddf188b6297d4ae4022b012dbc0e | |
parent | 3cab24fbcfbbeb12cdd9f085167969e1a934bd59 (diff) | |
parent | 21317be49362ed13701ab5ab609020f8bfbec418 (diff) | |
download | minetest-23837e43525e332ea140b58e0f5d1e2b89f1149f.tar.gz minetest-23837e43525e332ea140b58e0f5d1e2b89f1149f.tar.bz2 minetest-23837e43525e332ea140b58e0f5d1e2b89f1149f.zip |
Merge pull request #274 from PilzAdam/falling
Fix a bug in falling code where entities get stuck
-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 |