Make unlimited player transfer distance configurable
authorPerttu Ahola <celeron55@gmail.com>
Fri, 2 Dec 2011 09:22:09 +0000 (11:22 +0200)
committerPerttu Ahola <celeron55@gmail.com>
Fri, 2 Dec 2011 09:22:09 +0000 (11:22 +0200)
minetest.conf.example
src/defaultsettings.cpp
src/serverremoteplayer.cpp

index fad3716d23c16777d9550ceae619ab84094c7723..cf27acfac1a05bdeffd75dac2670a85a6005935c 100644 (file)
 #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
index 97adf0da60f48fbf50fcfc40fee0087ff887630d..be63fb8706b766d10f4977aadc13576593d9c1e5 100644 (file)
@@ -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");
index c5033da50fec906733b50b6f7d773e5d1430268c..bff414e1a96756dce77e5b35502e81441bf0a85e 100644 (file)
@@ -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)