projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Expose collided objects in moveresult
[oweals/minetest.git]
/
src
/
script
/
common
/
c_content.cpp
diff --git
a/src/script/common/c_content.cpp
b/src/script/common/c_content.cpp
index 95364000cf6c1e2f79525a4cecac84d57812d767..dac828316552825eaffa32052e8e1e0947a4e77b 100644
(file)
--- a/
src/script/common/c_content.cpp
+++ b/
src/script/common/c_content.cpp
@@
-2043,6
+2043,9
@@
void push_collision_move_result(lua_State *L, const collisionMoveResult &res)
if (c.type == COLLISION_NODE) {
push_v3s16(L, c.node_p);
lua_setfield(L, -2, "node_pos");
+ } else if (c.type == COLLISION_OBJECT) {
+ push_objectRef(L, c.object->getId());
+ lua_setfield(L, -2, "object");
}
push_v3f(L, c.old_speed / BS);