Comment out calls to OdeScene.waitForSpaceUnlock() since that method does nothing right now

0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-11-21 19:48:31 +00:00
parent 4a99619bc0
commit b528150d16
3 changed files with 24 additions and 23 deletions

View File

@ -556,7 +556,7 @@ namespace OpenSim.Region.Physics.OdePlugin
//CAPSULE_LENGTH = -5; //CAPSULE_LENGTH = -5;
//CAPSULE_RADIUS = -5; //CAPSULE_RADIUS = -5;
int dAMotorEuler = 1; int dAMotorEuler = 1;
_parent_scene.waitForSpaceUnlock(_parent_scene.space); // _parent_scene.waitForSpaceUnlock(_parent_scene.space);
if (CAPSULE_LENGTH <= 0) if (CAPSULE_LENGTH <= 0)
{ {
m_log.Warn("[ODE CHARACTER]: The capsule size you specified in opensim.ini is invalid! Setting it to the smallest possible size!"); m_log.Warn("[ODE CHARACTER]: The capsule size you specified in opensim.ini is invalid! Setting it to the smallest possible size!");
@ -1151,7 +1151,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
//kill the Geometry //kill the Geometry
_parent_scene.waitForSpaceUnlock(_parent_scene.space); // _parent_scene.waitForSpaceUnlock(_parent_scene.space);
if (Body != IntPtr.Zero) if (Body != IntPtr.Zero)
{ {

View File

@ -865,7 +865,7 @@ namespace OpenSim.Region.Physics.OdePlugin
m_MeshToTriMeshMap[mesh] = _triMeshData; m_MeshToTriMeshMap[mesh] = _triMeshData;
} }
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
try try
{ {
if (prim_geom == IntPtr.Zero) if (prim_geom == IntPtr.Zero)
@ -1388,7 +1388,7 @@ Console.WriteLine("CreateGeom:");
{ {
if (((_size.X / 2f) > 0f)) if (((_size.X / 2f) > 0f))
{ {
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
try try
{ {
//Console.WriteLine(" CreateGeom 1"); //Console.WriteLine(" CreateGeom 1");
@ -1402,7 +1402,7 @@ Console.WriteLine("CreateGeom:");
} }
else else
{ {
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
try try
{ {
//Console.WriteLine(" CreateGeom 2"); //Console.WriteLine(" CreateGeom 2");
@ -1417,7 +1417,7 @@ Console.WriteLine("CreateGeom:");
} }
else else
{ {
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
try try
{ {
//Console.WriteLine(" CreateGeom 3"); //Console.WriteLine(" CreateGeom 3");
@ -1432,7 +1432,7 @@ Console.WriteLine("CreateGeom:");
} }
else else
{ {
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
try try
{ {
//Console.WriteLine(" CreateGeom 4"); //Console.WriteLine(" CreateGeom 4");
@ -1585,17 +1585,17 @@ Console.WriteLine(" JointCreateFixed");
{ {
// string primScenAvatarIn = _parent_scene.whichspaceamIin(_position); // string primScenAvatarIn = _parent_scene.whichspaceamIin(_position);
// int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position); // int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
IntPtr tempspace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace); IntPtr tempspace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace);
m_targetSpace = tempspace; m_targetSpace = tempspace;
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
if (prim_geom != IntPtr.Zero) if (prim_geom != IntPtr.Zero)
{ {
d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
d.SpaceAdd(m_targetSpace, prim_geom); d.SpaceAdd(m_targetSpace, prim_geom);
} }
} }
@ -1986,7 +1986,7 @@ Console.WriteLine(" JointCreateFixed");
if (d.SpaceQuery(m_targetSpace, prim_geom)) if (d.SpaceQuery(m_targetSpace, prim_geom))
{ {
_parent_scene.waitForSpaceUnlock(m_targetSpace); // _parent_scene.waitForSpaceUnlock(m_targetSpace);
d.SpaceRemove(m_targetSpace, prim_geom); d.SpaceRemove(m_targetSpace, prim_geom);
} }

View File

@ -676,11 +676,11 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
internal void waitForSpaceUnlock(IntPtr space) // internal void waitForSpaceUnlock(IntPtr space)
{ // {
//if (space != IntPtr.Zero) // //if (space != IntPtr.Zero)
//while (d.SpaceLockQuery(space)) { } // Wait and do nothing // //while (d.SpaceLockQuery(space)) { } // Wait and do nothing
} // }
// /// <summary> // /// <summary>
// /// Debug space message for printing the space that a prim/avatar is in. // /// Debug space message for printing the space that a prim/avatar is in.
@ -2305,7 +2305,7 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
if (d.GeomIsSpace(currentspace)) if (d.GeomIsSpace(currentspace))
{ {
waitForSpaceUnlock(currentspace); // waitForSpaceUnlock(currentspace);
d.SpaceRemove(currentspace, geom); d.SpaceRemove(currentspace, geom);
} }
else else
@ -2321,7 +2321,7 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
if (d.GeomIsSpace(currentspace)) if (d.GeomIsSpace(currentspace))
{ {
waitForSpaceUnlock(sGeomIsIn); // waitForSpaceUnlock(sGeomIsIn);
d.SpaceRemove(sGeomIsIn, geom); d.SpaceRemove(sGeomIsIn, geom);
} }
else else
@ -2339,8 +2339,8 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
if (d.GeomIsSpace(currentspace)) if (d.GeomIsSpace(currentspace))
{ {
waitForSpaceUnlock(currentspace); // waitForSpaceUnlock(currentspace);
waitForSpaceUnlock(space); // waitForSpaceUnlock(space);
d.SpaceRemove(space, currentspace); d.SpaceRemove(space, currentspace);
// free up memory used by the space. // free up memory used by the space.
@ -2364,7 +2364,7 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
if (d.GeomIsSpace(currentspace)) if (d.GeomIsSpace(currentspace))
{ {
waitForSpaceUnlock(currentspace); // waitForSpaceUnlock(currentspace);
d.SpaceRemove(currentspace, geom); d.SpaceRemove(currentspace, geom);
} }
else else
@ -2380,7 +2380,7 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
if (d.GeomIsSpace(sGeomIsIn)) if (d.GeomIsSpace(sGeomIsIn))
{ {
waitForSpaceUnlock(sGeomIsIn); // waitForSpaceUnlock(sGeomIsIn);
d.SpaceRemove(sGeomIsIn, geom); d.SpaceRemove(sGeomIsIn, geom);
} }
else else
@ -2419,9 +2419,10 @@ namespace OpenSim.Region.Physics.OdePlugin
// creating a new space for prim and inserting it into main space. // creating a new space for prim and inserting it into main space.
staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero); staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero);
d.GeomSetCategoryBits(staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY], (int)CollisionCategories.Space); d.GeomSetCategoryBits(staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY], (int)CollisionCategories.Space);
waitForSpaceUnlock(space); // waitForSpaceUnlock(space);
d.SpaceSetSublevel(space, 1); d.SpaceSetSublevel(space, 1);
d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]); d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]);
return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]; return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY];
} }