aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
index 4285073..47d7199 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs
@@ -403,8 +403,8 @@ public class BSTerrainManager
403 { 403 {
404 float regionX = tX - offsetX; 404 float regionX = tX - offsetX;
405 float regionY = tY - offsetY; 405 float regionY = tY - offsetY;
406 if (regionX > mapInfo.sizeX) regionX = 0; 406 if (regionX >= mapInfo.sizeX || regionX < 0f) regionX = 0;
407 if (regionY > mapInfo.sizeY) regionY = 0; 407 if (regionY >= mapInfo.sizeY || regionY < 0f) regionY = 0;
408 int mapIndex = (int)regionY * (int)mapInfo.sizeY + (int)regionX; 408 int mapIndex = (int)regionY * (int)mapInfo.sizeY + (int)regionX;
409 ret = mapInfo.heightMap[mapIndex]; 409 ret = mapInfo.heightMap[mapIndex];
410 m_terrainModified = false; 410 m_terrainModified = false;