aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-02 11:22:09 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-02 11:22:09 +0200
commit34fd47887e72ab0a3f065b649c2dc1c92244ef80 (patch)
tree031b2885ea5c6d3b371a965b62a5ccf199eb0527
parent2dc9a0c724dafde4a4858060268f3bec1b7cb720 (diff)
downloadminetest-34fd47887e72ab0a3f065b649c2dc1c92244ef80.tar.gz
minetest-34fd47887e72ab0a3f065b649c2dc1c92244ef80.tar.bz2
minetest-34fd47887e72ab0a3f065b649c2dc1c92244ef80.zip
Make unlimited player transfer distance configurable
-rw-r--r--minetest.conf.example2
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/serverremoteplayer.cpp2
3 files changed, 4 insertions, 1 deletions
diff --git a/minetest.conf.example b/minetest.conf.example
index fad3716d2..cf27acfac 100644
--- a/minetest.conf.example
+++ b/minetest.conf.example
@@ -131,6 +131,8 @@
#default_password =
# Available privileges: build, teleport, settime, privs, shout
#default_privs = build, shout
+# Whether players are transferred to client without any range limit
+#unlimited_player_transfer_distance = true
# Profiler data print interval. #0 = disable.
#profiler_print_interval = 0
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index 97adf0da6..be63fb870 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -93,6 +93,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("give_initial_stuff", "false");
settings->setDefault("default_password", "");
settings->setDefault("default_privs", "build, shout");
+ settings->setDefault("unlimited_player_transfer_distance", "true");
settings->setDefault("profiler_print_interval", "0");
settings->setDefault("enable_mapgen_debug_info", "false");
diff --git a/src/serverremoteplayer.cpp b/src/serverremoteplayer.cpp
index c5033da50..bff414e1a 100644
--- a/src/serverremoteplayer.cpp
+++ b/src/serverremoteplayer.cpp
@@ -88,7 +88,7 @@ void ServerRemotePlayer::removingFromEnvironment()
bool ServerRemotePlayer::unlimitedTransferDistance() const
{
- return true;
+ return g_settings->getBool("unlimited_player_transfer_distance");
}
void ServerRemotePlayer::step(float dtime, bool send_recommended)