varregion: More tweeking to only sending patches within avatar draw distance.

Still has problems with child avatars.
This commit is contained in:
Robert Adams
2014-03-20 22:10:27 -07:00
parent db5a42ffac
commit 22dade6463
3 changed files with 20 additions and 18 deletions

View File

@@ -873,7 +873,8 @@ namespace OpenSim.Region.Framework.Scenes
m_sendCoarseLocationsMethod = SendCoarseLocationsDefault;
Animator = new ScenePresenceAnimator(this);
PresenceType = type;
DrawDistance = world.DefaultDrawDistance;
// DrawDistance = world.DefaultDrawDistance;
DrawDistance = Constants.RegionSize;
RegionHandle = world.RegionInfo.RegionHandle;
ControllingClient = client;
Firstname = ControllingClient.FirstName;
@@ -1918,8 +1919,8 @@ namespace OpenSim.Region.Framework.Scenes
// When we get to the point of re-computing neighbors everytime this
// changes, then start using the agent's drawdistance rather than the
// region's draw distance.
// DrawDistance = agentData.Far;
DrawDistance = Scene.DefaultDrawDistance;
DrawDistance = agentData.Far;
// DrawDistance = Scene.DefaultDrawDistance;
m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0;
m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0;
@@ -2277,8 +2278,8 @@ namespace OpenSim.Region.Framework.Scenes
// When we get to the point of re-computing neighbors everytime this
// changes, then start using the agent's drawdistance rather than the
// region's draw distance.
// DrawDistance = agentData.Far;
DrawDistance = Scene.DefaultDrawDistance;
DrawDistance = agentData.Far;
// DrawDistance = Scene.DefaultDrawDistance;
// Check if Client has camera in 'follow cam' or 'build' mode.
Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation);
@@ -3824,8 +3825,8 @@ namespace OpenSim.Region.Framework.Scenes
// When we get to the point of re-computing neighbors everytime this
// changes, then start using the agent's drawdistance rather than the
// region's draw distance.
// DrawDistance = cAgentData.Far;
DrawDistance = Scene.DefaultDrawDistance;
DrawDistance = cAgentData.Far;
// DrawDistance = Scene.DefaultDrawDistance;
if (cAgentData.Position != marker) // UGH!!
m_pos = cAgentData.Position + offset;
@@ -3935,8 +3936,8 @@ namespace OpenSim.Region.Framework.Scenes
// When we get to the point of re-computing neighbors everytime this
// changes, then start using the agent's drawdistance rather than the
// region's draw distance.
// DrawDistance = cAgent.Far;
DrawDistance = Scene.DefaultDrawDistance;
DrawDistance = cAgent.Far;
// DrawDistance = Scene.DefaultDrawDistance;
if ((cAgent.Throttles != null) && cAgent.Throttles.Length > 0)
ControllingClient.SetChildAgentThrottle(cAgent.Throttles);