aboutsummaryrefslogtreecommitdiff
path: root/src/script/common
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-04-26 22:52:00 +0200
committersfan5 <sfan5@live.de>2020-05-06 14:03:52 +0200
commitb6b80f55c8a2bf4eae440108b3274f2f921e3a94 (patch)
treebc76782c07a335aded232fd49616d93e66c591df /src/script/common
parentcb159f8d8af4556391db8a6875657625733eeb11 (diff)
downloadminetest-b6b80f55c8a2bf4eae440108b3274f2f921e3a94.tar.gz
minetest-b6b80f55c8a2bf4eae440108b3274f2f921e3a94.tar.bz2
minetest-b6b80f55c8a2bf4eae440108b3274f2f921e3a94.zip
Expose collided objects in moveresult
closes #9787
Diffstat (limited to 'src/script/common')
-rw-r--r--src/script/common/c_content.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 95364000c..dac828316 100644
--- 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);