1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Handle ActiveBlockModifier intervals properly, down to 1s

This commit is contained in:
Perttu Ahola 2011-11-28 10:33:47 +02:00
parent 0f2b932e92
commit fadf248892
2 changed files with 36 additions and 14 deletions

View file

@ -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