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

Remove or restrict some client settings (#15633)

This commit is contained in:
sfan5 2025-01-08 10:56:45 +01:00 committed by GitHub
parent 41f7031e49
commit e5542e5b02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 48 additions and 128 deletions

View file

@ -650,9 +650,10 @@ void Server::AsyncRunStep(float dtime, bool initial_step)
Send to clients at constant intervals
*/
static const float time_send_interval = 5.0f;
m_time_of_day_send_timer -= dtime;
if (m_time_of_day_send_timer < 0.0) {
m_time_of_day_send_timer = g_settings->getFloat("time_send_interval");
if (m_time_of_day_send_timer < 0) {
m_time_of_day_send_timer = time_send_interval;
u16 time = m_env->getTimeOfDay();
float time_speed = g_settings->getFloat("time_speed");
SendTimeOfDay(PEER_ID_INEXISTENT, time, time_speed);