aboutsummaryrefslogtreecommitdiff
path: root/src/script/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/common')
-rw-r--r--src/script/common/c_content.cpp5
-rw-r--r--src/script/common/c_content.h3
2 files changed, 3 insertions, 5 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp
index 147f6e3ed..a95cf94a1 100644
--- a/src/script/common/c_content.cpp
+++ b/src/script/common/c_content.cpp
@@ -491,13 +491,11 @@ TileDef read_tiledef(lua_State *L, int index, u8 drawtype)
}
/******************************************************************************/
-ContentFeatures read_content_features(lua_State *L, int index)
+void read_content_features(lua_State *L, ContentFeatures &f, int index)
{
if(index < 0)
index = lua_gettop(L) + 1 + index;
- ContentFeatures f;
-
/* Cache existence of some callbacks */
lua_getfield(L, index, "on_construct");
if(!lua_isnil(L, -1)) f.has_on_construct = true;
@@ -800,7 +798,6 @@ ContentFeatures read_content_features(lua_State *L, int index)
getstringfield(L, index, "node_dig_prediction",
f.node_dig_prediction);
- return f;
}
void push_content_features(lua_State *L, const ContentFeatures &c)
diff --git a/src/script/common/c_content.h b/src/script/common/c_content.h
index 8f32e58eb..29d576355 100644
--- a/src/script/common/c_content.h
+++ b/src/script/common/c_content.h
@@ -67,7 +67,8 @@ struct collisionMoveResult;
extern struct EnumString es_TileAnimationType[];
-ContentFeatures read_content_features (lua_State *L, int index);
+void read_content_features (lua_State *L, ContentFeatures &f,
+ int index);
void push_content_features (lua_State *L,
const ContentFeatures &c);