diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-11-26 22:31:21 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-11-26 22:34:59 +0200 |
commit | 6b927229f5f9cb9a8163ecec482160975199fa0f (patch) | |
tree | 60f5012621d87344b1ed8d2ea35a6126080fff8e /src/environment.cpp | |
parent | ffad18e42442fed10c312adc989fc62b74e05896 (diff) | |
download | minetest-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.cpp | 8 |
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 */ |