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:
parent
ffad18e424
commit
6b927229f5
8 changed files with 29 additions and 9 deletions
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue