From 9c669016d1578a5c62f932c6ccb7a2b4b1e21f0a Mon Sep 17 00:00:00 2001 From: Lars Hofhansl Date: Wed, 6 Dec 2017 12:21:46 -0800 Subject: Add an active object step time budget #6721 This can be set via the active_object_interval option. --- src/serverenvironment.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/serverenvironment.h') diff --git a/src/serverenvironment.h b/src/serverenvironment.h index cb813155d..a15d87ee2 100644 --- a/src/serverenvironment.h +++ b/src/serverenvironment.h @@ -422,8 +422,11 @@ private: ActiveBlockList m_active_blocks; IntervalLimiter m_active_blocks_management_interval; IntervalLimiter m_active_block_modifier_interval; + IntervalLimiter m_active_object_interval; IntervalLimiter m_active_blocks_nodemetadata_interval; - int m_active_block_interval_overload_skip = 0; + float m_active_block_interval_overload_skip = 1.0f; + float m_active_object_interval_overload_skip = 1.0f; + float m_avg_ao_time = 0.0f; // Time from the beginning of the game in seconds. // Incremented in step(). u32 m_game_time = 0; -- cgit v1.2.3