From 28483150e2dcc123b632c89d0a08595b567af669 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 19 Oct 2012 01:25:30 +0100 Subject: [UNTESTED] core Ode: let broken mesh physical prims collide with land as the defaul basic box so they don't go off world. --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index a6c657f..5a1fdf9 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -344,7 +344,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (m_assetFailed) { d.GeomSetCategoryBits(prim_geom, 0); - d.GeomSetCollideBits(prim_geom, 0); + d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); } else { @@ -418,7 +418,7 @@ namespace OpenSim.Region.Physics.OdePlugin if (m_assetFailed) { d.GeomSetCategoryBits(prim_geom, 0); - d.GeomSetCollideBits(prim_geom, 0); + d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); } else { @@ -851,6 +851,11 @@ namespace OpenSim.Region.Physics.OdePlugin private static Dictionary m_MeshToTriMeshMap = new Dictionary(); + public int BadAssetColideBits() + { + return (m_isphysical ? (int)CollisionCategories.Land : 0); + } + private void setMesh(OdeScene parent_scene, IMesh mesh) { // m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh); @@ -1132,7 +1137,7 @@ Console.WriteLine("ZProcessTaints for " + Name); if (prm.m_assetFailed) { d.GeomSetCategoryBits(prm.prim_geom, 0); - d.GeomSetCollideBits(prm.prim_geom, 0); + d.GeomSetCollideBits(prm.prim_geom, prm.BadAssetColideBits()); } else { @@ -1186,7 +1191,7 @@ Console.WriteLine("ZProcessTaints for " + Name); if (m_assetFailed) { d.GeomSetCategoryBits(prim_geom, 0); - d.GeomSetCollideBits(prim_geom, 0); + d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); } else { @@ -1388,7 +1393,7 @@ Console.WriteLine("ZProcessTaints for " + Name); if (m_assetFailed) { d.GeomSetCategoryBits(prim_geom, 0); - d.GeomSetCollideBits(prim_geom, 0); + d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); } else { @@ -2132,7 +2137,7 @@ Console.WriteLine(" JointCreateFixed"); } if (m_assetFailed) - d.GeomSetCollideBits(prim_geom, 0); + d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); else d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); -- cgit v1.1