aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
diff options
context:
space:
mode:
authorUbitUmarov2015-10-17 21:56:15 +0100
committerUbitUmarov2015-10-17 21:56:15 +0100
commit24435cfe9ace3a23ec8590d14dd8454258c0e568 (patch)
tree03f90eb7e2fac74287ecc140eedb9a8a26a1b89e /OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs
parentfix GetTerrainHeightAtXY for large regions. Also change ode dispose() (diff)
downloadopensim-SC-24435cfe9ace3a23ec8590d14dd8454258c0e568.zip
opensim-SC-24435cfe9ace3a23ec8590d14dd8454258c0e568.tar.gz
opensim-SC-24435cfe9ace3a23ec8590d14dd8454258c0e568.tar.bz2
opensim-SC-24435cfe9ace3a23ec8590d14dd8454258c0e568.tar.xz
Fix wrong active angularlock detection (it was only burning cpu), stop trying to add a amotor to each child prim and stop using unnecessary trimeshcallbacks
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/Ode/ODEPrim.cs13
1 files changed, 4 insertions, 9 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 }