aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs26
1 files changed, 14 insertions, 12 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 5a1fdf9..2548648 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -67,6 +67,14 @@ namespace OpenSim.Region.Physics.OdePlugin
67 private int m_expectedCollisionContacts = 0; 67 private int m_expectedCollisionContacts = 0;
68 68
69 /// <summary> 69 /// <summary>
70 /// Gets collide bits so that we can still perform land collisions if a mesh fails to load.
71 /// </summary>
72 private int BadMeshAssetCollideBits
73 {
74 get { return m_isphysical ? (int)CollisionCategories.Land : 0; }
75 }
76
77 /// <summary>
70 /// Is this prim subject to physics? Even if not, it's still solid for collision purposes. 78 /// Is this prim subject to physics? Even if not, it's still solid for collision purposes.
71 /// </summary> 79 /// </summary>
72 public override bool IsPhysical 80 public override bool IsPhysical
@@ -344,11 +352,10 @@ namespace OpenSim.Region.Physics.OdePlugin
344 if (m_assetFailed) 352 if (m_assetFailed)
345 { 353 {
346 d.GeomSetCategoryBits(prim_geom, 0); 354 d.GeomSetCategoryBits(prim_geom, 0);
347 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 355 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
348 } 356 }
349 else 357 else
350 { 358 {
351
352 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); 359 d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories);
353 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); 360 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
354 } 361 }
@@ -418,7 +425,7 @@ namespace OpenSim.Region.Physics.OdePlugin
418 if (m_assetFailed) 425 if (m_assetFailed)
419 { 426 {
420 d.GeomSetCategoryBits(prim_geom, 0); 427 d.GeomSetCategoryBits(prim_geom, 0);
421 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 428 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
422 } 429 }
423 else 430 else
424 { 431 {
@@ -851,11 +858,6 @@ namespace OpenSim.Region.Physics.OdePlugin
851 858
852 private static Dictionary<IMesh, IntPtr> m_MeshToTriMeshMap = new Dictionary<IMesh, IntPtr>(); 859 private static Dictionary<IMesh, IntPtr> m_MeshToTriMeshMap = new Dictionary<IMesh, IntPtr>();
853 860
854 public int BadAssetColideBits()
855 {
856 return (m_isphysical ? (int)CollisionCategories.Land : 0);
857 }
858
859 private void setMesh(OdeScene parent_scene, IMesh mesh) 861 private void setMesh(OdeScene parent_scene, IMesh mesh)
860 { 862 {
861// m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh); 863// m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh);
@@ -1137,7 +1139,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1137 if (prm.m_assetFailed) 1139 if (prm.m_assetFailed)
1138 { 1140 {
1139 d.GeomSetCategoryBits(prm.prim_geom, 0); 1141 d.GeomSetCategoryBits(prm.prim_geom, 0);
1140 d.GeomSetCollideBits(prm.prim_geom, prm.BadAssetColideBits()); 1142 d.GeomSetCollideBits(prm.prim_geom, prm.BadMeshAssetCollideBits);
1141 } 1143 }
1142 else 1144 else
1143 { 1145 {
@@ -1191,7 +1193,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1191 if (m_assetFailed) 1193 if (m_assetFailed)
1192 { 1194 {
1193 d.GeomSetCategoryBits(prim_geom, 0); 1195 d.GeomSetCategoryBits(prim_geom, 0);
1194 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 1196 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
1195 } 1197 }
1196 else 1198 else
1197 { 1199 {
@@ -1393,7 +1395,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
1393 if (m_assetFailed) 1395 if (m_assetFailed)
1394 { 1396 {
1395 d.GeomSetCategoryBits(prim_geom, 0); 1397 d.GeomSetCategoryBits(prim_geom, 0);
1396 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 1398 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
1397 } 1399 }
1398 else 1400 else
1399 { 1401 {
@@ -2137,7 +2139,7 @@ Console.WriteLine(" JointCreateFixed");
2137 } 2139 }
2138 2140
2139 if (m_assetFailed) 2141 if (m_assetFailed)
2140 d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); 2142 d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
2141 else 2143 else
2142 2144
2143 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); 2145 d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);