aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2016-01-26 20:39:37 +0000
committerUbitUmarov2016-01-26 20:39:37 +0000
commit109723dc2df4c6f7fc0309911eb2d99988713431 (patch)
tree7d0ca9d4a5df67085f49387fe45fe24cc0cf528f /OpenSim/Region/Framework
parentBulletSim: increase default value of AvatarStopZeroThreshold as this reduces (diff)
downloadopensim-SC_OLD-109723dc2df4c6f7fc0309911eb2d99988713431.zip
opensim-SC_OLD-109723dc2df4c6f7fc0309911eb2d99988713431.tar.gz
opensim-SC_OLD-109723dc2df4c6f7fc0309911eb2d99988713431.tar.bz2
opensim-SC_OLD-109723dc2df4c6f7fc0309911eb2d99988713431.tar.xz
add option MaxRegionsViewDistance to control the maximum range to tell viewer to connect to Neighbour regions, since that is diferent from view range
Diffstat (limited to 'OpenSim/Region/Framework')
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs40
2 files changed, 44 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5799cd4..acffd4a 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -296,6 +296,12 @@ namespace OpenSim.Region.Framework.Scenes
296 get { return m_maxDrawDistance; } 296 get { return m_maxDrawDistance; }
297 } 297 }
298 298
299 protected float m_maxRegionViewDistance = 255f;
300 public float MaxRegionViewDistance
301 {
302 get { return m_maxRegionViewDistance; }
303 }
304
299 private List<string> m_AllowedViewers = new List<string>(); 305 private List<string> m_AllowedViewers = new List<string>();
300 private List<string> m_BannedViewers = new List<string>(); 306 private List<string> m_BannedViewers = new List<string>();
301 307
@@ -972,6 +978,7 @@ namespace OpenSim.Region.Framework.Scenes
972 978
973 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance); 979 m_defaultDrawDistance = startupConfig.GetFloat("DefaultDrawDistance", m_defaultDrawDistance);
974 m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance); 980 m_maxDrawDistance = startupConfig.GetFloat("MaxDrawDistance", m_maxDrawDistance);
981 m_maxRegionViewDistance = startupConfig.GetFloat("MaxRegionsViewDistance", m_maxRegionViewDistance);
975 982
976 LegacySitOffsets = startupConfig.GetBoolean("LegacyOpenSimSitOffsets", LegacySitOffsets); 983 LegacySitOffsets = startupConfig.GetBoolean("LegacyOpenSimSitOffsets", LegacySitOffsets);
977 984
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index fa35691..7f0ab3f 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -583,6 +583,14 @@ namespace OpenSim.Region.Framework.Scenes
583 } 583 }
584 } 584 }
585 585
586 public float RegionViewDistance
587 {
588 get
589 {
590 return Util.Clamp(m_drawDistance, 32f, m_scene.MaxRegionViewDistance);
591 }
592 }
593
586 public bool AllowMovement { get; set; } 594 public bool AllowMovement { get; set; }
587 595
588 private bool m_setAlwaysRun; 596 private bool m_setAlwaysRun;
@@ -3566,7 +3574,33 @@ namespace OpenSim.Region.Framework.Scenes
3566 || (!m_pos.ApproxEquals(m_lastPosition, POSITION_SMALLTOLERANCE) && Velocity.LengthSquared() < LOWVELOCITYSQ ) 3574 || (!m_pos.ApproxEquals(m_lastPosition, POSITION_SMALLTOLERANCE) && Velocity.LengthSquared() < LOWVELOCITYSQ )
3567 ) ) 3575 ) )
3568 { 3576 {
3569 SendTerseUpdateToAllClients(); 3577/*
3578 if (!IsSatOnObject)
3579 {
3580 // this does need to be more complex later
3581 Vector3 vel = Velocity;
3582 Vector3 dpos = m_pos - m_lastPosition;
3583 if( Math.Abs(vel.X - m_lastVelocity.X) > VELOCITY_TOLERANCE ||
3584 Math.Abs(vel.Y - m_lastVelocity.Y) > VELOCITY_TOLERANCE ||
3585 Math.Abs(vel.Z - m_lastVelocity.Z) > VELOCITY_TOLERANCE ||
3586
3587 Math.Abs(m_bodyRot.X - m_lastRotation.X) > ROTATION_TOLERANCE ||
3588 Math.Abs(m_bodyRot.Y - m_lastRotation.Y) > ROTATION_TOLERANCE ||
3589 Math.Abs(m_bodyRot.Z - m_lastRotation.Z) > ROTATION_TOLERANCE ||
3590
3591 Math.Abs(dpos.X) > POSITION_LARGETOLERANCE ||
3592 Math.Abs(dpos.Y) > POSITION_LARGETOLERANCE ||
3593 Math.Abs(dpos.Z) > POSITION_LARGETOLERANCE ||
3594
3595 ( (Math.Abs(dpos.X) > POSITION_SMALLTOLERANCE ||
3596 Math.Abs(dpos.Y) > POSITION_SMALLTOLERANCE ||
3597 Math.Abs(dpos.Z) > POSITION_SMALLTOLERANCE)
3598 && vel.LengthSquared() < LOWVELOCITYSQ
3599 ))
3600 {
3601*/
3602 SendTerseUpdateToAllClients();
3603// }
3570 } 3604 }
3571 CheckForSignificantMovement(); 3605 CheckForSignificantMovement();
3572 } 3606 }
@@ -4184,7 +4218,7 @@ namespace OpenSim.Region.Framework.Scenes
4184 4218
4185 // m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX))); 4219 // m_log.Debug("---> x: " + x + "; newx:" + newRegionX + "; Abs:" + (int)Math.Abs((int)(x - newRegionX)));
4186 // m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY))); 4220 // m_log.Debug("---> y: " + y + "; newy:" + newRegionY + "; Abs:" + (int)Math.Abs((int)(y - newRegionY)));
4187 if (Util.IsOutsideView(DrawDistance, x, newRegionX, y, newRegionY, 4221 if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY,
4188 regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY)) 4222 regInfo.sizeX, regInfo.sizeY, newRegionSizeX, newRegionSizeY))
4189 { 4223 {
4190 byebyeRegions.Add(handle); 4224 byebyeRegions.Add(handle);
@@ -4195,7 +4229,7 @@ namespace OpenSim.Region.Framework.Scenes
4195 } 4229 }
4196 else 4230 else
4197 { 4231 {
4198 if (Util.IsOutsideView(DrawDistance, x, newRegionX, y, newRegionY, 4232 if (Util.IsOutsideView(RegionViewDistance, x, newRegionX, y, newRegionY,
4199 (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY)) 4233 (int)Constants.RegionSize, (int)Constants.RegionSize, newRegionSizeX, newRegionSizeY))
4200 { 4234 {
4201 byebyeRegions.Add(handle); 4235 byebyeRegions.Add(handle);