aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs13
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/OdeScene.cs14
2 files changed, 11 insertions, 16 deletions
diff --git a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
index d22f912..7e884d4 100644
--- a/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
@@ -445,7 +445,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
445 m_disabled = false; 445 m_disabled = false;
446 446
447 // The body doesn't already have a finite rotation mode set here 447 // The body doesn't already have a finite rotation mode set here
448 if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0.0f)) && _parent == null) 448 if ((!m_angularlock.ApproxEquals(Vector3.One, 0.0f)) && _parent == null)
449 { 449 {
450 createAMotor(m_angularlock); 450 createAMotor(m_angularlock);
451 } 451 }
@@ -919,7 +919,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
919// _parent_scene.waitForSpaceUnlock(m_targetSpace); 919// _parent_scene.waitForSpaceUnlock(m_targetSpace);
920 try 920 try
921 { 921 {
922 SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, parent_scene.triCallback, null, null)); 922 SetGeom(d.CreateTriMesh(m_targetSpace, _triMeshData, null, null, null));
923 } 923 }
924 catch (AccessViolationException) 924 catch (AccessViolationException)
925 { 925 {
@@ -1121,7 +1121,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1121 { 1121 {
1122 d.Mass m2; 1122 d.Mass m2;
1123 d.MassSetZero(out m2); 1123 d.MassSetZero(out m2);
1124 d.MassSetBoxTotal(out m2, prim.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z); 1124 d.MassSetBoxTotal(out m2, prm.CalculateMass(), prm._size.X, prm._size.Y, prm._size.Z);
1125 1125
1126 d.Quaternion quat = new d.Quaternion(); 1126 d.Quaternion quat = new d.Quaternion();
1127 quat.W = prm._orientation.W; 1127 quat.W = prm._orientation.W;
@@ -1184,11 +1184,6 @@ Console.WriteLine("ZProcessTaints for " + Name);
1184 prm.m_collisionscore = 0; 1184 prm.m_collisionscore = 0;
1185 prm.m_disabled = false; 1185 prm.m_disabled = false;
1186 1186
1187 // The body doesn't already have a finite rotation mode set here
1188 if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0f)) && _parent == null)
1189 {
1190 prm.createAMotor(m_angularlock);
1191 }
1192 prm.Body = Body; 1187 prm.Body = Body;
1193 _parent_scene.ActivatePrim(prm); 1188 _parent_scene.ActivatePrim(prm);
1194 } 1189 }
@@ -1235,7 +1230,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1235 m_disabled = false; 1230 m_disabled = false;
1236 1231
1237 // The body doesn't already have a finite rotation mode set here 1232 // The body doesn't already have a finite rotation mode set here
1238 if ((!m_angularlock.ApproxEquals(Vector3.Zero, 0f)) && _parent == null) 1233 if ((!m_angularlock.ApproxEquals(Vector3.One, 0f)) && _parent == null)
1239 { 1234 {
1240 createAMotor(m_angularlock); 1235 createAMotor(m_angularlock);
1241 } 1236 }
diff --git a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
index f245a3b..62988d0 100644
--- a/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
+++ b/OpenSim/Region/PhysicsModules/Ode/OdeScene.cs
@@ -580,8 +580,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
580 m_suportCombine = false; 580 m_suportCombine = false;
581 581
582 nearCallback = near; 582 nearCallback = near;
583 triCallback = TriCallback; 583// triCallback = TriCallback;
584 triArrayCallback = TriArrayCallback; 584// triArrayCallback = TriArrayCallback;
585 m_rayCastManager = new ODERayCastRequestManager(this); 585 m_rayCastManager = new ODERayCastRequestManager(this);
586 586
587 // Create the world and the first space 587 // Create the world and the first space
@@ -1811,10 +1811,10 @@ namespace OpenSim.Region.PhysicsModule.ODE
1811 //} 1811 //}
1812 // } 1812 // }
1813 } 1813 }
1814 1814/*
1815 private int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount) 1815 private int TriArrayCallback(IntPtr trimesh, IntPtr refObject, int[] triangleIndex, int triCount)
1816 { 1816 {
1817 /* String name1 = null; 1817 String name1 = null;
1818 String name2 = null; 1818 String name2 = null;
1819 1819
1820 if (!geom_name_map.TryGetValue(trimesh, out name1)) 1820 if (!geom_name_map.TryGetValue(trimesh, out name1))
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1827 } 1827 }
1828 1828
1829 m_log.InfoFormat("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2); 1829 m_log.InfoFormat("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2);
1830 */ 1830
1831 return 1; 1831 return 1;
1832 } 1832 }
1833 1833
@@ -1857,7 +1857,7 @@ namespace OpenSim.Region.PhysicsModule.ODE
1857 1857
1858 return 1; 1858 return 1;
1859 } 1859 }
1860 1860*/
1861 /// <summary> 1861 /// <summary>
1862 /// This is our collision testing routine in ODE 1862 /// This is our collision testing routine in ODE
1863 /// </summary> 1863 /// </summary>
@@ -1988,8 +1988,8 @@ namespace OpenSim.Region.PhysicsModule.ODE
1988 1988
1989 x = x - offsetX + 1f; 1989 x = x - offsetX + 1f;
1990 y = y - offsetY + 1f; 1990 y = y - offsetY + 1f;
1991 // map is rotated
1992 1991
1992 // map is rotated
1993 index = (int)x * ((int)m_regionHeight + 3) + (int)y; 1993 index = (int)x * ((int)m_regionHeight + 3) + (int)y;
1994 1994
1995 if (index < TerrainHeightFieldHeights[heightFieldGeom].Length) 1995 if (index < TerrainHeightFieldHeights[heightFieldGeom].Length)