From 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb Mon Sep 17 00:00:00 2001
From: onefang
Date: Sun, 19 May 2019 21:24:15 +1000
Subject: Dump OpenSim 0.9.0.1 into it's own branch.
---
.../CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs | 11 ++++++-----
.../CoreModules/World/Terrain/FloodBrushes/LowerArea.cs | 10 +++++-----
.../CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs | 13 ++++++-------
.../CoreModules/World/Terrain/FloodBrushes/RaiseArea.cs | 10 +++++-----
.../CoreModules/World/Terrain/FloodBrushes/RevertArea.cs | 10 +++++-----
.../CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs | 11 ++++++-----
6 files changed, 33 insertions(+), 32 deletions(-)
(limited to 'OpenSim/Region/CoreModules/World/Terrain/FloodBrushes')
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs
index 774e7b2..0c4171e 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/FlattenArea.cs
@@ -33,15 +33,16 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
{
#region ITerrainFloodEffect Members
- public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
+ public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength,
+ int startX, int endX, int startY, int endY)
{
double sum = 0.0;
double steps = 0.0;
int x, y;
- for (x = 0; x < map.Width; x++)
+ for (x = startX; x <= endX; x++)
{
- for (y = 0; y < map.Height; y++)
+ for (y = startY; y <= endY; y++)
{
if (fillArea[x, y])
{
@@ -55,9 +56,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
double str = 0.1 * strength; // == 0.2 in the default client
- for (x = 0; x < map.Width; x++)
+ for (x = startX; x <= endX; x++)
{
- for (y = 0; y < map.Height; y++)
+ for (y = startY; y <= endY; y++)
{
if (fillArea[x, y])
map[x, y] = (map[x, y] * (1.0 - str)) + (avg * str);
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/LowerArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/LowerArea.cs
index 3e87390..a275a86 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/LowerArea.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/LowerArea.cs
@@ -33,13 +33,13 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
{
#region ITerrainFloodEffect Members
- public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
+ public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength,
+ int startX, int endX, int startY, int endY)
{
- int x;
- for (x = 0; x < map.Width; x++)
+ int x,y;
+ for (x = startX; x <= endX; x++)
{
- int y;
- for (y = 0; y < map.Height; y++)
+ for (y = startY; y <= endY; y++)
{
if (fillArea[x, y])
{
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs
index b6c635c..d634e8b 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/NoiseArea.cs
@@ -35,18 +35,17 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
{
#region ITerrainFloodEffect Members
- public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
+ public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength,
+ int startX, int endX, int startY, int endY)
{
- int x;
- for (x = 0; x < map.Width; x++)
+ int x, y;
+ for (x = startX; x <= endX; x++)
{
- int y;
- for (y = 0; y < map.Height; y++)
+ for (y = startY; y <= endY; y++)
{
if (fillArea[x, y])
{
double noise = TerrainUtil.PerlinNoise2D((double) x / map.Width, (double) y / map.Height, 8, 1.0);
-
map[x, y] += noise * strength;
}
}
@@ -55,4 +54,4 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
#endregion
}
-}
\ No newline at end of file
+}
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/RaiseArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/RaiseArea.cs
index 3bdc5e7..6ccd5df 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/RaiseArea.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/RaiseArea.cs
@@ -33,13 +33,13 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
{
#region ITerrainFloodEffect Members
- public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
+ public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength,
+ int startX, int endX, int startY, int endY)
{
- int x;
- for (x = 0; x < map.Width; x++)
+ int x,y;
+ for (x = startX; x <= endX; x++)
{
- int y;
- for (y = 0; y < map.Height; y++)
+ for (y = startY; y <= endY; y++)
{
if (fillArea[x, y])
{
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/RevertArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/RevertArea.cs
index c5527fa..4230133 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/RevertArea.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/RevertArea.cs
@@ -46,13 +46,13 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
/// the current heightmap
/// array indicating which sections of the map are to be reverted
/// unused
- public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
+ public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength,
+ int startX, int endX, int startY, int endY)
{
- int x;
- for (x = 0; x < map.Width; x++)
+ int x, y;
+ for (x = startX; x <= endX; x++)
{
- int y;
- for (y = 0; y < map.Height; y++)
+ for (y = startY; y <= endY; y++)
{
if (fillArea[x, y])
{
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs
index 6b07747..6c0d60d 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/FloodBrushes/SmoothArea.cs
@@ -33,16 +33,17 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
{
#region ITerrainFloodEffect Members
- public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength)
+ public void FloodEffect(ITerrainChannel map, bool[,] fillArea, double strength,
+ int startX, int endX, int startY, int endY)
{
double area = strength;
double step = strength / 4.0;
double[,] manipulate = new double[map.Width,map.Height];
int x, y;
- for (x = 0; x < map.Width; x++)
+ for (x = startX; x <= endX; x++)
{
- for (y = 0; y < map.Height; y++)
+ for (y = startY; y <= endY; y++)
{
if (!fillArea[x, y])
continue;
@@ -64,9 +65,9 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
manipulate[x, y] = average / avgsteps;
}
}
- for (x = 0; x < map.Width; x++)
+ for (x = startX; x <= endX; x++)
{
- for (y = 0; y < map.Height; y++)
+ for (y = startY; y <= endY; y++)
{
if (!fillArea[x, y])
continue;
--
cgit v1.1