aboutsummaryrefslogtreecommitdiff
path: root/src/mapblock.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mapblock.h')
-rw-r--r--src/mapblock.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/mapblock.h b/src/mapblock.h
index 7f901e5d3..d56d93dda 100644
--- a/src/mapblock.h
+++ b/src/mapblock.h
@@ -430,6 +430,22 @@ public:
{
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 @@ private:
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)