summaryrefslogtreecommitdiff
path: root/src/script/cpp_api
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/cpp_api')
-rw-r--r--src/script/cpp_api/s_item.cpp4
-rw-r--r--src/script/cpp_api/s_item.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/src/script/cpp_api/s_item.cpp b/src/script/cpp_api/s_item.cpp
index 94abe267b..cbdfcf1b1 100644
--- a/src/script/cpp_api/s_item.cpp
+++ b/src/script/cpp_api/s_item.cpp
@@ -255,10 +255,10 @@ bool ScriptApiItem::getItemCallback(const char *name, const char *callbackname,
return false;
}
-void ScriptApiItem::pushPointedThing(const PointedThing& pointed)
+void ScriptApiItem::pushPointedThing(const PointedThing &pointed, bool hitpoint)
{
lua_State* L = getStack();
- push_pointed_thing(L, pointed);
+ push_pointed_thing(L, pointed, false, hitpoint);
}
diff --git a/src/script/cpp_api/s_item.h b/src/script/cpp_api/s_item.h
index d91b5c1d6..6c7f286a9 100644
--- a/src/script/cpp_api/s_item.h
+++ b/src/script/cpp_api/s_item.h
@@ -54,6 +54,10 @@ protected:
friend class LuaRaycast;
bool getItemCallback(const char *name, const char *callbackname, const v3s16 *p = nullptr);
- void pushPointedThing(const PointedThing& pointed);
+ /*!
+ * Pushes a `pointed_thing` tabe to the stack.
+ * \param hitpoint If true, the exact pointing location is also pushed
+ */
+ void pushPointedThing(const PointedThing &pointed, bool hitpoint = false);
};