From 4e3a2d3a64817e41bda18f4d39ca7e6940c69d98 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 4 Jul 2014 10:13:53 -0700 Subject: It turns out that child agent management has had a bug for a while: there was an inconsistency in the scope between opening and closing child agents in neighboring regions. For opening (in EnableChildAgents), the region's DrawDistance was being used; for closing (in IsOUtsideView) , the viewer's (SP) DrawDistance was being used. This fixes this inconsistency, therefore eliminating bugs observed in TPs between, at least, neighboring varregions. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 37353c1..17f6301 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3733,7 +3733,9 @@ namespace OpenSim.Region.Framework.Scenes // m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); // m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); - if (Util.IsOutsideView(DrawDistance, x, newRegionX, y, newRegionY)) + float dist = (float)Math.Max(Scene.DefaultDrawDistance, + (float)Math.Max(Scene.RegionInfo.RegionSizeX, Scene.RegionInfo.RegionSizeY)); + if (Util.IsOutsideView(dist, x, newRegionX, y, newRegionY)) { byebyeRegions.Add(handle); } -- cgit v1.1