From d2b19f00dafe2c7c89c07b6a713fdd359cf9dcab Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Sat, 20 Oct 2012 02:49:16 +0100
Subject: 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 complexity
---
OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
(limited to 'OpenSim/Region/Physics/OdePlugin')
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 5a1fdf9..d11dff1 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -67,6 +67,17 @@ namespace OpenSim.Region.Physics.OdePlugin
private int m_expectedCollisionContacts = 0;
///
+ /// Gets collide bits so that we can still perform land collisions if a mesh fails to load.
+ ///
+ ///
+ /// The bad asset collide bits.
+ ///
+ private int BadMeshAssetCollideBits
+ {
+ get { return m_isphysical ? (int)CollisionCategories.Land : 0; }
+ }
+
+ ///
/// Is this prim subject to physics? Even if not, it's still solid for collision purposes.
///
public override bool IsPhysical
@@ -344,11 +355,10 @@ namespace OpenSim.Region.Physics.OdePlugin
if (m_assetFailed)
{
d.GeomSetCategoryBits(prim_geom, 0);
- d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
+ d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
}
else
{
-
d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories);
d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
}
@@ -418,7 +428,7 @@ namespace OpenSim.Region.Physics.OdePlugin
if (m_assetFailed)
{
d.GeomSetCategoryBits(prim_geom, 0);
- d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
+ d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
}
else
{
@@ -851,11 +861,6 @@ 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);
@@ -1137,7 +1142,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
if (prm.m_assetFailed)
{
d.GeomSetCategoryBits(prm.prim_geom, 0);
- d.GeomSetCollideBits(prm.prim_geom, prm.BadAssetColideBits());
+ d.GeomSetCollideBits(prm.prim_geom, prm.BadMeshAssetCollideBits);
}
else
{
@@ -1191,7 +1196,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
if (m_assetFailed)
{
d.GeomSetCategoryBits(prim_geom, 0);
- d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
+ d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
}
else
{
@@ -1393,7 +1398,7 @@ Console.WriteLine("ZProcessTaints for " + Name);
if (m_assetFailed)
{
d.GeomSetCategoryBits(prim_geom, 0);
- d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
+ d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
}
else
{
@@ -2137,7 +2142,7 @@ Console.WriteLine(" JointCreateFixed");
}
if (m_assetFailed)
- d.GeomSetCollideBits(prim_geom, BadAssetColideBits());
+ d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits);
else
d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags);
--
cgit v1.1