aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
diff options
context:
space:
mode:
authorMelanie2012-12-16 21:19:30 +0000
committerMelanie2012-12-16 21:19:30 +0000
commit0a876a305c32e52d7d0b437c8246119227fce51c (patch)
tree59772311fcbaf528749b3b9661b252d99f0776ba /OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
parentMerge branch 'master' into careminster (diff)
parentMake WebStatsModule properly handle scenes added or removed after initial sta... (diff)
downloadopensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.zip
opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.gz
opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.bz2
opensim-SC-0a876a305c32e52d7d0b437c8246119227fce51c.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/SceneObjectPart.cs OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
index 83df360..5dbd8ce 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
@@ -140,8 +140,8 @@ public sealed class BSTerrainManager
140 // Ground plane does not move 140 // Ground plane does not move
141 BulletSimAPI.ForceActivationState2(m_groundPlane.ptr, ActivationState.DISABLE_SIMULATION); 141 BulletSimAPI.ForceActivationState2(m_groundPlane.ptr, ActivationState.DISABLE_SIMULATION);
142 // Everything collides with the ground plane. 142 // Everything collides with the ground plane.
143 BulletSimAPI.SetCollisionGroupMask2(m_groundPlane.ptr, 143 m_groundPlane.collisionType = CollisionType.Groundplane;
144 (uint)CollisionFilterGroups.GroundPlaneGroup, (uint)CollisionFilterGroups.GroundPlaneMask); 144 m_groundPlane.ApplyCollisionMask();
145 145
146 // Build an initial terrain and put it in the world. This quickly gets replaced by the real region terrain. 146 // Build an initial terrain and put it in the world. This quickly gets replaced by the real region terrain.
147 BSTerrainPhys initialTerrain = new BSTerrainHeightmap(PhysicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize); 147 BSTerrainPhys initialTerrain = new BSTerrainHeightmap(PhysicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize);
@@ -151,13 +151,13 @@ public sealed class BSTerrainManager
151 // Release all the terrain structures we might have allocated 151 // Release all the terrain structures we might have allocated
152 public void ReleaseGroundPlaneAndTerrain() 152 public void ReleaseGroundPlaneAndTerrain()
153 { 153 {
154 if (m_groundPlane.ptr != IntPtr.Zero) 154 if (m_groundPlane.HasPhysicalBody)
155 { 155 {
156 if (BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr)) 156 if (BulletSimAPI.RemoveObjectFromWorld2(PhysicsScene.World.ptr, m_groundPlane.ptr))
157 { 157 {
158 BulletSimAPI.DestroyObject2(PhysicsScene.World.ptr, m_groundPlane.ptr); 158 BulletSimAPI.DestroyObject2(PhysicsScene.World.ptr, m_groundPlane.ptr);
159 } 159 }
160 m_groundPlane.ptr = IntPtr.Zero; 160 m_groundPlane.Clear();
161 } 161 }
162 162
163 ReleaseTerrain(); 163 ReleaseTerrain();