aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs29
1 files changed, 19 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 2191cfa..ff4ae85 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -144,7 +144,7 @@ namespace OpenSim.Region.Framework.Scenes
144 /// </remarks> 144 /// </remarks>
145 public bool IsRoot 145 public bool IsRoot
146 { 146 {
147 get { return ParentGroup.RootPart == this; } 147 get { return Object.ReferenceEquals(ParentGroup.RootPart, this); }
148 } 148 }
149 149
150 /// <summary> 150 /// <summary>
@@ -319,7 +319,7 @@ namespace OpenSim.Region.Framework.Scenes
319 protected Vector3 m_lastVelocity; 319 protected Vector3 m_lastVelocity;
320 protected Vector3 m_lastAcceleration; 320 protected Vector3 m_lastAcceleration;
321 protected Vector3 m_lastAngularVelocity; 321 protected Vector3 m_lastAngularVelocity;
322 protected int m_lastTerseSent; 322 protected int m_lastUpdateSentTime;
323 protected float m_buoyancy = 0.0f; 323 protected float m_buoyancy = 0.0f;
324 protected Vector3 m_force; 324 protected Vector3 m_force;
325 protected Vector3 m_torque; 325 protected Vector3 m_torque;
@@ -3198,6 +3198,14 @@ namespace OpenSim.Region.Framework.Scenes
3198 if (ParentGroup == null) 3198 if (ParentGroup == null)
3199 return; 3199 return;
3200 3200
3201 // Update the "last" values
3202 m_lastPosition = OffsetPosition;
3203 m_lastRotation = RotationOffset;
3204 m_lastVelocity = Velocity;
3205 m_lastAcceleration = Acceleration;
3206 m_lastAngularVelocity = AngularVelocity;
3207 m_lastUpdateSentTime = Environment.TickCount;
3208
3201 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) 3209 ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar)
3202 { 3210 {
3203 SendFullUpdate(avatar.ControllingClient); 3211 SendFullUpdate(avatar.ControllingClient);
@@ -3271,17 +3279,10 @@ namespace OpenSim.Region.Framework.Scenes
3271 Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) || 3279 Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) ||
3272 !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || 3280 !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
3273 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || 3281 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
3274 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) 3282 Environment.TickCount - m_lastUpdateSentTime > TIME_MS_TOLERANCE)
3275 { 3283 {
3276 SendTerseUpdateToAllClients(); 3284 SendTerseUpdateToAllClients();
3277 3285
3278 // Update the "last" values
3279 m_lastPosition = OffsetPosition;
3280 m_lastRotation = RotationOffset;
3281 m_lastVelocity = Velocity;
3282 m_lastAcceleration = Acceleration;
3283 m_lastAngularVelocity = AngularVelocity;
3284 m_lastTerseSent = Environment.TickCount;
3285 } 3286 }
3286 break; 3287 break;
3287 } 3288 }
@@ -3302,6 +3303,14 @@ namespace OpenSim.Region.Framework.Scenes
3302 if (ParentGroup == null || ParentGroup.Scene == null) 3303 if (ParentGroup == null || ParentGroup.Scene == null)
3303 return; 3304 return;
3304 3305
3306 // Update the "last" values
3307 m_lastPosition = OffsetPosition;
3308 m_lastRotation = RotationOffset;
3309 m_lastVelocity = Velocity;
3310 m_lastAcceleration = Acceleration;
3311 m_lastAngularVelocity = AngularVelocity;
3312 m_lastUpdateSentTime = Environment.TickCount;
3313
3305 ParentGroup.Scene.ForEachClient(delegate(IClientAPI client) 3314 ParentGroup.Scene.ForEachClient(delegate(IClientAPI client)
3306 { 3315 {
3307 SendTerseUpdateToClient(client); 3316 SendTerseUpdateToClient(client);