diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 51b8dcc..9e9481e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -626,7 +626,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
626 | Utils.LongToUInts(handle, out x, out y); | 626 | Utils.LongToUInts(handle, out x, out y); |
627 | x = x / Constants.RegionSize; | 627 | x = x / Constants.RegionSize; |
628 | y = y / Constants.RegionSize; | 628 | y = y / Constants.RegionSize; |
629 | if (Util.IsOutsideView(x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY)) | 629 | if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY)) |
630 | { | 630 | { |
631 | old.Add(handle); | 631 | old.Add(handle); |
632 | } | 632 | } |
@@ -700,6 +700,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
700 | 700 | ||
701 | private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this() | 701 | private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this() |
702 | { | 702 | { |
703 | m_DrawDistance = world.DefaultDrawDistance; | ||
703 | m_rootRegionHandle = reginfo.RegionHandle; | 704 | m_rootRegionHandle = reginfo.RegionHandle; |
704 | m_controllingClient = client; | 705 | m_controllingClient = client; |
705 | m_firstname = m_controllingClient.FirstName; | 706 | m_firstname = m_controllingClient.FirstName; |
@@ -1279,7 +1280,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1279 | m_CameraUpAxis = agentData.CameraUpAxis; | 1280 | m_CameraUpAxis = agentData.CameraUpAxis; |
1280 | 1281 | ||
1281 | // The Agent's Draw distance setting | 1282 | // The Agent's Draw distance setting |
1282 | m_DrawDistance = agentData.Far; | 1283 | // When we get to the point of re-computing neighbors everytime this |
1284 | // changes, then start using the agent's drawdistance rather than the | ||
1285 | // region's draw distance. | ||
1286 | // m_DrawDistance = agentData.Far; | ||
1287 | m_DrawDistance = Scene.DefaultDrawDistance; | ||
1283 | 1288 | ||
1284 | // Check if Client has camera in 'follow cam' or 'build' mode. | 1289 | // Check if Client has camera in 'follow cam' or 'build' mode. |
1285 | Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); | 1290 | Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); |
@@ -2913,7 +2918,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2913 | 2918 | ||
2914 | //m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); | 2919 | //m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); |
2915 | //m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); | 2920 | //m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); |
2916 | if (Util.IsOutsideView(x, newRegionX, y, newRegionY)) | 2921 | if (Util.IsOutsideView(DrawDistance, x, newRegionX, y, newRegionY)) |
2917 | { | 2922 | { |
2918 | byebyeRegions.Add(handle); | 2923 | byebyeRegions.Add(handle); |
2919 | } | 2924 | } |
@@ -2989,7 +2994,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2989 | 2994 | ||
2990 | Vector3 offset = new Vector3(shiftx, shifty, 0f); | 2995 | Vector3 offset = new Vector3(shiftx, shifty, 0f); |
2991 | 2996 | ||
2992 | m_DrawDistance = cAgentData.Far; | 2997 | // When we get to the point of re-computing neighbors everytime this |
2998 | // changes, then start using the agent's drawdistance rather than the | ||
2999 | // region's draw distance. | ||
3000 | // m_DrawDistance = cAgentData.Far; | ||
3001 | m_DrawDistance = Scene.DefaultDrawDistance; | ||
3002 | |||
2993 | if (cAgentData.Position != new Vector3(-1f, -1f, -1f)) // UGH!! | 3003 | if (cAgentData.Position != new Vector3(-1f, -1f, -1f)) // UGH!! |
2994 | m_pos = cAgentData.Position + offset; | 3004 | m_pos = cAgentData.Position + offset; |
2995 | 3005 | ||
@@ -3139,7 +3149,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3139 | m_CameraLeftAxis = cAgent.LeftAxis; | 3149 | m_CameraLeftAxis = cAgent.LeftAxis; |
3140 | m_CameraUpAxis = cAgent.UpAxis; | 3150 | m_CameraUpAxis = cAgent.UpAxis; |
3141 | 3151 | ||
3142 | m_DrawDistance = cAgent.Far; | 3152 | // When we get to the point of re-computing neighbors everytime this |
3153 | // changes, then start using the agent's drawdistance rather than the | ||
3154 | // region's draw distance. | ||
3155 | // m_DrawDistance = cAgent.Far; | ||
3156 | m_DrawDistance = Scene.DefaultDrawDistance; | ||
3143 | 3157 | ||
3144 | if ((cAgent.Throttles != null) && cAgent.Throttles.Length > 0) | 3158 | if ((cAgent.Throttles != null) && cAgent.Throttles.Length > 0) |
3145 | ControllingClient.SetChildAgentThrottle(cAgent.Throttles); | 3159 | ControllingClient.SetChildAgentThrottle(cAgent.Throttles); |