- bool is_underground;
-
- MapBlockObjectList m_objects;
-
- // Temporary modifications to nodes
- // These are only used when drawing
- core::map<v3s16, NodeMod> m_temp_mods;
+ bool is_underground = false;
+
+ /*!
+ * Each bit indicates if light spreading was finished
+ * in a direction. (Because the neighbor could also be unloaded.)
+ * Bits (most significant first):
+ * nothing, nothing, nothing, nothing,
+ * night X-, night Y-, night Z-, night Z+, night Y+, night X+,
+ * day X-, day Y-, day Z-, day Z+, day Y+, day X+.
+ */
+ u16 m_lighting_complete = 0xFFFF;
+
+ // Whether day and night lighting differs
+ bool m_day_night_differs = false;
+ bool m_day_night_differs_expired = true;
+
+ bool m_generated = false;
+
+ /*
+ When block is removed from active blocks, this is set to gametime.
+ Value BLOCK_TIMESTAMP_UNDEFINED=0xffffffff means there is no timestamp.
+ */
+ u32 m_timestamp = BLOCK_TIMESTAMP_UNDEFINED;
+ // The on-disk (or to-be on-disk) timestamp value
+ u32 m_disk_timestamp = BLOCK_TIMESTAMP_UNDEFINED;
+
+ /*
+ When the block is accessed, this is set to 0.
+ Map will unload the block when this reaches a timeout.
+ */
+ float m_usage_timer = 0;
+
+ /*
+ Reference count; currently used for determining if this block is in
+ the list of blocks to be drawn.
+ */
+ int m_refcount = 0;