aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs20
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 2b02ab9..67b07f6 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -77,8 +77,11 @@ namespace OpenSim.Region.Environment.Scenes
77 private bool m_newForce = false; 77 private bool m_newForce = false;
78 private bool m_newCoarseLocations = true; 78 private bool m_newCoarseLocations = true;
79 private bool m_gotAllObjectsInScene = false; 79 private bool m_gotAllObjectsInScene = false;
80
81 80
81 private bool m_lastPhysicsStoppedStatus = false;
82
83 private LLVector3 m_lastVelocity = LLVector3.Zero;
84
82 // Default AV Height 85 // Default AV Height
83 private float m_avHeight = 127.0f; 86 private float m_avHeight = 127.0f;
84 87
@@ -1263,11 +1266,17 @@ namespace OpenSim.Region.Environment.Scenes
1263 m_updateCount = 0; 1266 m_updateCount = 0;
1264 } 1267 }
1265 } 1268 }
1266 else if (Util.GetDistanceTo(lastPhysPos, AbsolutePosition) > 0.02) // physics-related movement 1269 else if ((Util.GetDistanceTo(lastPhysPos, AbsolutePosition) > 0.02) || (Util.GetDistanceTo(m_lastVelocity, m_velocity) > 0.02)) // physics-related movement
1267 { 1270 {
1271
1272
1273 // Send Terse Update to all clients updates lastPhysPos and m_lastVelocity
1274 // doing the above assures us that we know what we sent the clients last
1268 SendTerseUpdateToAllClients(); 1275 SendTerseUpdateToAllClients();
1269 m_updateCount = 0; 1276 m_updateCount = 0;
1270 lastPhysPos = AbsolutePosition; 1277
1278
1279
1271 } 1280 }
1272 1281
1273 // followed suggestion from mic bowman. reversed the two lines below. 1282 // followed suggestion from mic bowman. reversed the two lines below.
@@ -1308,6 +1317,9 @@ namespace OpenSim.Region.Environment.Scenes
1308 1317
1309 m_scene.Broadcast(SendTerseUpdateToClient); 1318 m_scene.Broadcast(SendTerseUpdateToClient);
1310 1319
1320 m_lastVelocity = m_velocity;
1321 lastPhysPos = AbsolutePosition;
1322
1311 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS); 1323 m_scene.AddAgentTime(System.Environment.TickCount - m_perfMonMS);
1312 1324
1313 } 1325 }
@@ -1729,7 +1741,7 @@ namespace OpenSim.Region.Environment.Scenes
1729 AbsolutePosition.Z); 1741 AbsolutePosition.Z);
1730 1742
1731 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec); 1743 m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec);
1732 m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; 1744 //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients;
1733 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; 1745 m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate;
1734 } 1746 }
1735 1747