aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-29 02:42:53 +0100
committerJustin Clark-Casey (justincc)2011-10-29 02:42:53 +0100
commit6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6 (patch)
tree2c54698c55cad641c39b22ba7d90991ffc013ea5 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentAdd taint target velocity for ODECharacters as is already done for ODECharact... (diff)
downloadopensim-SC_OLD-6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6.zip
opensim-SC_OLD-6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6.tar.gz
opensim-SC_OLD-6d97545b6bdf1b9a468f9116fe3070c5d9f9f3c6.tar.bz2
opensim-SC_OLD-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/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs38
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()