diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-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 fd03e93..e7056ba 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -690,7 +690,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
690 | Utils.LongToUInts(handle, out x, out y); | 690 | Utils.LongToUInts(handle, out x, out y); |
691 | x = x / Constants.RegionSize; | 691 | x = x / Constants.RegionSize; |
692 | y = y / Constants.RegionSize; | 692 | y = y / Constants.RegionSize; |
693 | if (Util.IsOutsideView(x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY)) | 693 | if (Util.IsOutsideView(DrawDistance, x, Scene.RegionInfo.RegionLocX, y, Scene.RegionInfo.RegionLocY)) |
694 | { | 694 | { |
695 | old.Add(handle); | 695 | old.Add(handle); |
696 | } | 696 | } |
@@ -764,6 +764,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
764 | 764 | ||
765 | private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this() | 765 | private ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo) : this() |
766 | { | 766 | { |
767 | m_DrawDistance = world.DefaultDrawDistance; | ||
767 | m_rootRegionHandle = reginfo.RegionHandle; | 768 | m_rootRegionHandle = reginfo.RegionHandle; |
768 | m_controllingClient = client; | 769 | m_controllingClient = client; |
769 | m_firstname = m_controllingClient.FirstName; | 770 | m_firstname = m_controllingClient.FirstName; |
@@ -1429,7 +1430,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1429 | m_CameraUpAxis = agentData.CameraUpAxis; | 1430 | m_CameraUpAxis = agentData.CameraUpAxis; |
1430 | 1431 | ||
1431 | // The Agent's Draw distance setting | 1432 | // The Agent's Draw distance setting |
1432 | m_DrawDistance = agentData.Far; | 1433 | // When we get to the point of re-computing neighbors everytime this |
1434 | // changes, then start using the agent's drawdistance rather than the | ||
1435 | // region's draw distance. | ||
1436 | // m_DrawDistance = agentData.Far; | ||
1437 | m_DrawDistance = Scene.DefaultDrawDistance; | ||
1433 | 1438 | ||
1434 | // Check if Client has camera in 'follow cam' or 'build' mode. | 1439 | // Check if Client has camera in 'follow cam' or 'build' mode. |
1435 | Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); | 1440 | Vector3 camdif = (Vector3.One * m_bodyRot - Vector3.One * CameraRotation); |
@@ -3289,7 +3294,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3289 | 3294 | ||
3290 | //m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); | 3295 | //m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); |
3291 | //m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); | 3296 | //m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); |
3292 | if (Util.IsOutsideView(x, newRegionX, y, newRegionY)) | 3297 | if (Util.IsOutsideView(DrawDistance, x, newRegionX, y, newRegionY)) |
3293 | { | 3298 | { |
3294 | byebyeRegions.Add(handle); | 3299 | byebyeRegions.Add(handle); |
3295 | } | 3300 | } |
@@ -3365,7 +3370,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
3365 | 3370 | ||
3366 | Vector3 offset = new Vector3(shiftx, shifty, 0f); | 3371 | Vector3 offset = new Vector3(shiftx, shifty, 0f); |
3367 | 3372 | ||
3368 | m_DrawDistance = cAgentData.Far; | 3373 | // When we get to the point of re-computing neighbors everytime this |
3374 | // changes, then start using the agent's drawdistance rather than the | ||
3375 | // region's draw distance. | ||
3376 | // m_DrawDistance = cAgentData.Far; | ||
3377 | m_DrawDistance = Scene.DefaultDrawDistance; | ||
3378 | |||
3369 | if (cAgentData.Position != new Vector3(-1f, -1f, -1f)) // UGH!! | 3379 | if (cAgentData.Position != new Vector3(-1f, -1f, -1f)) // UGH!! |
3370 | m_pos = cAgentData.Position + offset; | 3380 | m_pos = cAgentData.Position + offset; |
3371 | 3381 | ||
@@ -3516,7 +3526,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
3516 | m_CameraLeftAxis = cAgent.LeftAxis; | 3526 | m_CameraLeftAxis = cAgent.LeftAxis; |
3517 | m_CameraUpAxis = cAgent.UpAxis; | 3527 | m_CameraUpAxis = cAgent.UpAxis; |
3518 | 3528 | ||
3519 | m_DrawDistance = cAgent.Far; | 3529 | // When we get to the point of re-computing neighbors everytime this |
3530 | // changes, then start using the agent's drawdistance rather than the | ||
3531 | // region's draw distance. | ||
3532 | // m_DrawDistance = cAgent.Far; | ||
3533 | m_DrawDistance = Scene.DefaultDrawDistance; | ||
3520 | 3534 | ||
3521 | if ((cAgent.Throttles != null) && cAgent.Throttles.Length > 0) | 3535 | if ((cAgent.Throttles != null) && cAgent.Throttles.Length > 0) |
3522 | ControllingClient.SetChildAgentThrottle(cAgent.Throttles); | 3536 | ControllingClient.SetChildAgentThrottle(cAgent.Throttles); |