summaryrefslogtreecommitdiff
path: root/src/environment.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-28 10:33:47 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:57 +0200
commitfadf248892eae825b57d283032594ed924d8dbea (patch)
tree79a2b449f8b1bcdaf61af8f62834ecc380d81fe3 /src/environment.h
parent0f2b932e9205a4f6cf49accad00835999b379a0c (diff)
downloadminetest-fadf248892eae825b57d283032594ed924d8dbea.tar.gz
minetest-fadf248892eae825b57d283032594ed924d8dbea.tar.bz2
minetest-fadf248892eae825b57d283032594ed924d8dbea.zip
Handle ActiveBlockModifier intervals properly, down to 1s
Diffstat (limited to 'src/environment.h')
-rw-r--r--src/environment.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/environment.h b/src/environment.h
index a3418dbd4..a8b51ae3f 100644
--- a/src/environment.h
+++ b/src/environment.h
@@ -118,6 +118,16 @@ public:
u32 active_object_count, u32 active_object_count_wider){};
};
+struct ABMWithState
+{
+ ActiveBlockModifier *abm;
+ float timer;
+
+ ABMWithState(ActiveBlockModifier *abm_):
+ abm(abm_)
+ {}
+};
+
/*
List of active blocks, used by ServerEnvironment
*/
@@ -329,7 +339,7 @@ private:
u32 m_game_time;
// A helper variable for incrementing the latter
float m_game_time_fraction_counter;
- core::list<ActiveBlockModifier*> m_abms;
+ core::list<ABMWithState> m_abms;
};
#ifndef SERVER