diff options
author | Robert Adams | 2013-03-09 14:15:14 -0800 |
---|---|---|
committer | Robert Adams | 2013-03-09 14:15:14 -0800 |
commit | 1120bcf123b5aa159e966a80254794f6af66f2a3 (patch) | |
tree | d2add6a1b8a5b5b24dac2820bf55af2c1b94d3fc /OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs | |
parent | * Apparently, sometimes texture entries come in from the wire with no default... (diff) | |
download | opensim-SC-1120bcf123b5aa159e966a80254794f6af66f2a3.zip opensim-SC-1120bcf123b5aa159e966a80254794f6af66f2a3.tar.gz opensim-SC-1120bcf123b5aa159e966a80254794f6af66f2a3.tar.bz2 opensim-SC-1120bcf123b5aa159e966a80254794f6af66f2a3.tar.xz |
BulletSim: remove the ability for avatars to fly off the edge of
regions when there are no region neighbors.
Add some terrain location processing routines to support above.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs')
-rwxr-xr-x | OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs index d7e800d..57a5ff2 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainMesh.cs | |||
@@ -215,7 +215,8 @@ public sealed class BSTerrainMesh : BSTerrainPhys | |||
215 | 215 | ||
216 | float magX = (float)sizeX / extentX; | 216 | float magX = (float)sizeX / extentX; |
217 | float magY = (float)sizeY / extentY; | 217 | float magY = (float)sizeY / extentY; |
218 | physicsScene.DetailLog("{0},BSTerrainMesh.ConvertHeightMapToMesh,totVert={1},totInd={2},extentBase={3},magX={4},magY={5}", | 218 | if (physicsScene != null) |
219 | physicsScene.DetailLog("{0},BSTerrainMesh.ConvertHeightMapToMesh,totVert={1},totInd={2},extentBase={3},magX={4},magY={5}", | ||
219 | BSScene.DetailLogZero, totalVertices, totalIndices, extentBase, magX, magY); | 220 | BSScene.DetailLogZero, totalVertices, totalIndices, extentBase, magX, magY); |
220 | float minHeight = float.MaxValue; | 221 | float minHeight = float.MaxValue; |
221 | // Note that sizeX+1 vertices are created since there is land between this and the next region. | 222 | // Note that sizeX+1 vertices are created since there is land between this and the next region. |
@@ -257,7 +258,8 @@ public sealed class BSTerrainMesh : BSTerrainPhys | |||
257 | } | 258 | } |
258 | catch (Exception e) | 259 | catch (Exception e) |
259 | { | 260 | { |
260 | physicsScene.Logger.ErrorFormat("{0} Failed conversion of heightmap to mesh. For={1}/{2}, e={3}", | 261 | if (physicsScene != null) |
262 | physicsScene.Logger.ErrorFormat("{0} Failed conversion of heightmap to mesh. For={1}/{2}, e={3}", | ||
261 | LogHeader, physicsScene.RegionName, extentBase, e); | 263 | LogHeader, physicsScene.RegionName, extentBase, e); |
262 | } | 264 | } |
263 | 265 | ||