1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Preliminary "active block" stuff + set up test code to grow grass.

This commit is contained in:
Perttu Ahola 2011-05-22 17:00:09 +03:00
parent af7d50e910
commit 0af5311538
14 changed files with 848 additions and 383 deletions

View file

@ -106,8 +106,13 @@ public:
*/
virtual u16 punch(const std::string &toolname){return 0;}
// Number of players which know about this object
/*
Number of players which know about this object. Object won't be
deleted until this is 0 to keep the id preserved for the right
object.
*/
u16 m_known_by_count;
/*
- Whether this object is to be removed when nobody knows about
it anymore.
@ -119,6 +124,16 @@ public:
*/
bool m_removed;
/*
This is set to true when a block should be removed from the active
object list but couldn't be removed because the id has to be
reserved for some client.
The environment checks this periodically. If this is true and also
m_known_by_count is true,
*/
bool m_pending_deactivation;
/*
Whether the object's static data has been stored to a block
*/