From 64d05bab0fe9e12038309275a677e68518fb9b15 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 25 Aug 2015 13:36:45 +0100 Subject: terrain stored as ushorts with gzip compression --- OpenSim/Region/Framework/Scenes/TerrainChannel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs index 2dab246..75c3a3b 100644 --- a/OpenSim/Region/Framework/Scenes/TerrainChannel.cs +++ b/OpenSim/Region/Framework/Scenes/TerrainChannel.cs @@ -157,7 +157,11 @@ namespace OpenSim.Region.Framework.Scenes { if (Double.IsNaN(value) || Double.IsInfinity(value)) return; - + if (value < 0) + value = 0; + else + if (value > 655.35) + value = 655.35; m_terrainData[x, y] = (float)value; } } -- cgit v1.1