aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/ODEPrim.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs13
1 files changed, 4 insertions, 9 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 19fecf3..447304b 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -144,8 +144,6 @@ namespace OpenSim.Region.Physics.OdePlugin
144 144
145 public uint m_localID { get; private set; } 145 public uint m_localID { get; private set; }
146 146
147 private CollisionLocker ode;
148
149 private bool m_taintforce = false; 147 private bool m_taintforce = false;
150 private bool m_taintaddangularforce = false; 148 private bool m_taintaddangularforce = false;
151 private Vector3 m_force; 149 private Vector3 m_force;
@@ -203,13 +201,14 @@ namespace OpenSim.Region.Physics.OdePlugin
203 201
204 internal int m_material = (int)Material.Wood; 202 internal int m_material = (int)Material.Wood;
205 203
206 public OdePrim(String primName, OdeScene parent_scene, Vector3 pos, Vector3 size, 204 public OdePrim(
207 Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical, CollisionLocker dode) 205 String primName, OdeScene parent_scene, Vector3 pos, Vector3 size,
206 Quaternion rotation, PrimitiveBaseShape pbs, bool pisPhysical)
208 { 207 {
209 Name = primName; 208 Name = primName;
210 m_vehicle = new ODEDynamics(); 209 m_vehicle = new ODEDynamics();
211 //gc = GCHandle.Alloc(prim_geom, GCHandleType.Pinned); 210 //gc = GCHandle.Alloc(prim_geom, GCHandleType.Pinned);
212 ode = dode; 211
213 if (!pos.IsFinite()) 212 if (!pos.IsFinite())
214 { 213 {
215 pos = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f), 214 pos = new Vector3(((float)Constants.RegionSize * 0.5f), ((float)Constants.RegionSize * 0.5f),
@@ -1390,7 +1389,6 @@ Console.WriteLine("CreateGeom:");
1390 catch (AccessViolationException) 1389 catch (AccessViolationException)
1391 { 1390 {
1392 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name); 1391 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
1393 ode.dunlock(_parent_scene.world);
1394 return; 1392 return;
1395 } 1393 }
1396 } 1394 }
@@ -1405,7 +1403,6 @@ Console.WriteLine("CreateGeom:");
1405 catch (AccessViolationException) 1403 catch (AccessViolationException)
1406 { 1404 {
1407 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name); 1405 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
1408 ode.dunlock(_parent_scene.world);
1409 return; 1406 return;
1410 } 1407 }
1411 } 1408 }
@@ -1421,7 +1418,6 @@ Console.WriteLine("CreateGeom:");
1421 catch (AccessViolationException) 1418 catch (AccessViolationException)
1422 { 1419 {
1423 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name); 1420 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
1424 ode.dunlock(_parent_scene.world);
1425 return; 1421 return;
1426 } 1422 }
1427 } 1423 }
@@ -1437,7 +1433,6 @@ Console.WriteLine("CreateGeom:");
1437 catch (AccessViolationException) 1433 catch (AccessViolationException)
1438 { 1434 {
1439 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name); 1435 m_log.WarnFormat("[PHYSICS]: Unable to create physics proxy for object {0}", Name);
1440 ode.dunlock(_parent_scene.world);
1441 return; 1436 return;
1442 } 1437 }
1443 } 1438 }