diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index a4080ca..a6178e7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -93,8 +93,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
93 | protected int m_activeScripts = 0; | 93 | protected int m_activeScripts = 0; |
94 | protected int m_scriptLPS = 0; | 94 | protected int m_scriptLPS = 0; |
95 | 95 | ||
96 | protected internal object m_syncRoot = new object(); | ||
97 | |||
98 | protected internal PhysicsScene _PhyScene; | 96 | protected internal PhysicsScene _PhyScene; |
99 | 97 | ||
100 | /// <summary> | 98 | /// <summary> |
@@ -201,26 +199,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
201 | /// <returns></returns> | 199 | /// <returns></returns> |
202 | protected internal float UpdatePhysics(double elapsed) | 200 | protected internal float UpdatePhysics(double elapsed) |
203 | { | 201 | { |
204 | lock (m_syncRoot) | 202 | // Here is where the Scene calls the PhysicsScene. This is a one-way |
205 | { | 203 | // interaction; the PhysicsScene cannot access the calling Scene directly. |
206 | // Here is where the Scene calls the PhysicsScene. This is a one-way | 204 | // But with joints, we want a PhysicsActor to be able to influence a |
207 | // interaction; the PhysicsScene cannot access the calling Scene directly. | 205 | // non-physics SceneObjectPart. In particular, a PhysicsActor that is connected |
208 | // But with joints, we want a PhysicsActor to be able to influence a | 206 | // with a joint should be able to move the SceneObjectPart which is the visual |
209 | // non-physics SceneObjectPart. In particular, a PhysicsActor that is connected | 207 | // representation of that joint (for editing and serialization purposes). |
210 | // with a joint should be able to move the SceneObjectPart which is the visual | 208 | // However the PhysicsActor normally cannot directly influence anything outside |
211 | // representation of that joint (for editing and serialization purposes). | 209 | // of the PhysicsScene, and the non-physical SceneObjectPart which represents |
212 | // However the PhysicsActor normally cannot directly influence anything outside | 210 | // the joint in the Scene does not exist in the PhysicsScene. |
213 | // of the PhysicsScene, and the non-physical SceneObjectPart which represents | 211 | // |
214 | // the joint in the Scene does not exist in the PhysicsScene. | 212 | // To solve this, we have an event in the PhysicsScene that is fired when a joint |
215 | // | 213 | // has changed position (because one of its associated PhysicsActors has changed |
216 | // To solve this, we have an event in the PhysicsScene that is fired when a joint | 214 | // position). |
217 | // has changed position (because one of its associated PhysicsActors has changed | 215 | // |
218 | // position). | 216 | // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). |
219 | // | 217 | return _PhyScene.Simulate((float)elapsed); |
220 | // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). | ||
221 | |||
222 | return _PhyScene.Simulate((float)elapsed); | ||
223 | } | ||
224 | } | 218 | } |
225 | 219 | ||
226 | protected internal void UpdateScenePresenceMovement() | 220 | protected internal void UpdateScenePresenceMovement() |