mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
varregion: many more updates removing the constant RegionSize and replacing
with a passed region size. This time in the map code and grid services code.
This commit is contained in:
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FloodBrushes
|
||||
{
|
||||
if (fillArea[x, y])
|
||||
{
|
||||
double noise = TerrainUtil.PerlinNoise2D((double) x / Constants.RegionSize, (double) y / Constants.RegionSize, 8, 1.0);
|
||||
double noise = TerrainUtil.PerlinNoise2D((double) x / map.Width, (double) y / map.Height, 8, 1.0);
|
||||
|
||||
map[x, y] += noise * strength;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes
|
||||
z *= z;
|
||||
z -= ((x - rx) * (x - rx)) + ((y - ry) * (y - ry));
|
||||
|
||||
double noise = TerrainUtil.PerlinNoise2D(x / (double) Constants.RegionSize, y / (double) Constants.RegionSize, 8, 1.0);
|
||||
double noise = TerrainUtil.PerlinNoise2D(x / (double) map.Width, y / (double) map.Height, 8, 1.0);
|
||||
|
||||
if (z > 0.0)
|
||||
map[x, y] += noise * z * duration;
|
||||
|
||||
Reference in New Issue
Block a user