From 7d5f03220384092ed2cb8a86d489e0151774f496 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 4 Dec 2007 05:47:51 +0000 Subject: * 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. --- .../libTerrainBSD/Channel/Common.cs | 25 ++++++++++++++-------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/Terrain.BasicTerrain') 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 public double Get(int x, int y) { - if (x >= w) - x = w - 1; - if (y >= h) - y = h - 1; - if (x < 0) - x = 0; - if (y < 0) - y = 0; - return map[x, y]; + try + { + return map[x, y]; + } + catch (IndexOutOfRangeException) + { + if (x >= w) + x = w - 1; + if (y >= h) + y = h - 1; + if (x < 0) + x = 0; + if (y < 0) + y = 0; + return map[x, y]; + } } public void SetWrap(int x, int y, double val) -- cgit v1.1