aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/OdePlugin/OdePlugin.cs')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index b3780fd..76bd3f2 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -78,6 +78,21 @@ namespace OpenSim.Region.Physics.OdePlugin
78 } 78 }
79 } 79 }
80 80
81 [Flags]
82 public enum CollisionCategories : int
83 {
84 Disabled = 0,
85 Geom = 0x00000001,
86 Body = 0x00000002,
87 Space = 0x00000004,
88 Character = 0x00000008,
89 Land = 0x00000010,
90 Water = 0x00000020,
91 Wind = 0x00000040,
92 Sensor = 0x00000080,
93 Selected = 0x00000100
94 }
95
81 public class OdeScene : PhysicsScene 96 public class OdeScene : PhysicsScene
82 { 97 {
83 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 98 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
@@ -997,6 +1012,7 @@ namespace OpenSim.Region.Physics.OdePlugin
997 { 1012 {
998 // creating a new space for prim and inserting it into main space. 1013 // creating a new space for prim and inserting it into main space.
999 staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero); 1014 staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY] = d.HashSpaceCreate(IntPtr.Zero);
1015 d.GeomSetCategoryBits(staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY], (int)CollisionCategories.Space);
1000 waitForSpaceUnlock(space); 1016 waitForSpaceUnlock(space);
1001 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]); 1017 d.SpaceAdd(space, staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]);
1002 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY]; 1018 return staticPrimspace[iprimspaceArrItemX, iprimspaceArrItemY];
@@ -1656,6 +1672,12 @@ namespace OpenSim.Region.Physics.OdePlugin
1656 offset, thickness, wrap); 1672 offset, thickness, wrap);
1657 d.GeomHeightfieldDataSetBounds(HeightmapData, m_regionWidth, m_regionHeight); 1673 d.GeomHeightfieldDataSetBounds(HeightmapData, m_regionWidth, m_regionHeight);
1658 LandGeom = d.CreateHeightfield(space, HeightmapData, 1); 1674 LandGeom = d.CreateHeightfield(space, HeightmapData, 1);
1675 if (LandGeom != (IntPtr)0)
1676 {
1677 d.GeomSetCategoryBits(LandGeom, (int)(CollisionCategories.Land));
1678 d.GeomSetCollideBits(LandGeom, (int)(CollisionCategories.Space));
1679
1680 }
1659 geom_name_map[LandGeom] = "Terrain"; 1681 geom_name_map[LandGeom] = "Terrain";
1660 1682
1661 d.Matrix3 R = new d.Matrix3(); 1683 d.Matrix3 R = new d.Matrix3();