mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 00:25:19 +02:00
Improve ABM time budget handling. #8645
This commit is contained in:
@@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
#include "server/activeobjectmgr.h"
|
||||
#include "util/numeric.h"
|
||||
#include <set>
|
||||
#include <random>
|
||||
|
||||
class IGameDef;
|
||||
class ServerMap;
|
||||
@@ -446,7 +447,6 @@ private:
|
||||
IntervalLimiter m_active_blocks_management_interval;
|
||||
IntervalLimiter m_active_block_modifier_interval;
|
||||
IntervalLimiter m_active_blocks_nodemetadata_interval;
|
||||
int m_active_block_interval_overload_skip = 0;
|
||||
// Time from the beginning of the game in seconds.
|
||||
// Incremented in step().
|
||||
u32 m_game_time = 0;
|
||||
@@ -470,6 +470,9 @@ private:
|
||||
PlayerDatabase *m_player_database = nullptr;
|
||||
AuthDatabase *m_auth_database = nullptr;
|
||||
|
||||
// Pseudo random generator for shuffling, etc.
|
||||
std::mt19937 m_rgen;
|
||||
|
||||
// Particles
|
||||
IntervalLimiter m_particle_management_interval;
|
||||
std::unordered_map<u32, float> m_particle_spawners;
|
||||
|
Reference in New Issue
Block a user