aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs
diff options
context:
space:
mode:
authorAdam Frisby2007-12-04 05:47:51 +0000
committerAdam Frisby2007-12-04 05:47:51 +0000
commit7d5f03220384092ed2cb8a86d489e0151774f496 (patch)
tree2f1ba749891a828d32d3959aa7a5877314b2f051 /OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs
parent* Flying with ODE and got that sinking feeling? This should help (diff)
downloadopensim-SC-7d5f03220384092ed2cb8a86d489e0151774f496.zip
opensim-SC-7d5f03220384092ed2cb8a86d489e0151774f496.tar.gz
opensim-SC-7d5f03220384092ed2cb8a86d489e0151774f496.tar.bz2
opensim-SC-7d5f03220384092ed2cb8a86d489e0151774f496.tar.xz
* Added SSL Support to HttpListener
* Added SSL Option to User Server to allow logins to be done via SSL. * Added sane handling for when Remote Admin Plugin configuration is not found * Added some performance boosts to an area of libTerrain which was highlighted in profiling.
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs')
-rw-r--r--OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs25
1 files changed, 16 insertions, 9 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs
index 2ad784b..55ed90b 100644
--- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs
+++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs
@@ -143,15 +143,22 @@ namespace libTerrain
143 143
144 public double Get(int x, int y) 144 public double Get(int x, int y)
145 { 145 {
146 if (x >= w) 146 try
147 x = w - 1; 147 {
148 if (y >= h) 148 return map[x, y];
149 y = h - 1; 149 }
150 if (x < 0) 150 catch (IndexOutOfRangeException)
151 x = 0; 151 {
152 if (y < 0) 152 if (x >= w)
153 y = 0; 153 x = w - 1;
154 return map[x, y]; 154 if (y >= h)
155 y = h - 1;
156 if (x < 0)
157 x = 0;
158 if (y < 0)
159 y = 0;
160 return map[x, y];
161 }
155 } 162 }
156 163
157 public void SetWrap(int x, int y, double val) 164 public void SetWrap(int x, int y, double val)