projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
41c00e8
)
Fix a bug in falling code where entities get stuck
author
PilzAdam
<adam-k@outlook.com>
Sat, 3 Nov 2012 17:07:49 +0000
(18:07 +0100)
committer
PilzAdam
<adam-k@outlook.com>
Sat, 3 Nov 2012 17:07:49 +0000
(18:07 +0100)
builtin/falling.lua
patch
|
blob
|
history
diff --git
a/builtin/falling.lua
b/builtin/falling.lua
index 4a7f4167eec0fb21d1a7e0e7afd5977f18268885..3912727c32605a6cf28811014f8fa8737b6fe3e9 100644
(file)
--- 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