summaryrefslogtreecommitdiff
path: root/src/scriptapi_types.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/scriptapi_types.cpp')
-rw-r--r--src/scriptapi_types.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/scriptapi_types.cpp b/src/scriptapi_types.cpp
index 01a9b3bc3..f30451108 100644
--- a/src/scriptapi_types.cpp
+++ b/src/scriptapi_types.cpp
@@ -42,6 +42,15 @@ void push_v3f(lua_State *L, v3f p)
lua_setfield(L, -2, "z");
}
+void push_v2f(lua_State *L, v2f p)
+{
+ lua_newtable(L);
+ lua_pushnumber(L, p.X);
+ lua_setfield(L, -2, "x");
+ lua_pushnumber(L, p.Y);
+ lua_setfield(L, -2, "y");
+}
+
v2s16 read_v2s16(lua_State *L, int index)
{
v2s16 p;