diff options
author | Melanie | 2013-01-13 13:44:28 +0000 |
---|---|---|
committer | Melanie | 2013-01-13 13:44:28 +0000 |
commit | b924e333b771d95f12612278f096d37f73927b7a (patch) | |
tree | 9d311c0afe76f5957d7f797be144db505cfb0c2a /OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |
parent | Merge branch 'master' into careminster (diff) | |
parent | add some sanity checking to HandleAgentRequestSit handler (diff) | |
download | opensim-SC-b924e333b771d95f12612278f096d37f73927b7a.zip opensim-SC-b924e333b771d95f12612278f096d37f73927b7a.tar.gz opensim-SC-b924e333b771d95f12612278f096d37f73927b7a.tar.bz2 opensim-SC-b924e333b771d95f12612278f096d37f73927b7a.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 2a0d2ea..f21058b 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; |
@@ -3201,6 +3201,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3201 | if (ParentGroup == null) | 3201 | if (ParentGroup == null) |
3202 | return; | 3202 | return; |
3203 | 3203 | ||
3204 | // Update the "last" values | ||
3205 | m_lastPosition = OffsetPosition; | ||
3206 | m_lastRotation = RotationOffset; | ||
3207 | m_lastVelocity = Velocity; | ||
3208 | m_lastAcceleration = Acceleration; | ||
3209 | m_lastAngularVelocity = AngularVelocity; | ||
3210 | m_lastUpdateSentTime = Environment.TickCount; | ||
3211 | |||
3204 | ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 3212 | ParentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) |
3205 | { | 3213 | { |
3206 | SendFullUpdate(avatar.ControllingClient); | 3214 | SendFullUpdate(avatar.ControllingClient); |
@@ -3274,17 +3282,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3274 | Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) || | 3282 | Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) || |
3275 | !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || | 3283 | !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || |
3276 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || | 3284 | !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || |
3277 | Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) | 3285 | Environment.TickCount - m_lastUpdateSentTime > TIME_MS_TOLERANCE) |
3278 | { | 3286 | { |
3279 | SendTerseUpdateToAllClients(); | 3287 | SendTerseUpdateToAllClients(); |
3280 | 3288 | ||
3281 | // Update the "last" values | ||
3282 | m_lastPosition = OffsetPosition; | ||
3283 | m_lastRotation = RotationOffset; | ||
3284 | m_lastVelocity = Velocity; | ||
3285 | m_lastAcceleration = Acceleration; | ||
3286 | m_lastAngularVelocity = AngularVelocity; | ||
3287 | m_lastTerseSent = Environment.TickCount; | ||
3288 | } | 3289 | } |
3289 | break; | 3290 | break; |
3290 | } | 3291 | } |
@@ -3305,6 +3306,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
3305 | if (ParentGroup == null || ParentGroup.Scene == null) | 3306 | if (ParentGroup == null || ParentGroup.Scene == null) |
3306 | return; | 3307 | return; |
3307 | 3308 | ||
3309 | // Update the "last" values | ||
3310 | m_lastPosition = OffsetPosition; | ||
3311 | m_lastRotation = RotationOffset; | ||
3312 | m_lastVelocity = Velocity; | ||
3313 | m_lastAcceleration = Acceleration; | ||
3314 | m_lastAngularVelocity = AngularVelocity; | ||
3315 | m_lastUpdateSentTime = Environment.TickCount; | ||
3316 | |||
3308 | ParentGroup.Scene.ForEachClient(delegate(IClientAPI client) | 3317 | ParentGroup.Scene.ForEachClient(delegate(IClientAPI client) |
3309 | { | 3318 | { |
3310 | SendTerseUpdateToClient(client); | 3319 | SendTerseUpdateToClient(client); |