aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs10
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs116
2 files changed, 60 insertions, 66 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index eaa1175..7ab295a 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -221,15 +221,9 @@ namespace OpenSim.Region.Physics.Manager
221 return false; 221 return false;
222 } 222 }
223 223
224 public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) 224 public virtual void Combine(PhysicsScene pScene, Vector3 offset, Vector3 extents) {}
225 {
226 return;
227 }
228 225
229 public virtual void UnCombine(PhysicsScene pScene) 226 public virtual void UnCombine(PhysicsScene pScene) {}
230 {
231
232 }
233 227
234 /// <summary> 228 /// <summary>
235 /// Queue a raycast against the physics scene. 229 /// Queue a raycast against the physics scene.
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 72e9ca0..b5436bd 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -3583,64 +3583,64 @@ Console.WriteLine("AddPhysicsActorTaint to " + taintedprim.Name);
3583 return true; 3583 return true;
3584 } 3584 }
3585 3585
3586 public override void UnCombine(PhysicsScene pScene) 3586// public override void UnCombine(PhysicsScene pScene)
3587 { 3587// {
3588 IntPtr localGround = IntPtr.Zero; 3588// IntPtr localGround = IntPtr.Zero;
3589// float[] localHeightfield; 3589//// float[] localHeightfield;
3590 bool proceed = false; 3590// bool proceed = false;
3591 List<IntPtr> geomDestroyList = new List<IntPtr>(); 3591// List<IntPtr> geomDestroyList = new List<IntPtr>();
3592 3592//
3593 lock (OdeLock) 3593// lock (OdeLock)
3594 { 3594// {
3595 if (RegionTerrain.TryGetValue(Vector3.Zero, out localGround)) 3595// if (RegionTerrain.TryGetValue(Vector3.Zero, out localGround))
3596 { 3596// {
3597 foreach (IntPtr geom in TerrainHeightFieldHeights.Keys) 3597// foreach (IntPtr geom in TerrainHeightFieldHeights.Keys)
3598 { 3598// {
3599 if (geom == localGround) 3599// if (geom == localGround)
3600 { 3600// {
3601// localHeightfield = TerrainHeightFieldHeights[geom]; 3601//// localHeightfield = TerrainHeightFieldHeights[geom];
3602 proceed = true; 3602// proceed = true;
3603 } 3603// }
3604 else 3604// else
3605 { 3605// {
3606 geomDestroyList.Add(geom); 3606// geomDestroyList.Add(geom);
3607 } 3607// }
3608 } 3608// }
3609 3609//
3610 if (proceed) 3610// if (proceed)
3611 { 3611// {
3612 m_worldOffset = Vector3.Zero; 3612// m_worldOffset = Vector3.Zero;
3613 WorldExtents = new Vector2((int)Constants.RegionSize, (int)Constants.RegionSize); 3613// WorldExtents = new Vector2((int)Constants.RegionSize, (int)Constants.RegionSize);
3614 m_parentScene = null; 3614// m_parentScene = null;
3615 3615//
3616 foreach (IntPtr g in geomDestroyList) 3616// foreach (IntPtr g in geomDestroyList)
3617 { 3617// {
3618 // removingHeightField needs to be done or the garbage collector will 3618// // removingHeightField needs to be done or the garbage collector will
3619 // collect the terrain data before we tell ODE to destroy it causing 3619// // collect the terrain data before we tell ODE to destroy it causing
3620 // memory corruption 3620// // memory corruption
3621 if (TerrainHeightFieldHeights.ContainsKey(g)) 3621// if (TerrainHeightFieldHeights.ContainsKey(g))
3622 { 3622// {
3623// float[] removingHeightField = TerrainHeightFieldHeights[g]; 3623//// float[] removingHeightField = TerrainHeightFieldHeights[g];
3624 TerrainHeightFieldHeights.Remove(g); 3624// TerrainHeightFieldHeights.Remove(g);
3625 3625//
3626 if (RegionTerrain.ContainsKey(g)) 3626// if (RegionTerrain.ContainsKey(g))
3627 { 3627// {
3628 RegionTerrain.Remove(g); 3628// RegionTerrain.Remove(g);
3629 } 3629// }
3630 3630//
3631 d.GeomDestroy(g); 3631// d.GeomDestroy(g);
3632 //removingHeightField = new float[0]; 3632// //removingHeightField = new float[0];
3633 } 3633// }
3634 } 3634// }
3635 3635//
3636 } 3636// }
3637 else 3637// else
3638 { 3638// {
3639 m_log.Warn("[PHYSICS]: Couldn't proceed with UnCombine. Region has inconsistant data."); 3639// m_log.Warn("[PHYSICS]: Couldn't proceed with UnCombine. Region has inconsistant data.");
3640 } 3640// }
3641 } 3641// }
3642 } 3642// }
3643 } 3643// }
3644 3644
3645 public override void SetWaterLevel(float baseheight) 3645 public override void SetWaterLevel(float baseheight)
3646 { 3646 {