diff options
author | Justin Clark-Casey (justincc) | 2011-10-29 02:42:53 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-29 02:42:53 +0100 |
commit | 6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6 (patch) | |
tree | 2c54698c55cad641c39b22ba7d90991ffc013ea5 /OpenSim/Region/Framework | |
parent | Add taint target velocity for ODECharacters as is already done for ODECharact... (diff) | |
download | opensim-SC-6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6.zip opensim-SC-6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6.tar.gz opensim-SC-6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6.tar.bz2 opensim-SC-6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6.tar.xz |
Remove the SyncRoot locking from Scene which was only being done around the main physics loop and ScenePresence position and velocity setting
This is no longer necessary with ODECharacter taints (ODEPrim was already not taking part in this). BSCharacter was already tainting.
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 38 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 6 |
3 files changed, 18 insertions, 32 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 302103a..ff05e95 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -509,12 +509,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
509 | } | 509 | } |
510 | } | 510 | } |
511 | 511 | ||
512 | // This gets locked so things stay thread safe. | ||
513 | public object SyncRoot | ||
514 | { | ||
515 | get { return m_sceneGraph.m_syncRoot; } | ||
516 | } | ||
517 | |||
518 | public string DefaultScriptEngine | 512 | public string DefaultScriptEngine |
519 | { | 513 | { |
520 | get { return m_defaultScriptEngine; } | 514 | get { return m_defaultScriptEngine; } |
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() |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 0880e21..bb820aa 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -521,8 +521,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
521 | { | 521 | { |
522 | try | 522 | try |
523 | { | 523 | { |
524 | lock (m_scene.SyncRoot) | 524 | PhysicsActor.Position = value; |
525 | PhysicsActor.Position = value; | ||
526 | } | 525 | } |
527 | catch (Exception e) | 526 | catch (Exception e) |
528 | { | 527 | { |
@@ -572,8 +571,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
572 | { | 571 | { |
573 | try | 572 | try |
574 | { | 573 | { |
575 | lock (m_scene.SyncRoot) | 574 | PhysicsActor.Velocity = value; |
576 | PhysicsActor.Velocity = value; | ||
577 | } | 575 | } |
578 | catch (Exception e) | 576 | catch (Exception e) |
579 | { | 577 | { |