From: Perttu Ahola Date: Fri, 2 Dec 2011 09:22:09 +0000 (+0200) Subject: Make unlimited player transfer distance configurable X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=34fd47887e72ab0a3f065b649c2dc1c92244ef80;p=zefram%2Fminetest%2Fminetest_engine.git Make unlimited player transfer distance configurable --- diff --git a/minetest.conf.example b/minetest.conf.example index fad3716d..cf27acfa 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 97adf0da..be63fb87 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 c5033da5..bff414e1 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)