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

iar_mods
Justin Clark-Casey (justincc) 2011-11-21 19:48:31 +00:00
parent 54789706f4
commit 225b925f4e
3 changed files with 24 additions and 23 deletions

View File

@ -557,7 +557,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!");
@ -1155,7 +1155,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

@ -856,7 +856,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)
@ -1379,7 +1379,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");
@ -1393,7 +1393,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");
@ -1408,7 +1408,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");
@ -1423,7 +1423,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");
@ -1576,17 +1576,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);
} }
} }
@ -1977,7 +1977,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

@ -679,11 +679,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.
@ -2303,7 +2303,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
@ -2319,7 +2319,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
@ -2337,8 +2337,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.
@ -2362,7 +2362,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
@ -2378,7 +2378,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
@ -2417,9 +2417,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];
} }