From cd6becd442a50a6e2f7129108e1c2c495f885764 Mon Sep 17 00:00:00 2001 From: darkrose Date: Tue, 17 Jul 2012 23:00:04 +1000 Subject: Implement node timers --- src/mapblock.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/mapblock.h') diff --git a/src/mapblock.h b/src/mapblock.h index 08fd2c754..adb3324f6 100644 --- a/src/mapblock.h +++ b/src/mapblock.h @@ -430,6 +430,26 @@ public: { return m_usage_timer; } + + /* + Node Timers + */ + // Get timer + NodeTimer getNodeTimer(v3s16 p){ + return m_node_timers.get(p); + } + // Deletes timer + void removeNodeTimer(v3s16 p){ + m_node_timers.remove(p); + } + // Deletes old timer and sets a new one + void setNodeTimer(v3s16 p, NodeTimer t){ + m_node_timers.set(p,t); + } + // Deletes all timers + void clearNodeTimers(){ + m_node_timers.clear(); + } /* Serialization -- cgit v1.2.3