Fix minor issues from commit 28483150
Fix spelling of collide, change to more self-documenting property BadMeshAssetCollideBits, add method doc, change to private to reduce code analysis complexityconnector_plugin
parent
d55f72f3df
commit
d2b19f00da
|
@ -66,6 +66,17 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
public int ExpectedCollisionContacts { get { return m_expectedCollisionContacts; } }
|
public int ExpectedCollisionContacts { get { return m_expectedCollisionContacts; } }
|
||||||
private int m_expectedCollisionContacts = 0;
|
private int m_expectedCollisionContacts = 0;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets collide bits so that we can still perform land collisions if a mesh fails to load.
|
||||||
|
/// </summary>
|
||||||
|
/// <value>
|
||||||
|
/// The bad asset collide bits.
|
||||||
|
/// </value>
|
||||||
|
private int BadMeshAssetCollideBits
|
||||||
|
{
|
||||||
|
get { return m_isphysical ? (int)CollisionCategories.Land : 0; }
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Is this prim subject to physics? Even if not, it's still solid for collision purposes.
|
/// Is this prim subject to physics? Even if not, it's still solid for collision purposes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -344,11 +355,10 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
if (m_assetFailed)
|
if (m_assetFailed)
|
||||||
{
|
{
|
||||||
d.GeomSetCategoryBits(prim_geom, 0);
|
d.GeomSetCategoryBits(prim_geom, 0);
|
||||||
d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
|
d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories);
|
d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories);
|
||||||
d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
|
d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
|
||||||
}
|
}
|
||||||
|
@ -418,7 +428,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
if (m_assetFailed)
|
if (m_assetFailed)
|
||||||
{
|
{
|
||||||
d.GeomSetCategoryBits(prim_geom, 0);
|
d.GeomSetCategoryBits(prim_geom, 0);
|
||||||
d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
|
d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -851,11 +861,6 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
private static Dictionary<IMesh, IntPtr> m_MeshToTriMeshMap = new Dictionary<IMesh, IntPtr>();
|
private static Dictionary<IMesh, IntPtr> m_MeshToTriMeshMap = new Dictionary<IMesh, IntPtr>();
|
||||||
|
|
||||||
public int BadAssetColideBits()
|
|
||||||
{
|
|
||||||
return (m_isphysical ? (int)CollisionCategories.Land : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setMesh(OdeScene parent_scene, IMesh mesh)
|
private void setMesh(OdeScene parent_scene, IMesh mesh)
|
||||||
{
|
{
|
||||||
// m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh);
|
// m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh);
|
||||||
|
@ -1137,7 +1142,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
|
||||||
if (prm.m_assetFailed)
|
if (prm.m_assetFailed)
|
||||||
{
|
{
|
||||||
d.GeomSetCategoryBits(prm.prim_geom, 0);
|
d.GeomSetCategoryBits(prm.prim_geom, 0);
|
||||||
d.GeomSetCollideBits(prm.prim_geom, prm.BadAssetColideBits());
|
d.GeomSetCollideBits(prm.prim_geom, prm.BadMeshAssetCollideBits);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1191,7 +1196,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
|
||||||
if (m_assetFailed)
|
if (m_assetFailed)
|
||||||
{
|
{
|
||||||
d.GeomSetCategoryBits(prim_geom, 0);
|
d.GeomSetCategoryBits(prim_geom, 0);
|
||||||
d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
|
d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1393,7 +1398,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
|
||||||
if (m_assetFailed)
|
if (m_assetFailed)
|
||||||
{
|
{
|
||||||
d.GeomSetCategoryBits(prim_geom, 0);
|
d.GeomSetCategoryBits(prim_geom, 0);
|
||||||
d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
|
d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2137,7 +2142,7 @@ Console.WriteLine(" JointCreateFixed");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_assetFailed)
|
if (m_assetFailed)
|
||||||
d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
|
d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
|
||||||
else
|
else
|
||||||
|
|
||||||
d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
|
d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
|
||||||
|
|
Loading…
Reference in New Issue