aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODECharacter.cs4
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs18
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs25
3 files changed, 24 insertions, 23 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
index c838587..af67407 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs
@@ -557,7 +557,7 @@ namespace OpenSim.Region.Physics.OdePlugin
557 //CAPSULE_LENGTH = -5; 557 //CAPSULE_LENGTH = -5;
558 //CAPSULE_RADIUS = -5; 558 //CAPSULE_RADIUS = -5;
559 int dAMotorEuler = 1; 559 int dAMotorEuler = 1;
560 _parent_scene.waitForSpaceUnlock(_parent_scene.space); 560// _parent_scene.waitForSpaceUnlock(_parent_scene.space);
561 if (CAPSULE_LENGTH <= 0) 561 if (CAPSULE_LENGTH <= 0)
562 { 562 {
563 m_log.Warn("[ODE CHARACTER]: The capsule size you specified in opensim.ini is invalid! Setting it to the smallest possible size!"); 563 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
1155 } 1155 }
1156 1156
1157 //kill the Geometry 1157 //kill the Geometry
1158 _parent_scene.waitForSpaceUnlock(_parent_scene.space); 1158// _parent_scene.waitForSpaceUnlock(_parent_scene.space);
1159 1159
1160 if (Body != IntPtr.Zero) 1160 if (Body != IntPtr.Zero)
1161 { 1161 {
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 5f21c9d..fec4693 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -856,7 +856,7 @@ namespace OpenSim.Region.Physics.OdePlugin
856 m_MeshToTriMeshMap[mesh] = _triMeshData; 856 m_MeshToTriMeshMap[mesh] = _triMeshData;
857 } 857 }
858 858
859 _parent_scene.waitForSpaceUnlock(m_targetSpace); 859// _parent_scene.waitForSpaceUnlock(m_targetSpace);
860 try 860 try
861 { 861 {
862 if (prim_geom == IntPtr.Zero) 862 if (prim_geom == IntPtr.Zero)
@@ -1379,7 +1379,7 @@ Console.WriteLine("CreateGeom:");
1379 { 1379 {
1380 if (((_size.X / 2f) > 0f)) 1380 if (((_size.X / 2f) > 0f))
1381 { 1381 {
1382 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1382// _parent_scene.waitForSpaceUnlock(m_targetSpace);
1383 try 1383 try
1384 { 1384 {
1385//Console.WriteLine(" CreateGeom 1"); 1385//Console.WriteLine(" CreateGeom 1");
@@ -1393,7 +1393,7 @@ Console.WriteLine("CreateGeom:");
1393 } 1393 }
1394 else 1394 else
1395 { 1395 {
1396 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1396// _parent_scene.waitForSpaceUnlock(m_targetSpace);
1397 try 1397 try
1398 { 1398 {
1399//Console.WriteLine(" CreateGeom 2"); 1399//Console.WriteLine(" CreateGeom 2");
@@ -1408,7 +1408,7 @@ Console.WriteLine("CreateGeom:");
1408 } 1408 }
1409 else 1409 else
1410 { 1410 {
1411 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1411// _parent_scene.waitForSpaceUnlock(m_targetSpace);
1412 try 1412 try
1413 { 1413 {
1414//Console.WriteLine(" CreateGeom 3"); 1414//Console.WriteLine(" CreateGeom 3");
@@ -1423,7 +1423,7 @@ Console.WriteLine("CreateGeom:");
1423 } 1423 }
1424 else 1424 else
1425 { 1425 {
1426 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1426// _parent_scene.waitForSpaceUnlock(m_targetSpace);
1427 try 1427 try
1428 { 1428 {
1429//Console.WriteLine(" CreateGeom 4"); 1429//Console.WriteLine(" CreateGeom 4");
@@ -1576,17 +1576,17 @@ Console.WriteLine(" JointCreateFixed");
1576 { 1576 {
1577 // string primScenAvatarIn = _parent_scene.whichspaceamIin(_position); 1577 // string primScenAvatarIn = _parent_scene.whichspaceamIin(_position);
1578 // int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position); 1578 // int[] arrayitem = _parent_scene.calculateSpaceArrayItemFromPos(_position);
1579 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1579// _parent_scene.waitForSpaceUnlock(m_targetSpace);
1580 1580
1581 IntPtr tempspace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace); 1581 IntPtr tempspace = _parent_scene.recalculateSpaceForGeom(prim_geom, _position, m_targetSpace);
1582 m_targetSpace = tempspace; 1582 m_targetSpace = tempspace;
1583 1583
1584 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1584// _parent_scene.waitForSpaceUnlock(m_targetSpace);
1585 if (prim_geom != IntPtr.Zero) 1585 if (prim_geom != IntPtr.Zero)
1586 { 1586 {
1587 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z); 1587 d.GeomSetPosition(prim_geom, _position.X, _position.Y, _position.Z);
1588 1588
1589 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1589// _parent_scene.waitForSpaceUnlock(m_targetSpace);
1590 d.SpaceAdd(m_targetSpace, prim_geom); 1590 d.SpaceAdd(m_targetSpace, prim_geom);
1591 } 1591 }
1592 } 1592 }
@@ -1977,7 +1977,7 @@ Console.WriteLine(" JointCreateFixed");
1977 1977
1978 if (d.SpaceQuery(m_targetSpace, prim_geom)) 1978 if (d.SpaceQuery(m_targetSpace, prim_geom))
1979 { 1979 {
1980 _parent_scene.waitForSpaceUnlock(m_targetSpace); 1980// _parent_scene.waitForSpaceUnlock(m_targetSpace);
1981 d.SpaceRemove(m_targetSpace, prim_geom); 1981 d.SpaceRemove(m_targetSpace, prim_geom);
1982 } 1982 }
1983 1983
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 9c3c077..b952b30 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -679,11 +679,11 @@ namespace OpenSim.Region.Physics.OdePlugin
679 } 679 }
680 } 680 }
681 681
682 internal void waitForSpaceUnlock(IntPtr space) 682// internal void waitForSpaceUnlock(IntPtr space)
683 { 683// {
684 //if (space != IntPtr.Zero) 684// //if (space != IntPtr.Zero)
685 //while (d.SpaceLockQuery(space)) { } // Wait and do nothing 685// //while (d.SpaceLockQuery(space)) { } // Wait and do nothing
686 } 686// }
687 687
688// /// <summary> 688// /// <summary>
689// /// Debug space message for printing the space that a prim/avatar is in. 689// /// Debug space message for printing the space that a prim/avatar is in.
@@ -2303,7 +2303,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2303 { 2303 {
2304 if (d.GeomIsSpace(currentspace)) 2304 if (d.GeomIsSpace(currentspace))
2305 { 2305 {
2306 waitForSpaceUnlock(currentspace); 2306// waitForSpaceUnlock(currentspace);
2307 d.SpaceRemove(currentspace, geom); 2307 d.SpaceRemove(currentspace, geom);
2308 } 2308 }
2309 else 2309 else
@@ -2319,7 +2319,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2319 { 2319 {
2320 if (d.GeomIsSpace(currentspace)) 2320 if (d.GeomIsSpace(currentspace))
2321 { 2321 {
2322 waitForSpaceUnlock(sGeomIsIn); 2322// waitForSpaceUnlock(sGeomIsIn);
2323 d.SpaceRemove(sGeomIsIn, geom); 2323 d.SpaceRemove(sGeomIsIn, geom);
2324 } 2324 }
2325 else 2325 else
@@ -2337,8 +2337,8 @@ namespace OpenSim.Region.Physics.OdePlugin
2337 { 2337 {
2338 if (d.GeomIsSpace(currentspace)) 2338 if (d.GeomIsSpace(currentspace))
2339 { 2339 {
2340 waitForSpaceUnlock(currentspace); 2340// waitForSpaceUnlock(currentspace);
2341 waitForSpaceUnlock(space); 2341// waitForSpaceUnlock(space);
2342 d.SpaceRemove(space, currentspace); 2342 d.SpaceRemove(space, currentspace);
2343 // free up memory used by the space. 2343 // free up memory used by the space.
2344 2344
@@ -2362,7 +2362,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2362 { 2362 {
2363 if (d.GeomIsSpace(currentspace)) 2363 if (d.GeomIsSpace(currentspace))
2364 { 2364 {
2365 waitForSpaceUnlock(currentspace); 2365// waitForSpaceUnlock(currentspace);
2366 d.SpaceRemove(currentspace, geom); 2366 d.SpaceRemove(currentspace, geom);
2367 } 2367 }
2368 else 2368 else
@@ -2378,7 +2378,7 @@ namespace OpenSim.Region.Physics.OdePlugin
2378 { 2378 {
2379 if (d.GeomIsSpace(sGeomIsIn)) 2379 if (d.GeomIsSpace(sGeomIsIn))
2380 { 2380 {
2381 waitForSpaceUnlock(sGeomIsIn); 2381// waitForSpaceUnlock(sGeomIsIn);
2382 d.SpaceRemove(sGeomIsIn, geom); 2382 d.SpaceRemove(sGeomIsIn, geom);
2383 } 2383 }
2384 else 2384 else
@@ -2417,9 +2417,10 @@ namespace OpenSim.Region.Physics.OdePlugin
2417 // creating a new space for prim and inserting it into main space. 2417 // creating a new space for prim and inserting it into main space.
2418 staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero); 2418 staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero);
2419 d.GeomSetCategoryBits(staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY], (int)CollisionCategories.Space); 2419 d.GeomSetCategoryBits(staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY], (int)CollisionCategories.Space);
2420 waitForSpaceUnlock(space); 2420// waitForSpaceUnlock(space);
2421 d.SpaceSetSublevel(space, 1); 2421 d.SpaceSetSublevel(space, 1);
2422 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]); 2422 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]);
2423
2423 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]; 2424 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY];
2424 } 2425 }
2425 2426