projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add congestion control settings to minetest.conf
[oweals/minetest.git]
/
src
/
environment.cpp
diff --git
a/src/environment.cpp
b/src/environment.cpp
index 889990ca5dc5189b26fe607734befb84f6c8c162..e70cb39b784d42a38a6e93f118e408a9e3c3e5f9 100644
(file)
--- a/
src/environment.cpp
+++ b/
src/environment.cpp
@@
-43,6
+43,7
@@
with this program; if not, write to the Free Software Foundation, Inc.,
#endif
#include "daynightratio.h"
#include "map.h"
#endif
#include "daynightratio.h"
#include "map.h"
+#include "util/serialize.h"
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
#define PP(x) "("<<(x).X<<","<<(x).Y<<","<<(x).Z<<")"
@@
-328,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_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)
{
}
{
}
@@
-939,6
+941,11
@@
void ServerEnvironment::step(float dtime)
/* Step time of day */
stepTimeOfDay(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
*/
/*
Increment game time
*/