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

Default server step to 0.1s and sync object/player update intervals to it

This commit is contained in:
Perttu Ahola 2012-11-26 22:31:21 +02:00
parent ffad18e424
commit 6b927229f5
8 changed files with 29 additions and 9 deletions

View file

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