From df24ce6dfd803c5fcf6b0958ce14c455331a87b4 Mon Sep 17 00:00:00 2001
From: mingchen
Date: Thu, 12 Jul 2007 20:33:10 +0000
Subject: *Parcel and estate support fully restored into Sugilite *Significant
movement (currently set to 2 meters of movement for performance reasons, even
though its speedy) and initial login now sends parcel updates
---
OpenSim/Region/Environment/Scenes/Scene.cs | 3 ++-
OpenSim/Region/Environment/Scenes/ScenePresence.cs | 22 +++++++++++++++++++++-
2 files changed, 23 insertions(+), 2 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index d526b3c..4a4b7a0 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -492,7 +492,8 @@ namespace OpenSim.Region.Environment.Scenes
client.OnParcelJoinRequest += new ParcelJoinRequest(parcelManager.handleParcelJoinRequest);
client.OnParcelPropertiesUpdateRequest += new ParcelPropertiesUpdateRequest(parcelManager.handleParcelPropertiesUpdateRequest);
client.OnEstateOwnerMessage += new EstateOwnerMessageRequest(estateManager.handleEstateOwnerMessage);
-
+
+
this.estateManager.sendRegionHandshake(client);
CreateAndAddScenePresence(client);
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 8134276..037b19d 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -40,6 +40,9 @@ namespace OpenSim.Region.Environment.Scenes
{
public partial class ScenePresence : Entity
{
+
+
+
public static bool PhysicsEngineFlying = false;
public static AvatarAnimations Animations;
public static byte[] DefaultTexture;
@@ -75,7 +78,10 @@ namespace OpenSim.Region.Environment.Scenes
DIR_CONTROL_FLAG_UP = MainAvatar.ControlFlags.AGENT_CONTROL_UP_POS,
DIR_CONTROL_FLAG_DOWN = MainAvatar.ControlFlags.AGENT_CONTROL_UP_NEG
}
-
+ ///
+ /// Position at which a significant movement was made
+ ///
+ private LLVector3 posLastSignificantMove = new LLVector3();
#region Properties
///
///
@@ -359,7 +365,9 @@ namespace OpenSim.Region.Environment.Scenes
}
}
+ this.CheckForSignificantMovement();
this.CheckForBorderCrossing();
+
}
}
#endregion
@@ -465,6 +473,18 @@ namespace OpenSim.Region.Environment.Scenes
}
#endregion
+ #region Significant Movement Method
+
+ protected void CheckForSignificantMovement()
+ {
+ if (libsecondlife.Helpers.VecDist(this.Pos, this.posLastSignificantMove) > 2.0)
+ {
+ this.posLastSignificantMove = this.Pos;
+ this.m_world.parcelManager.handleSignificantClientMovement(this.ControllingClient);
+
+ }
+ }
+ #endregion
#region Border Crossing Methods
///
///
--
cgit v1.1