diff options
Diffstat (limited to 'OpenSim')
4 files changed, 34 insertions, 17 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4b15e9f..b9646c7 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -5765,8 +5765,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
5765 | || (x.State != m_thisAgentUpdateArgs.State) // significant if Stats changed | 5765 | || (x.State != m_thisAgentUpdateArgs.State) // significant if Stats changed |
5766 | || (qdelta1 < QDELTABody) // significant if body rotation above(below cos) threshold | 5766 | || (qdelta1 < QDELTABody) // significant if body rotation above(below cos) threshold |
5767 | // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack | 5767 | // Ignoring head rotation altogether, because it's not being used for anything interesting up the stack |
5768 | // || (qdelta2 < QDELTAHead) // significant if head rotation above(below cos) threshold | 5768 | // || (qdelta2 < QDELTAHead) // significant if head rotation above(below cos) threshold |
5769 | || (x.Far != m_thisAgentUpdateArgs.Far) // significant if far distance changed | 5769 | || (Math.Abs(x.Far - m_thisAgentUpdateArgs.Far) >= 32) // significant if far distance changed |
5770 | ; | 5770 | ; |
5771 | //if (movementSignificant) | 5771 | //if (movementSignificant) |
5772 | //{ | 5772 | //{ |
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 274eb7f..b32a169 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -2352,11 +2352,17 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2352 | { | 2352 | { |
2353 | int dd = avatar.DrawDistance < Constants.RegionSize ? (int)Constants.RegionSize : (int)avatar.DrawDistance; | 2353 | int dd = avatar.DrawDistance < Constants.RegionSize ? (int)Constants.RegionSize : (int)avatar.DrawDistance; |
2354 | 2354 | ||
2355 | int startX = (int)pRegionLocX * (int)Constants.RegionSize - dd + (int)(Constants.RegionSize/2); | 2355 | dd--; |
2356 | int startY = (int)pRegionLocY * (int)Constants.RegionSize - dd + (int)(Constants.RegionSize/2); | ||
2357 | 2356 | ||
2358 | int endX = (int)pRegionLocX * (int)Constants.RegionSize + dd + (int)(Constants.RegionSize/2); | 2357 | // region center |
2359 | int endY = (int)pRegionLocY * (int)Constants.RegionSize + dd + (int)(Constants.RegionSize/2); | 2358 | int endX = (int)pRegionLocX * (int)Constants.RegionSize + (int)(Constants.RegionSize / 2); |
2359 | int endY = (int)pRegionLocY * (int)Constants.RegionSize + (int)(Constants.RegionSize / 2); | ||
2360 | |||
2361 | int startX = endX - dd; | ||
2362 | int startY = endY - dd; | ||
2363 | |||
2364 | endX += dd; | ||
2365 | endY += dd; | ||
2360 | 2366 | ||
2361 | if (startX < 0) startX = 0; | 2367 | if (startX < 0) startX = 0; |
2362 | if (startY < 0) startY = 0; | 2368 | if (startY < 0) startY = 0; |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 9e2f52c..eb34f55 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -227,6 +227,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
227 | get { return m_defaultDrawDistance; } | 227 | get { return m_defaultDrawDistance; } |
228 | } | 228 | } |
229 | 229 | ||
230 | // protected float m_maxDrawDistance = 512.0f; | ||
231 | protected float m_maxDrawDistance = 256.0f; | ||
232 | public float MaxDrawDistance | ||
233 | { | ||
234 | get { return m_maxDrawDistance; } | ||
235 | } | ||
236 | |||
230 | private List<string> m_AllowedViewers = new List<string>(); | 237 | private List<string> m_AllowedViewers = new List<string>(); |
231 | private List<string> m_BannedViewers = new List<string>(); | 238 | private List<string> m_BannedViewers = new List<string>(); |
232 | 239 | ||
@@ -862,7 +869,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
862 | 869 | ||
863 | StartDisabled = startupConfig.GetBoolean("StartDisabled", false); | 870 | StartDisabled = startupConfig.GetBoolean("StartDisabled", false); |
864 | 871 | ||
865 | m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance",m_defaultDrawDistance); | 872 | m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance); |
873 | m_defaultDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance); | ||
866 | UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup); | 874 | UseBackup = startupConfig.GetBoolean("UseSceneBackup", UseBackup); |
867 | if (!UseBackup) | 875 | if (!UseBackup) |
868 | m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName); | 876 | m_log.InfoFormat("[SCENE]: Backup has been disabled for {0}", RegionInfo.RegionName); |
@@ -1069,7 +1077,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1069 | 1077 | ||
1070 | BordersLocked = true; | 1078 | BordersLocked = true; |
1071 | Border northBorder = new Border(); | 1079 | Border northBorder = new Border(); |
1072 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- | 1080 | northBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, RegionInfo.RegionSizeY); //<--- |
1073 | northBorder.CrossDirection = Cardinals.N; | 1081 | northBorder.CrossDirection = Cardinals.N; |
1074 | NorthBorders.Add(northBorder); | 1082 | NorthBorders.Add(northBorder); |
1075 | 1083 | ||
@@ -1079,7 +1087,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1079 | SouthBorders.Add(southBorder); | 1087 | SouthBorders.Add(southBorder); |
1080 | 1088 | ||
1081 | Border eastBorder = new Border(); | 1089 | Border eastBorder = new Border(); |
1082 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, (int)Constants.RegionSize); //<--- | 1090 | eastBorder.BorderLine = new Vector3(float.MinValue, float.MaxValue, RegionInfo.RegionSizeX); //<--- |
1083 | eastBorder.CrossDirection = Cardinals.E; | 1091 | eastBorder.CrossDirection = Cardinals.E; |
1084 | EastBorders.Add(eastBorder); | 1092 | EastBorders.Add(eastBorder); |
1085 | 1093 | ||
@@ -1092,6 +1100,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1092 | m_eventManager = new EventManager(); | 1100 | m_eventManager = new EventManager(); |
1093 | 1101 | ||
1094 | m_permissions = new ScenePermissions(this); | 1102 | m_permissions = new ScenePermissions(this); |
1103 | |||
1095 | } | 1104 | } |
1096 | 1105 | ||
1097 | #endregion | 1106 | #endregion |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c58847b..6a9e0ca 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2061,8 +2061,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
2061 | // When we get to the point of re-computing neighbors everytime this | 2061 | // When we get to the point of re-computing neighbors everytime this |
2062 | // changes, then start using the agent's drawdistance rather than the | 2062 | // changes, then start using the agent's drawdistance rather than the |
2063 | // region's draw distance. | 2063 | // region's draw distance. |
2064 | // DrawDistance = agentData.Far; | 2064 | |
2065 | DrawDistance = Scene.DefaultDrawDistance; | 2065 | DrawDistance = Util.Clamp(agentData.Far, 32, m_scene.MaxDrawDistance); |
2066 | |||
2067 | // DrawDistance = Scene.DefaultDrawDistance; | ||
2066 | 2068 | ||
2067 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; | 2069 | m_mouseLook = (flags & AgentManager.ControlFlags.AGENT_CONTROL_MOUSELOOK) != 0; |
2068 | m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; | 2070 | m_leftButtonDown = (flags & AgentManager.ControlFlags.AGENT_CONTROL_LBUTTON_DOWN) != 0; |
@@ -2417,8 +2419,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2417 | // When we get to the point of re-computing neighbors everytime this | 2419 | // When we get to the point of re-computing neighbors everytime this |
2418 | // changes, then start using the agent's drawdistance rather than the | 2420 | // changes, then start using the agent's drawdistance rather than the |
2419 | // region's draw distance. | 2421 | // region's draw distance. |
2420 | // DrawDistance = agentData.Far; | 2422 | DrawDistance = Util.Clamp(agentData.Far, 32, m_scene.MaxDrawDistance); |
2421 | DrawDistance = Scene.DefaultDrawDistance; | ||
2422 | 2423 | ||
2423 | // Check if Client has camera in 'follow cam' or 'build' mode. | 2424 | // Check if Client has camera in 'follow cam' or 'build' mode. |
2424 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); | 2425 | Vector3 camdif = (Vector3.One * Rotation - Vector3.One * CameraRotation); |
@@ -4011,6 +4012,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
4011 | foreach (ulong handle in byebyeRegions) | 4012 | foreach (ulong handle in byebyeRegions) |
4012 | { | 4013 | { |
4013 | RemoveNeighbourRegion(handle); | 4014 | RemoveNeighbourRegion(handle); |
4015 | Scene.CapsModule.DropChildSeed(UUID, handle); | ||
4014 | } | 4016 | } |
4015 | } | 4017 | } |
4016 | 4018 | ||
@@ -4087,8 +4089,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4087 | // When we get to the point of re-computing neighbors everytime this | 4089 | // When we get to the point of re-computing neighbors everytime this |
4088 | // changes, then start using the agent's drawdistance rather than the | 4090 | // changes, then start using the agent's drawdistance rather than the |
4089 | // region's draw distance. | 4091 | // region's draw distance. |
4090 | // DrawDistance = cAgentData.Far; | 4092 | DrawDistance = cAgentData.Far; |
4091 | DrawDistance = Scene.DefaultDrawDistance; | 4093 | // DrawDistance = Scene.DefaultDrawDistance; |
4092 | 4094 | ||
4093 | if (cAgentData.Position != marker) // UGH!! | 4095 | if (cAgentData.Position != marker) // UGH!! |
4094 | m_pos = cAgentData.Position + offset; | 4096 | m_pos = cAgentData.Position + offset; |
@@ -4204,8 +4206,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
4204 | // When we get to the point of re-computing neighbors everytime this | 4206 | // When we get to the point of re-computing neighbors everytime this |
4205 | // changes, then start using the agent's drawdistance rather than the | 4207 | // changes, then start using the agent's drawdistance rather than the |
4206 | // region's draw distance. | 4208 | // region's draw distance. |
4207 | // DrawDistance = cAgent.Far; | 4209 | DrawDistance = cAgent.Far; |
4208 | DrawDistance = Scene.DefaultDrawDistance; | 4210 | //DrawDistance = Scene.DefaultDrawDistance; |
4209 | 4211 | ||
4210 | if (cAgent.ChildrenCapSeeds != null && cAgent.ChildrenCapSeeds.Count > 0) | 4212 | if (cAgent.ChildrenCapSeeds != null && cAgent.ChildrenCapSeeds.Count > 0) |
4211 | { | 4213 | { |