aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
authorMelanie2013-01-11 23:52:48 +0100
committerMelanie2013-01-11 23:52:48 +0100
commit6e9092421b2f047dca26fc560d12a629f1177319 (patch)
tree80b847237c67810798d1b8c852b61f543ee290b2 /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
parentChange IsRoot to use ReferenceEquals to prevent operator == messiness (diff)
parentmake sure keyframe rotations are normalized (diff)
downloadopensim-SC_OLD-6e9092421b2f047dca26fc560d12a629f1177319.zip
opensim-SC_OLD-6e9092421b2f047dca26fc560d12a629f1177319.tar.gz
opensim-SC_OLD-6e9092421b2f047dca26fc560d12a629f1177319.tar.bz2
opensim-SC_OLD-6e9092421b2f047dca26fc560d12a629f1177319.tar.xz
Merge branch 'ubitwork' into avination
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs27
1 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index b62667f..ff4ae85 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -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);