]> git.lizzy.rs Git - minetest.git/blobdiff - src/scriptapi_types.cpp
Grow dirt_with_snow instead of dirt_with_grass if snow is above it
[minetest.git] / src / scriptapi_types.cpp
index 01a9b3bc3bc9c8d2219151afad83ec5b1719cff5..f304511080c57c2fda5b7e504a84cf15da265bf0 100644 (file)
@@ -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;