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 542bd51..1af18e7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -84,8 +84,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
84 | protected int m_activeScripts = 0; | 84 | protected int m_activeScripts = 0; |
85 | protected int m_scriptLPS = 0; | 85 | protected int m_scriptLPS = 0; |
86 | 86 | ||
87 | protected internal object m_syncRoot = new object(); | ||
88 | |||
89 | protected internal PhysicsScene _PhyScene; | 87 | protected internal PhysicsScene _PhyScene; |
90 | 88 | ||
91 | /// <summary> | 89 | /// <summary> |
@@ -187,26 +185,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
187 | /// <returns></returns> | 185 | /// <returns></returns> |
188 | protected internal float UpdatePhysics(double elapsed) | 186 | protected internal float UpdatePhysics(double elapsed) |
189 | { | 187 | { |
190 | lock (m_syncRoot) | 188 | // Here is where the Scene calls the PhysicsScene. This is a one-way |
191 | { | 189 | // interaction; the PhysicsScene cannot access the calling Scene directly. |
192 | // Here is where the Scene calls the PhysicsScene. This is a one-way | 190 | // But with joints, we want a PhysicsActor to be able to influence a |
193 | // interaction; the PhysicsScene cannot access the calling Scene directly. | 191 | // non-physics SceneObjectPart. In particular, a PhysicsActor that is connected |
194 | // But with joints, we want a PhysicsActor to be able to influence a | 192 | // with a joint should be able to move the SceneObjectPart which is the visual |
195 | // non-physics SceneObjectPart. In particular, a PhysicsActor that is connected | 193 | // representation of that joint (for editing and serialization purposes). |
196 | // with a joint should be able to move the SceneObjectPart which is the visual | 194 | // However the PhysicsActor normally cannot directly influence anything outside |
197 | // representation of that joint (for editing and serialization purposes). | 195 | // of the PhysicsScene, and the non-physical SceneObjectPart which represents |
198 | // However the PhysicsActor normally cannot directly influence anything outside | 196 | // the joint in the Scene does not exist in the PhysicsScene. |
199 | // of the PhysicsScene, and the non-physical SceneObjectPart which represents | 197 | // |
200 | // the joint in the Scene does not exist in the PhysicsScene. | 198 | // To solve this, we have an event in the PhysicsScene that is fired when a joint |
201 | // | 199 | // has changed position (because one of its associated PhysicsActors has changed |
202 | // To solve this, we have an event in the PhysicsScene that is fired when a joint | 200 | // position). |
203 | // has changed position (because one of its associated PhysicsActors has changed | 201 | // |
204 | // position). | 202 | // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). |
205 | // | 203 | return _PhyScene.Simulate((float)elapsed); |
206 | // Therefore, JointMoved and JointDeactivated events will be fired as a result of the following Simulate(). | ||
207 | |||
208 | return _PhyScene.Simulate((float)elapsed); | ||
209 | } | ||
210 | } | 204 | } |
211 | 205 | ||
212 | protected internal void UpdateScenePresenceMovement() | 206 | protected internal void UpdateScenePresenceMovement() |