diff options
author | Justin Clark-Casey (justincc) | 2012-09-08 00:17:57 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-09-08 00:17:57 +0100 |
commit | fa3edcf55c941811220d7502e1fcf1025ed85f79 (patch) | |
tree | b72f8ee5e843bcfac3623ea1c043b5b05434f55c /OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | |
parent | 4096 is used in various places as the maximum height of a region, refactoring... (diff) | |
parent | BulletSim: update the DLLs and SOs (diff) | |
download | opensim-SC-fa3edcf55c941811220d7502e1fcf1025ed85f79.zip opensim-SC-fa3edcf55c941811220d7502e1fcf1025ed85f79.tar.gz opensim-SC-fa3edcf55c941811220d7502e1fcf1025ed85f79.tar.bz2 opensim-SC-fa3edcf55c941811220d7502e1fcf1025ed85f79.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs index ab45f8f..47d7199 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | |||
@@ -403,13 +403,13 @@ 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; |
411 | DetailLog("{0},BSTerrainManager.GetTerrainHeightAtXY,bX={1},baseY={2},szX={3},szY={4},regX={5},regY={6},index={7},ht={8}", | 411 | // DetailLog("{0},BSTerrainManager.GetTerrainHeightAtXY,bX={1},baseY={2},szX={3},szY={4},regX={5},regY={6},index={7},ht={8}", |
412 | BSScene.DetailLogZero, offsetX, offsetY, mapInfo.sizeX, mapInfo.sizeY, regionX, regionY, mapIndex, ret); | 412 | // BSScene.DetailLogZero, offsetX, offsetY, mapInfo.sizeX, mapInfo.sizeY, regionX, regionY, mapIndex, ret); |
413 | } | 413 | } |
414 | else | 414 | else |
415 | { | 415 | { |