]> git.lizzy.rs Git - minetest.git/blobdiff - src/mapblock.h
Add a setting to enable always flying fast
[minetest.git] / src / mapblock.h
index 7f901e5d35ec24ca48663f6556e7021310383c4e..d56d93ddae8e41c5ee0b776f0411fa9445ac9fc2 100644 (file)
@@ -430,6 +430,22 @@ class MapBlock /*: public NodeContainer*/
        {
                return m_usage_timer;
        }
+
+       /*
+               See m_refcount
+       */
+       void refGrab()
+       {
+               m_refcount++;
+       }
+       void refDrop()
+       {
+               m_refcount--;
+       }
+       int refGet()
+       {
+               return m_refcount;
+       }
        
        /*
                Node Timers
@@ -566,6 +582,12 @@ class MapBlock /*: public NodeContainer*/
                Map will unload the block when this reaches a timeout.
        */
        float m_usage_timer;
+
+       /*
+               Reference count; currently used for determining if this block is in
+               the list of blocks to be drawn.
+       */
+       int m_refcount;
 };
 
 inline bool blockpos_over_limit(v3s16 p)