From e2ce14266999778c79175916a06f17824472790e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 28 Jul 2008 00:43:01 +0000 Subject: * Added a check for Infinite or NaN values before updating a heightfield. This may slow down terraforming when it debug mode - feedback appreciated. --- OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/Environment/Modules/World') diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs index 24a76f7..0a16341 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainChannel.cs @@ -129,6 +129,10 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain get { return map[x, y]; } set { + // Will "fix" terrain hole problems. Although not fantastically. + if(Double.IsNaN(value) || Double.IsInfinity(value)) + return; + if (map[x, y] != value) { taint[x / 16, y / 16] = true; -- cgit v1.1