aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-18 21:03:41 +0100
committerJustin Clark-Casey (justincc)2011-10-18 21:03:41 +0100
commit1d4cd76e8a8c64da71fc384ff9c654d7f4f849c1 (patch)
tree595cf18867fbffe63cb2fa17063e447a4b0e5009 /OpenSim
parentRemove unnecessary lock of OdeLock in OdePrim.changeadd() (diff)
downloadopensim-SC_OLD-1d4cd76e8a8c64da71fc384ff9c654d7f4f849c1.zip
opensim-SC_OLD-1d4cd76e8a8c64da71fc384ff9c654d7f4f849c1.tar.gz
opensim-SC_OLD-1d4cd76e8a8c64da71fc384ff9c654d7f4f849c1.tar.bz2
opensim-SC_OLD-1d4cd76e8a8c64da71fc384ff9c654d7f4f849c1.tar.xz
Don't bother taking OdeLock during OdeScene construction, since there can be no contention until the object is constructed.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs29
1 files changed, 13 insertions, 16 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 9b503fc..67ed66e 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Physics.OdePlugin
279 /// <summary> 279 /// <summary>
280 /// Used to lock the entire physics scene. Locked during the main part of Simulate() 280 /// Used to lock the entire physics scene. Locked during the main part of Simulate()
281 /// </summary> 281 /// </summary>
282 public Object OdeLock; 282 internal Object OdeLock = new Object();
283 283
284 public IMesher mesher; 284 public IMesher mesher;
285 285
@@ -315,27 +315,24 @@ namespace OpenSim.Region.Physics.OdePlugin
315 m_log 315 m_log
316 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + sceneIdentifier); 316 = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + sceneIdentifier);
317 317
318 OdeLock = new Object();
319 nearCallback = near; 318 nearCallback = near;
320 triCallback = TriCallback; 319 triCallback = TriCallback;
321 triArrayCallback = TriArrayCallback; 320 triArrayCallback = TriArrayCallback;
322 m_rayCastManager = new ODERayCastRequestManager(this); 321 m_rayCastManager = new ODERayCastRequestManager(this);
323 lock (OdeLock)
324 {
325 // Create the world and the first space
326 world = d.WorldCreate();
327 space = d.HashSpaceCreate(IntPtr.Zero);
328 322
329 contactgroup = d.JointGroupCreate(0); 323 // Create the world and the first space
330 //contactgroup 324 world = d.WorldCreate();
325 space = d.HashSpaceCreate(IntPtr.Zero);
331 326
332 d.WorldSetAutoDisableFlag(world, false); 327 contactgroup = d.JointGroupCreate(0);
333 #if USE_DRAWSTUFF 328 //contactgroup
334 329
335 Thread viewthread = new Thread(new ParameterizedThreadStart(startvisualization)); 330 d.WorldSetAutoDisableFlag(world, false);
336 viewthread.Start(); 331 #if USE_DRAWSTUFF
337 #endif 332
338 } 333 Thread viewthread = new Thread(new ParameterizedThreadStart(startvisualization));
334 viewthread.Start();
335 #endif
339 336
340 _watermap = new float[258 * 258]; 337 _watermap = new float[258 * 258];
341 338