diff options
author | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2019-11-28 12:30:21 +0100 |
---|---|---|
committer | Gabriel Pérez-Cerezo <gabriel@gpcf.eu> | 2019-11-28 12:30:21 +0100 |
commit | ddab98412f3fc47eedfa74f8a4edafd324e59707 (patch) | |
tree | 7087657e4b9d90e2e0559bfdc25cf2b3b52e51fe /src/script/common | |
parent | 6dc7177a5de51f1329c1be04e7f07be64d5cc76c (diff) | |
download | minetest-lifo-fixes.tar.gz minetest-lifo-fixes.tar.bz2 minetest-lifo-fixes.zip |
Add static_save and prevent UDP connect exhaustionslifo-fixes
This merges two pull requests from 5.0
Diffstat (limited to 'src/script/common')
-rw-r--r-- | src/script/common/c_content.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/script/common/c_content.cpp b/src/script/common/c_content.cpp index c0e29abf0..24b84e0d0 100644 --- a/src/script/common/c_content.cpp +++ b/src/script/common/c_content.cpp @@ -273,7 +273,10 @@ void read_object_properties(lua_State *L, int index, prop->automatic_face_movement_max_rotation_per_sec = luaL_checknumber(L, -1); } lua_pop(L, 1); + getstringfield(L, -1, "infotext", prop->infotext); + getboolfield(L, -1, "static_save", prop->static_save); + lua_getfield(L, -1, "wield_item"); if (!lua_isnil(L, -1)) prop->wield_item = read_item(L, -1, idef).getItemString(); @@ -346,6 +349,8 @@ void push_object_properties(lua_State *L, ObjectProperties *prop) lua_setfield(L, -2, "automatic_face_movement_max_rotation_per_sec"); lua_pushlstring(L, prop->infotext.c_str(), prop->infotext.size()); lua_setfield(L, -2, "infotext"); + lua_pushboolean(L, prop->static_save); + lua_setfield(L, -2, "static_save"); lua_pushlstring(L, prop->wield_item.c_str(), prop->wield_item.size()); lua_setfield(L, -2, "wield_item"); } |