partially revert commit f29d5ad662387b97d9e881f28df584dc19fa8c07: if mesh asset does not contain data for PRIM type warn and use convex, do avoid physical peims going underground etc
parent
07893ec3e7
commit
7ebc08ad65
|
@ -395,6 +395,10 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
|||
{
|
||||
// m_log.DebugFormat("[MESH]: experimental mesh proxy generation for {0}", primName);
|
||||
|
||||
|
||||
// for ubOde we have a diferent mesh use priority
|
||||
// priority is to use full mesh then decomposition
|
||||
// SL does the oposite
|
||||
bool usemesh = false;
|
||||
|
||||
coords = new List<Coord>();
|
||||
|
@ -443,17 +447,11 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
|||
|
||||
if (physicsParms != null)
|
||||
usemesh = true;
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[MESH]: Data for PRIM shape type not found for prim {0}",primName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if(!usemesh && (map.ContainsKey("physics_convex")))
|
||||
physicsParms = (OSDMap)map["physics_convex"];
|
||||
|
||||
|
||||
if (physicsParms == null)
|
||||
{
|
||||
m_log.WarnFormat("[MESH]: unknown mesh type for prim {0}",primName);
|
||||
|
@ -555,7 +553,10 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
|||
range = range - min;
|
||||
range *= invMaxU16;
|
||||
|
||||
if (!convex && cmap.ContainsKey("HullList") && cmap.ContainsKey("Positions"))
|
||||
if(!convex)
|
||||
{
|
||||
// if mesh data not present and not convex then we need convex decomposition data
|
||||
if (cmap.ContainsKey("HullList") && cmap.ContainsKey("Positions"))
|
||||
{
|
||||
List<int> hsizes = new List<int>();
|
||||
int totalpoints = 0;
|
||||
|
@ -708,7 +709,12 @@ namespace OpenSim.Region.PhysicsModule.ubODEMeshing
|
|||
if (coords.Count > 0 && faces.Count > 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
// if neither mesh or decomposition present, warn and use convex
|
||||
m_log.WarnFormat("[MESH]: Data for PRIM shape type ( mesh or decomposition) not found for prim {0}",primName);
|
||||
}
|
||||
}
|
||||
vs.Clear();
|
||||
|
||||
if (cmap.ContainsKey("BoundingVerts"))
|
||||
|
|
Loading…
Reference in New Issue