diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Terrain')
12 files changed, 21 insertions, 21 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs index 1e67f72..bcd9dcd 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/GenericSystemDrawing.cs | |||
@@ -247,4 +247,4 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
247 | } | 247 | } |
248 | } | 248 | } |
249 | 249 | ||
250 | 250 | ||
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs index 36c2bbf..d604dc7 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/JPEG.cs | |||
@@ -104,10 +104,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
104 | using (Bitmap gradientmapLd = new Bitmap("defaultstripe.png")) | 104 | using (Bitmap gradientmapLd = new Bitmap("defaultstripe.png")) |
105 | { | 105 | { |
106 | pallete = gradientmapLd.Height; | 106 | pallete = gradientmapLd.Height; |
107 | 107 | ||
108 | bmp = new Bitmap(map.Width, map.Height); | 108 | bmp = new Bitmap(map.Width, map.Height); |
109 | colours = new Color[pallete]; | 109 | colours = new Color[pallete]; |
110 | 110 | ||
111 | for (int i = 0; i < pallete; i++) | 111 | for (int i = 0; i < pallete; i++) |
112 | { | 112 | { |
113 | colours[i] = gradientmapLd.GetPixel(0, i); | 113 | colours[i] = gradientmapLd.GetPixel(0, i); |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs index 59994e4..68d6ed2 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/FileLoaders/LLRAW.cs | |||
@@ -275,6 +275,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain.FileLoaders | |||
275 | public bool SupportsTileSave() | 275 | public bool SupportsTileSave() |
276 | { | 276 | { |
277 | return false; | 277 | return false; |
278 | } | 278 | } |
279 | } | 279 | } |
280 | } \ No newline at end of file | 280 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs b/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs index 6324aca..f7be25f 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/ITerrainFloodEffect.cs | |||
@@ -32,7 +32,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
32 | { | 32 | { |
33 | public interface ITerrainFloodEffect | 33 | public interface ITerrainFloodEffect |
34 | { | 34 | { |
35 | void FloodEffect(ITerrainChannel map, Boolean[,] fillArea, double strength, | 35 | void FloodEffect(ITerrainChannel map, Boolean[,] fillArea, double strength, |
36 | int startX, int endX, int startY, int endY); | 36 | int startX, int endX, int startY, int endY); |
37 | } | 37 | } |
38 | } \ No newline at end of file | 38 | } \ No newline at end of file |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs b/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs index 3ba3657..855d131 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/ITerrainLoader.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
33 | public interface ITerrainLoader | 33 | public interface ITerrainLoader |
34 | { | 34 | { |
35 | // Returns true if that extension can be used for terrain save-tile | 35 | // Returns true if that extension can be used for terrain save-tile |
36 | // (Look into each file in Region.CoreModules.World.Terrain.FileLoaders) | 36 | // (Look into each file in Region.CoreModules.World.Terrain.FileLoaders) |
37 | bool SupportsTileSave(); | 37 | bool SupportsTileSave(); |
38 | 38 | ||
39 | string FileExtension { get; } | 39 | string FileExtension { get; } |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs index 8937f63..9d3d4cb 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/FlattenSphere.cs | |||
@@ -77,7 +77,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes | |||
77 | { | 77 | { |
78 | map[x, y] += delta; | 78 | map[x, y] += delta; |
79 | } | 79 | } |
80 | 80 | ||
81 | } | 81 | } |
82 | } | 82 | } |
83 | } | 83 | } |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs index bbf9407..a88a022 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/LowerSphere.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes | |||
58 | map[x, y] = 0.0; | 58 | map[x, y] = 0.0; |
59 | else | 59 | else |
60 | map[x, y] = newz; | 60 | map[x, y] = newz; |
61 | } | 61 | } |
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs index 1b704bb..5305cb4 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RaiseSphere.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes | |||
33 | public class RaiseSphere : ITerrainPaintableEffect | 33 | public class RaiseSphere : ITerrainPaintableEffect |
34 | { | 34 | { |
35 | #region ITerrainPaintableEffect Members | 35 | #region ITerrainPaintableEffect Members |
36 | 36 | ||
37 | 37 | ||
38 | public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, | 38 | public void PaintEffect(ITerrainChannel map, bool[,] mask, double rx, double ry, double rz, |
39 | double strength, double duration, int startX, int endX, int startY, int endY) | 39 | double strength, double duration, int startX, int endX, int startY, int endY) |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs index efc5324..ca30e9e 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/RevertSphere.cs | |||
@@ -46,7 +46,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes | |||
46 | { | 46 | { |
47 | strength = TerrainUtil.MetersToSphericalStrength(strength); | 47 | strength = TerrainUtil.MetersToSphericalStrength(strength); |
48 | duration = 0.03; //MCP Should be read from ini file | 48 | duration = 0.03; //MCP Should be read from ini file |
49 | 49 | ||
50 | if (duration > 1.0) | 50 | if (duration > 1.0) |
51 | duration = 1.0; | 51 | duration = 1.0; |
52 | if (duration < 0) | 52 | if (duration < 0) |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs index 65dd0a6..0342962 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/PaintBrushes/SmoothSphere.cs | |||
@@ -42,10 +42,10 @@ namespace OpenSim.Region.CoreModules.World.Terrain.PaintBrushes | |||
42 | int x, y; | 42 | int x, y; |
43 | double[,] tweak = new double[map.Width,map.Height]; | 43 | double[,] tweak = new double[map.Width,map.Height]; |
44 | 44 | ||
45 | double area = strength; | 45 | double area = strength; |
46 | double step = strength / 4.0; | 46 | double step = strength / 4.0; |
47 | duration = 0.03; //MCP Should be read from ini file | 47 | duration = 0.03; //MCP Should be read from ini file |
48 | 48 | ||
49 | 49 | ||
50 | // compute delta map | 50 | // compute delta map |
51 | for (x = startX; x <= endX; x++) | 51 | for (x = startX; x <= endX; x++) |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs index e21681d..65d4c4a 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs | |||
@@ -218,7 +218,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
218 | if (terrainConfig != null) | 218 | if (terrainConfig != null) |
219 | { | 219 | { |
220 | m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain); | 220 | m_InitialTerrain = terrainConfig.GetString("InitialTerrain", m_InitialTerrain); |
221 | m_sendTerrainUpdatesByViewDistance = | 221 | m_sendTerrainUpdatesByViewDistance = |
222 | terrainConfig.GetBoolean( | 222 | terrainConfig.GetBoolean( |
223 | "SendTerrainUpdatesByViewDistance",m_sendTerrainUpdatesByViewDistance); | 223 | "SendTerrainUpdatesByViewDistance",m_sendTerrainUpdatesByViewDistance); |
224 | } | 224 | } |
@@ -240,7 +240,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
240 | if(m_baked != null) | 240 | if(m_baked != null) |
241 | m_channel = m_baked.MakeCopy(); | 241 | m_channel = m_baked.MakeCopy(); |
242 | else | 242 | else |
243 | m_channel = new TerrainChannel(m_InitialTerrain, | 243 | m_channel = new TerrainChannel(m_InitialTerrain, |
244 | (int)m_scene.RegionInfo.RegionSizeX, | 244 | (int)m_scene.RegionInfo.RegionSizeX, |
245 | (int)m_scene.RegionInfo.RegionSizeY, | 245 | (int)m_scene.RegionInfo.RegionSizeY, |
246 | (int)m_scene.RegionInfo.RegionSizeZ); | 246 | (int)m_scene.RegionInfo.RegionSizeZ); |
@@ -463,7 +463,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
463 | throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename)); | 463 | throw new TerrainException(String.Format("unable to load heightmap from file {0}: no loader available for that format", filename)); |
464 | } | 464 | } |
465 | 465 | ||
466 | public void LoadFromStream(string filename, Vector3 displacement, | 466 | public void LoadFromStream(string filename, Vector3 displacement, |
467 | float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream) | 467 | float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream) |
468 | { | 468 | { |
469 | foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) | 469 | foreach (KeyValuePair<string, ITerrainLoader> loader in m_loaders) |
@@ -724,7 +724,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
724 | 724 | ||
725 | /// <summary> | 725 | /// <summary> |
726 | /// Saves the current state of the region into the baked map buffer. | 726 | /// Saves the current state of the region into the baked map buffer. |
727 | 727 | ||
728 | /// </summary> | 728 | /// </summary> |
729 | public void UpdateBakedMap() | 729 | public void UpdateBakedMap() |
730 | { | 730 | { |
@@ -825,7 +825,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
825 | m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave); | 825 | m_scene.RegionInfo.RegionName, filename, m_supportFileExtensionsForTileSave); |
826 | } | 826 | } |
827 | 827 | ||
828 | 828 | ||
829 | /// <summary> | 829 | /// <summary> |
830 | /// This is used to check to see of any of the terrain is tainted and, if so, schedule | 830 | /// This is used to check to see of any of the terrain is tainted and, if so, schedule |
831 | /// updates for all the presences. | 831 | /// updates for all the presences. |
@@ -945,7 +945,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
945 | lock (m_perClientPatchUpdates) | 945 | lock (m_perClientPatchUpdates) |
946 | m_perClientPatchUpdates.Remove(client); | 946 | m_perClientPatchUpdates.Remove(client); |
947 | } | 947 | } |
948 | 948 | ||
949 | /// <summary> | 949 | /// <summary> |
950 | /// Scan over changes in the terrain and limit height changes. This enforces the | 950 | /// Scan over changes in the terrain and limit height changes. This enforces the |
951 | /// non-estate owner limits on rate of terrain editting. | 951 | /// non-estate owner limits on rate of terrain editting. |
@@ -1312,7 +1312,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain | |||
1312 | } | 1312 | } |
1313 | } | 1313 | } |
1314 | return ret; | 1314 | return ret; |
1315 | } | 1315 | } |
1316 | 1316 | ||
1317 | private void client_OnModifyTerrain(UUID user, float height, float seconds, byte size, byte action, | 1317 | private void client_OnModifyTerrain(UUID user, float height, float seconds, byte size, byte action, |
1318 | float north, float west, float south, float east, UUID agentId) | 1318 | float north, float west, float south, float east, UUID agentId) |
diff --git a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs index 0563ad0..6a832bc 100644 --- a/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs +++ b/OpenSim/Region/CoreModules/World/Terrain/Tests/TerrainModuleTests.cs | |||
@@ -45,8 +45,8 @@ namespace OpenSim.Region.CoreModules.Terrain.Tests | |||
45 | //UUID userId = TestHelpers.ParseTail(0x1); | 45 | //UUID userId = TestHelpers.ParseTail(0x1); |
46 | 46 | ||
47 | TerrainModule tm = new TerrainModule(); | 47 | TerrainModule tm = new TerrainModule(); |
48 | Scene scene = new SceneHelpers().SetupScene(); | 48 | Scene scene = new SceneHelpers().SetupScene(); |
49 | SceneHelpers.SetupSceneModules(scene, tm); | 49 | SceneHelpers.SetupSceneModules(scene, tm); |
50 | 50 | ||
51 | // Fillheight of 30 | 51 | // Fillheight of 30 |
52 | { | 52 | { |