29 using OpenSim.Region.CoreModules.World.Terrain;
30 using OpenSim.Region.CoreModules.World.Terrain.FloodBrushes;
31 using OpenSim.Region.Framework.Interfaces;
37 private readonly
int num_h = 4;
38 private readonly
int num_w = 4;
43 #region ITerrainEffect Members
56 Boolean[,] bitmap =
new bool[map.Width,map.Height];
57 for (
int x = 0; x < map.Width; x++)
59 for (
int y = 0; y < map.Height; y++)
65 for (
int i = 0; i < rounds; i++)
67 smoothFunction.FloodEffect(map, bitmap, 1.0, 0, map.Width - 1, 0, map.Height - 1);
73 for (
int x = 0; x < map.Width; x++)
74 for (
int y = 0; y < map.Height; y++)
80 int channelWidth = (int) Math.Floor((map.
Width / num_w) * 0.8);
81 int channelHeight = (int) Math.Floor((map.
Height / num_h) * 0.8);
82 int channelXOffset = (map.Width / num_w) - channelWidth;
83 int channelYOffset = (map.Height / num_h) - channelHeight;
85 for (
int x = 0; x < num_w; x++)
87 for (
int y = 0; y < num_h; y++)
89 int xoff = ((channelXOffset + channelWidth) * x) + (channelXOffset / 2);
90 int yoff = ((channelYOffset + channelHeight) * y) + (channelYOffset / 2);
92 Boolean[,] bitmap =
new bool[map.Width,map.Height];
94 for (
int dx = 0; dx < channelWidth; dx++)
96 for (
int dy = 0; dy < channelHeight; dy++)
98 bitmap[dx + xoff, dy + yoff] =
true;
102 raiseFunction.FloodEffect(map, bitmap, height, 0, map.Width - 1, 0, map.Height - 1);
void RunEffect(ITerrainChannel map)
Interactive OpenSim region server