allow drawdistance to change between 32 and MaxDrawDistance, configurable
value default to 256, so should have no effect. Next steps needed: reduce client udp Throttles with distance, update childreen connections with significat movement and view range changes, Make disconnect be delayed in time, make disconnects be receiving region action not sender on region changes. Allow distance less than 256 to only connect to visible regions, even none. Make this be relative to camera and not agent position or region centers as it is now.avinationmerge
parent
b5e43a4b90
commit
ead78764ab
|
@ -5765,8 +5765,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|| (x.State != m_thisAgentUpdateArgs.State) // significant if Stats changed
|
|| (x.State != m_thisAgentUpdateArgs.State) // significant if Stats changed
|
||||||
|| (qdelta1 < QDELTABody) // significant if body rotation above(below cos) threshold
|
|| (qdelta1 < QDELTABody) // significant if body rotation above(below cos) threshold
|
||||||
// Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
|
// Ignoring head rotation altogether, because it's not being used for anything interesting up the stack
|
||||||
// || (qdelta2 < QDELTAHead) // significant if head rotation above(below cos) threshold
|
// || (qdelta2 < QDELTAHead) // significant if head rotation above(below cos) threshold
|
||||||
|| (x.Far != m_thisAgentUpdateArgs.Far) // significant if far distance changed
|
|| (Math.Abs(x.Far - m_thisAgentUpdateArgs.Far) >= 32) // significant if far distance changed
|
||||||
;
|
;
|
||||||
//if (movementSignificant)
|
//if (movementSignificant)
|
||||||
//{
|
//{
|
||||||
|
|
|
@ -2352,11 +2352,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||||
{
|
{
|
||||||
int dd = avatar.DrawDistance < Constants.RegionSize ? (int)Constants.RegionSize : (int)avatar.DrawDistance;
|
int dd = avatar.DrawDistance < Constants.RegionSize ? (int)Constants.RegionSize : (int)avatar.DrawDistance;
|
||||||
|
|
||||||
int startX = (int)pRegionLocX * (int)Constants.RegionSize - dd + (int)(Constants.RegionSize/2);
|
dd--;
|
||||||
int startY = (int)pRegionLocY * (int)Constants.RegionSize - dd + (int)(Constants.RegionSize/2);
|
|
||||||
|
|
||||||
int endX = (int)pRegionLocX * (int)Constants.RegionSize + dd + (int)(Constants.RegionSize/2);
|
// region center
|
||||||
int endY = (int)pRegionLocY * (int)Constants.RegionSize + dd + (int)(Constants.RegionSize/2);
|
int endX = (int)pRegionLocX * (int)Constants.RegionSize + (int)(Constants.RegionSize / 2);
|
||||||
|
int endY = (int)pRegionLocY * (int)Constants.RegionSize + (int)(Constants.RegionSize / 2);
|
||||||
|
|
||||||
|
int startX = endX - dd;
|
||||||
|
int startY = endY - dd;
|
||||||
|
|
||||||
|
endX += dd;
|
||||||
|
endY += dd;
|
||||||
|
|
||||||
if (startX < 0) startX = 0;
|
if (startX < 0) startX = 0;
|
||||||
if (startY < 0) startY = 0;
|
if (startY < 0) startY = 0;
|
||||||
|
|
|
@ -227,6 +227,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
get { return m_defaultDrawDistance; }
|
get { return m_defaultDrawDistance; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// protected float m_maxDrawDistance = 512.0f;
|
||||||
|
protected float m_maxDrawDistance = 256.0f;
|
||||||
|
public float MaxDrawDistance
|
||||||
|
{
|
||||||
|
get { return m_maxDrawDistance; }
|
||||||
|
}
|
||||||
|
|
||||||
private List<string> m_AllowedViewers = new List<string>();
|
private List<string> m_AllowedViewers = new List<string>();
|
||||||
private List<string> m_BannedViewers = new List<string>();
|
private List<string> m_BannedViewers = new List<string>();
|
||||||
|
|
||||||
|
@ -862,7 +869,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
StartDisabled = startupConfig.GetBoolean("StartDisabled", false);
|
StartDisabled = startupConfig.GetBoolean("StartDisabled", false);
|
||||||
|
|
||||||
m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance);
|
m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance);
|
||||||
|
m_defaultDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance);
|
||||||
UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup);
|
UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup);
|
||||||
if (!UseBackup)
|
if (!UseBackup)
|
||||||
m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName);
|
m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName);
|
||||||
|
@ -1069,7 +1077,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
BordersLocked = true;
|
BordersLocked = true;
|
||||||
Border northBorder = new Border();
|
Border northBorder = new Border();
|
||||||
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
|
northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, RegionInfo.RegionSizeY); //<---
|
||||||
northBorder.CrossDirection = Cardinals.N;
|
northBorder.CrossDirection = Cardinals.N;
|
||||||
NorthBorders.Add(northBorder);
|
NorthBorders.Add(northBorder);
|
||||||
|
|
||||||
|
@ -1079,7 +1087,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
SouthBorders.Add(southBorder);
|
SouthBorders.Add(southBorder);
|
||||||
|
|
||||||
Border eastBorder = new Border();
|
Border eastBorder = new Border();
|
||||||
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<---
|
eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, RegionInfo.RegionSizeX); //<---
|
||||||
eastBorder.CrossDirection = Cardinals.E;
|
eastBorder.CrossDirection = Cardinals.E;
|
||||||
EastBorders.Add(eastBorder);
|
EastBorders.Add(eastBorder);
|
||||||
|
|
||||||
|
@ -1092,6 +1100,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
m_eventManager = new EventManager();
|
m_eventManager = new EventManager();
|
||||||
|
|
||||||
m_permissions = new ScenePermissions(this);
|
m_permissions = new ScenePermissions(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -2061,8 +2061,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// When we get to the point of re-computing neighbors everytime this
|
// When we get to the point of re-computing neighbors everytime this
|
||||||
// changes, then start using the agent's drawdistance rather than the
|
// changes, then start using the agent's drawdistance rather than the
|
||||||
// region's draw distance.
|
// region's draw distance.
|
||||||
// DrawDistance = agentData.Far;
|
|
||||||
DrawDistance = Scene.DefaultDrawDistance;
|
DrawDistance = Util.Clamp(agentData.Far, 32, m_scene.MaxDrawDistance);
|
||||||
|
|
||||||
|
// DrawDistance = Scene.DefaultDrawDistance;
|
||||||
|
|
||||||
m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0;
|
m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0;
|
||||||
m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0;
|
m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0;
|
||||||
|
@ -2417,8 +2419,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// When we get to the point of re-computing neighbors everytime this
|
// When we get to the point of re-computing neighbors everytime this
|
||||||
// changes, then start using the agent's drawdistance rather than the
|
// changes, then start using the agent's drawdistance rather than the
|
||||||
// region's draw distance.
|
// region's draw distance.
|
||||||
// DrawDistance = agentData.Far;
|
DrawDistance = Util.Clamp(agentData.Far, 32, m_scene.MaxDrawDistance);
|
||||||
DrawDistance = Scene.DefaultDrawDistance;
|
|
||||||
|
|
||||||
// Check if Client has camera in 'follow cam' or 'build' mode.
|
// Check if Client has camera in 'follow cam' or 'build' mode.
|
||||||
Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation);
|
Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation);
|
||||||
|
@ -4011,6 +4012,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
foreach (ulong handle in byebyeRegions)
|
foreach (ulong handle in byebyeRegions)
|
||||||
{
|
{
|
||||||
RemoveNeighbourRegion(handle);
|
RemoveNeighbourRegion(handle);
|
||||||
|
Scene.CapsModule.DropChildSeed(UUID, handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4087,8 +4089,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// When we get to the point of re-computing neighbors everytime this
|
// When we get to the point of re-computing neighbors everytime this
|
||||||
// changes, then start using the agent's drawdistance rather than the
|
// changes, then start using the agent's drawdistance rather than the
|
||||||
// region's draw distance.
|
// region's draw distance.
|
||||||
// DrawDistance = cAgentData.Far;
|
DrawDistance = cAgentData.Far;
|
||||||
DrawDistance = Scene.DefaultDrawDistance;
|
// DrawDistance = Scene.DefaultDrawDistance;
|
||||||
|
|
||||||
if (cAgentData.Position != marker) // UGH!!
|
if (cAgentData.Position != marker) // UGH!!
|
||||||
m_pos = cAgentData.Position + offset;
|
m_pos = cAgentData.Position + offset;
|
||||||
|
@ -4204,8 +4206,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// When we get to the point of re-computing neighbors everytime this
|
// When we get to the point of re-computing neighbors everytime this
|
||||||
// changes, then start using the agent's drawdistance rather than the
|
// changes, then start using the agent's drawdistance rather than the
|
||||||
// region's draw distance.
|
// region's draw distance.
|
||||||
// DrawDistance = cAgent.Far;
|
DrawDistance = cAgent.Far;
|
||||||
DrawDistance = Scene.DefaultDrawDistance;
|
//DrawDistance = Scene.DefaultDrawDistance;
|
||||||
|
|
||||||
if (cAgent.ChildrenCapSeeds != null && cAgent.ChildrenCapSeeds.Count > 0)
|
if (cAgent.ChildrenCapSeeds != null && cAgent.ChildrenCapSeeds.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue