aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs40
1 files changed, 37 insertions, 3 deletions
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);