aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-02-17 10:41:08 +0000
committerTeravus Ovares2008-02-17 10:41:08 +0000
commit19e0ada93af347cff93a3950f66abe245399f8b2 (patch)
tree7578573f583e3037e19fc2db471209ea172f0b1c /OpenSim/Region/Environment/Scenes/ScenePresence.cs
parentThank you very much, ChrisDown for a patch to (diff)
downloadopensim-SC-19e0ada93af347cff93a3950f66abe245399f8b2.zip
opensim-SC-19e0ada93af347cff93a3950f66abe245399f8b2.tar.gz
opensim-SC-19e0ada93af347cff93a3950f66abe245399f8b2.tar.bz2
opensim-SC-19e0ada93af347cff93a3950f66abe245399f8b2.tar.xz
* Located and destroyed the weird velocity and rotation transfers. It turned out to be that the Static PhysicsVector.Zero was transferring velocities between all non fixed objects. Not so static after all :(. Finding it was cruel and unusual punishment from the CLR.
* Therefore, when you run through a pile of prim you won't see things rotate when they're not supposed to anymore. * Avatars don't float off either.
Diffstat (limited to '')
-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