diff options
author | orwell96 <mono96.mml@gmail.com> | 2017-09-28 17:11:51 +0200 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-09-28 17:11:51 +0200 |
commit | 08846cd05cd402cc7f8d025aaba96c5bb0aade2c (patch) | |
tree | 5c77ab4c23397bcb36bc9add361605296dcd3e0f /src/content_sao.h | |
parent | 2afe62952c52e9dc9cbd413db9a316ae4359c331 (diff) | |
download | minetest-08846cd05cd402cc7f8d025aaba96c5bb0aade2c.tar.gz minetest-08846cd05cd402cc7f8d025aaba96c5bb0aade2c.tar.bz2 minetest-08846cd05cd402cc7f8d025aaba96c5bb0aade2c.zip |
Add static_save property to luaentites to not save them statically. (#5112)
* Add no_static_save property to luaentites to not save them statically.
This allows for temporary objects that would get deleted anyway as soon as they are loaded again without the static saving overhead.
* Use positive meaning for static_save object property
* Invert meaning also for the LUA parameter
Note: getboolfield() does not change &result when field does not exist, so it defaults to the default value in the header file, which is 'true'.
* Extend push_object_properties()
Diffstat (limited to 'src/content_sao.h')
-rw-r--r-- | src/content_sao.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/content_sao.h b/src/content_sao.h index b62551f51..683a2fb5f 100644 --- a/src/content_sao.h +++ b/src/content_sao.h @@ -105,6 +105,8 @@ public: const std::string &data); void step(float dtime, bool send_recommended); std::string getClientInitializationData(u16 protocol_version); + bool isStaticAllowed() const + { return m_prop.static_save; } void getStaticData(std::string *result) const; int punch(v3f dir, const ToolCapabilities *toolcap=NULL, |