From c40e993ce4a13321e57856fb40566fa93a5ef187 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 8 Nov 2014 14:35:55 +0100 Subject: Replace setting unlimited_player_transfer_distance with player_transfer_distance --- src/server.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/server.cpp') diff --git a/src/server.cpp b/src/server.cpp index 2558d0d6f..7be1f5860 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -707,7 +707,14 @@ void Server::AsyncRunStep(bool initial_step) // Radius inside which objects are active s16 radius = g_settings->getS16("active_object_send_range_blocks"); + s16 player_radius = g_settings->getS16("player_transfer_distance"); + + if (player_radius == 0 && g_settings->exists("unlimited_player_transfer_distance") && + !g_settings->getBool("unlimited_player_transfer_distance")) + player_radius = radius; + radius *= MAP_BLOCKSIZE; + player_radius *= MAP_BLOCKSIZE; for(std::map::iterator i = clients.begin(); @@ -733,9 +740,9 @@ void Server::AsyncRunStep(bool initial_step) std::set removed_objects; std::set added_objects; - m_env->getRemovedActiveObjects(pos, radius, + m_env->getRemovedActiveObjects(pos, radius, player_radius, client->m_known_objects, removed_objects); - m_env->getAddedActiveObjects(pos, radius, + m_env->getAddedActiveObjects(pos, radius, player_radius, client->m_known_objects, added_objects); // Ignore if nothing happened -- cgit v1.2.3