aboutsummaryrefslogtreecommitdiff
path: root/src/environment.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-11-26 22:31:21 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-11-26 22:34:59 +0200
commit6b927229f5f9cb9a8163ecec482160975199fa0f (patch)
tree60f5012621d87344b1ed8d2ea35a6126080fff8e /src/environment.cpp
parentffad18e42442fed10c312adc989fc62b74e05896 (diff)
downloadminetest-6b927229f5f9cb9a8163ecec482160975199fa0f.tar.gz
minetest-6b927229f5f9cb9a8163ecec482160975199fa0f.tar.bz2
minetest-6b927229f5f9cb9a8163ecec482160975199fa0f.zip
Default server step to 0.1s and sync object/player update intervals to it
Diffstat (limited to 'src/environment.cpp')
-rw-r--r--src/environment.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/environment.cpp b/src/environment.cpp
index b8e037376..e70cb39b7 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -329,7 +329,8 @@ ServerEnvironment::ServerEnvironment(ServerMap *map, lua_State *L,
m_send_recommended_timer(0),
m_active_block_interval_overload_skip(0),
m_game_time(0),
- m_game_time_fraction_counter(0)
+ m_game_time_fraction_counter(0),
+ m_recommended_send_interval(0.1)
{
}
@@ -940,6 +941,11 @@ void ServerEnvironment::step(float dtime)
/* Step time of day */
stepTimeOfDay(dtime);
+ // Update this one
+ // NOTE: This is kind of funny on a singleplayer game, but doesn't
+ // really matter that much.
+ m_recommended_send_interval = g_settings->getFloat("dedicated_server_step");
+
/*
Increment game time
*/