diff options
author | Justin Clark-Casey (justincc) | 2012-10-20 02:49:16 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-10-20 02:49:16 +0100 |
commit | d2b19f00dafe2c7c89c07b6a713fdd359cf9dcab (patch) | |
tree | 197213b28485e07b52bc761debfc2dbbb644d4d2 /OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |
parent | minor: Rename assetCache constructor param in UUIDGatherer to assetService wh... (diff) | |
download | opensim-SC-d2b19f00dafe2c7c89c07b6a713fdd359cf9dcab.zip opensim-SC-d2b19f00dafe2c7c89c07b6a713fdd359cf9dcab.tar.gz opensim-SC-d2b19f00dafe2c7c89c07b6a713fdd359cf9dcab.tar.bz2 opensim-SC-d2b19f00dafe2c7c89c07b6a713fdd359cf9dcab.tar.xz |
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
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 29 |
1 files changed, 17 insertions, 12 deletions
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 | |||
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 | /// <value> | ||
73 | /// The bad asset collide bits. | ||
74 | /// </value> | ||
75 | private int BadMeshAssetCollideBits | ||
76 | { | ||
77 | get { return m_isphysical ? (int)CollisionCategories.Land : 0; } | ||
78 | } | ||
79 | |||
80 | /// <summary> | ||
70 | /// Is this prim subject to physics? Even if not, it's still solid for collision purposes. | 81 | /// Is this prim subject to physics? Even if not, it's still solid for collision purposes. |
71 | /// </summary> | 82 | /// </summary> |
72 | public override bool IsPhysical | 83 | public override bool IsPhysical |
@@ -344,11 +355,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
344 | if (m_assetFailed) | 355 | if (m_assetFailed) |
345 | { | 356 | { |
346 | d.GeomSetCategoryBits(prim_geom, 0); | 357 | d.GeomSetCategoryBits(prim_geom, 0); |
347 | d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); | 358 | d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits); |
348 | } | 359 | } |
349 | else | 360 | else |
350 | { | 361 | { |
351 | |||
352 | d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); | 362 | d.GeomSetCategoryBits(prim_geom, (int)m_collisionCategories); |
353 | d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); | 363 | d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); |
354 | } | 364 | } |
@@ -418,7 +428,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
418 | if (m_assetFailed) | 428 | if (m_assetFailed) |
419 | { | 429 | { |
420 | d.GeomSetCategoryBits(prim_geom, 0); | 430 | d.GeomSetCategoryBits(prim_geom, 0); |
421 | d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); | 431 | d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits); |
422 | } | 432 | } |
423 | else | 433 | else |
424 | { | 434 | { |
@@ -851,11 +861,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
851 | 861 | ||
852 | private static Dictionary<IMesh, IntPtr> m_MeshToTriMeshMap = new Dictionary<IMesh, IntPtr>(); | 862 | private static Dictionary<IMesh, IntPtr> m_MeshToTriMeshMap = new Dictionary<IMesh, IntPtr>(); |
853 | 863 | ||
854 | public int BadAssetColideBits() | ||
855 | { | ||
856 | return (m_isphysical ? (int)CollisionCategories.Land : 0); | ||
857 | } | ||
858 | |||
859 | private void setMesh(OdeScene parent_scene, IMesh mesh) | 864 | private void setMesh(OdeScene parent_scene, IMesh mesh) |
860 | { | 865 | { |
861 | // m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh); | 866 | // m_log.DebugFormat("[ODE PRIM]: Setting mesh on {0} to {1}", Name, mesh); |
@@ -1137,7 +1142,7 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1137 | if (prm.m_assetFailed) | 1142 | if (prm.m_assetFailed) |
1138 | { | 1143 | { |
1139 | d.GeomSetCategoryBits(prm.prim_geom, 0); | 1144 | d.GeomSetCategoryBits(prm.prim_geom, 0); |
1140 | d.GeomSetCollideBits(prm.prim_geom, prm.BadAssetColideBits()); | 1145 | d.GeomSetCollideBits(prm.prim_geom, prm.BadMeshAssetCollideBits); |
1141 | } | 1146 | } |
1142 | else | 1147 | else |
1143 | { | 1148 | { |
@@ -1191,7 +1196,7 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1191 | if (m_assetFailed) | 1196 | if (m_assetFailed) |
1192 | { | 1197 | { |
1193 | d.GeomSetCategoryBits(prim_geom, 0); | 1198 | d.GeomSetCategoryBits(prim_geom, 0); |
1194 | d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); | 1199 | d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits); |
1195 | } | 1200 | } |
1196 | else | 1201 | else |
1197 | { | 1202 | { |
@@ -1393,7 +1398,7 @@ Console.WriteLine("ZProcessTaints for " + Name); | |||
1393 | if (m_assetFailed) | 1398 | if (m_assetFailed) |
1394 | { | 1399 | { |
1395 | d.GeomSetCategoryBits(prim_geom, 0); | 1400 | d.GeomSetCategoryBits(prim_geom, 0); |
1396 | d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); | 1401 | d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits); |
1397 | } | 1402 | } |
1398 | else | 1403 | else |
1399 | { | 1404 | { |
@@ -2137,7 +2142,7 @@ Console.WriteLine(" JointCreateFixed"); | |||
2137 | } | 2142 | } |
2138 | 2143 | ||
2139 | if (m_assetFailed) | 2144 | if (m_assetFailed) |
2140 | d.GeomSetCollideBits(prim_geom, BadAssetColideBits()); | 2145 | d.GeomSetCollideBits(prim_geom, BadMeshAssetCollideBits); |
2141 | else | 2146 | else |
2142 | 2147 | ||
2143 | d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); | 2148 | d.GeomSetCollideBits(prim_geom, (int)m_collisionFlags); |