Don't bother taking OdeLock during OdeScene construction, since there can be no contention until the object is constructed.
parent
d6456b9ea8
commit
1a008b237b
|
@ -279,7 +279,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Used to lock the entire physics scene. Locked during the main part of Simulate()
|
/// Used to lock the entire physics scene. Locked during the main part of Simulate()
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Object OdeLock;
|
internal Object OdeLock = new Object();
|
||||||
|
|
||||||
public IMesher mesher;
|
public IMesher mesher;
|
||||||
|
|
||||||
|
@ -315,13 +315,11 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
m_log
|
m_log
|
||||||
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + sceneIdentifier);
|
= LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType.ToString() + "." + sceneIdentifier);
|
||||||
|
|
||||||
OdeLock = new Object();
|
|
||||||
nearCallback = near;
|
nearCallback = near;
|
||||||
triCallback = TriCallback;
|
triCallback = TriCallback;
|
||||||
triArrayCallback = TriArrayCallback;
|
triArrayCallback = TriArrayCallback;
|
||||||
m_rayCastManager = new ODERayCastRequestManager(this);
|
m_rayCastManager = new ODERayCastRequestManager(this);
|
||||||
lock (OdeLock)
|
|
||||||
{
|
|
||||||
// Create the world and the first space
|
// Create the world and the first space
|
||||||
world = d.WorldCreate();
|
world = d.WorldCreate();
|
||||||
space = d.HashSpaceCreate(IntPtr.Zero);
|
space = d.HashSpaceCreate(IntPtr.Zero);
|
||||||
|
@ -335,7 +333,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
Thread viewthread = new Thread(new ParameterizedThreadStart(startvisualization));
|
Thread viewthread = new Thread(new ParameterizedThreadStart(startvisualization));
|
||||||
viewthread.Start();
|
viewthread.Start();
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
_watermap = new float[258 * 258];
|
_watermap = new float[258 * 258];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue