aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
authorAdam Frisby2008-03-06 23:14:24 +0000
committerAdam Frisby2008-03-06 23:14:24 +0000
commitc9eb051936ee8e3a6885c8e4614a7d381cb34314 (patch)
tree20ffb02819a75b292495bf8b50895b382814418b /OpenSim/Region/Environment
parent* Disabled ancient TerrainEngine. (diff)
downloadopensim-SC_OLD-c9eb051936ee8e3a6885c8e4614a7d381cb34314.zip
opensim-SC_OLD-c9eb051936ee8e3a6885c8e4614a7d381cb34314.tar.gz
opensim-SC_OLD-c9eb051936ee8e3a6885c8e4614a7d381cb34314.tar.bz2
opensim-SC_OLD-c9eb051936ee8e3a6885c8e4614a7d381cb34314.tar.xz
* Fix for exception in landmanager crash.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/LandManagement/Land.cs17
-rw-r--r--OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs2
2 files changed, 15 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/LandManagement/Land.cs b/OpenSim/Region/Environment/LandManagement/Land.cs
index 4c6168d..1eadccb 100644
--- a/OpenSim/Region/Environment/LandManagement/Land.cs
+++ b/OpenSim/Region/Environment/LandManagement/Land.cs
@@ -439,12 +439,25 @@ namespace OpenSim.Region.Environment.LandManagement
439 } 439 }
440 } 440 }
441 } 441 }
442 int tx = min_x * 4;
443 if (tx > 255)
444 tx = 255;
445 int ty = min_y * 4;
446 if (ty > 255)
447 ty = 255;
442 landData.AABBMin = 448 landData.AABBMin =
443 new LLVector3((float)(min_x * 4), (float)(min_y * 4), 449 new LLVector3((float)(min_x * 4), (float)(min_y * 4),
444 (float)m_scene.Heightmap[(min_x * 4), (min_y * 4)]); 450 (float)m_scene.Heightmap[tx, ty]);
451
452 tx = max_x * 4;
453 if (tx > 255)
454 tx = 255;
455 ty = max_y * 4;
456 if (ty > 255)
457 ty = 255;
445 landData.AABBMax = 458 landData.AABBMax =
446 new LLVector3((float)(max_x * 4), (float)(max_y * 4), 459 new LLVector3((float)(max_x * 4), (float)(max_y * 4),
447 (float)m_scene.Heightmap[(max_x * 4), (max_y * 4)]); 460 (float)m_scene.Heightmap[tx, ty]);
448 landData.area = tempArea; 461 landData.area = tempArea;
449 } 462 }
450 463
diff --git a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs
index 7ab1e2b..ed3d28a 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs
@@ -269,8 +269,6 @@ namespace OpenSim.Region.Environment.Modules.Terrain
269 m_tainted = false; 269 m_tainted = false;
270 m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised()); 270 m_scene.PhysicsScene.SetTerrain(m_channel.GetFloatsSerialised());
271 m_scene.SaveTerrain(); 271 m_scene.SaveTerrain();
272
273 //m_scene.CreateTerrainTexture(true);
274 } 272 }
275 } 273 }
276 274