diff options
author | Adam Frisby | 2008-03-08 23:28:29 +0000 |
---|---|---|
committer | Adam Frisby | 2008-03-08 23:28:29 +0000 |
commit | 1011bbf39de19a03487ecf246569f0e7ca54d775 (patch) | |
tree | 73654d5c9d2f481780377ead078617bf20ab9f48 /OpenSim/Region/Environment/Modules | |
parent | * Applying Mantis #737 - Fix for Terragen loader. Thanks Jonc. (diff) | |
download | opensim-SC_OLD-1011bbf39de19a03487ecf246569f0e7ca54d775.zip opensim-SC_OLD-1011bbf39de19a03487ecf246569f0e7ca54d775.tar.gz opensim-SC_OLD-1011bbf39de19a03487ecf246569f0e7ca54d775.tar.bz2 opensim-SC_OLD-1011bbf39de19a03487ecf246569f0e7ca54d775.tar.xz |
* Small optimisation on Weathering paint brush.
* Added "script terrain newbrushes <true|false>" to enable experimental terraforming brushes. Presently the 'revert' brush is replaced with the Weathering brush, when enabled.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/WeatherSphere.cs | 8 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs | 10 |
2 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/WeatherSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/WeatherSphere.cs index 17207f8..bede47e 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/WeatherSphere.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/WeatherSphere.cs | |||
@@ -211,13 +211,13 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes | |||
211 | coords[1] += y; | 211 | coords[1] += y; |
212 | 212 | ||
213 | if (coords[0] > map.Width - 1) | 213 | if (coords[0] > map.Width - 1) |
214 | coords[0] = map.Width - 1; | 214 | continue; |
215 | if (coords[1] > map.Height - 1) | 215 | if (coords[1] > map.Height - 1) |
216 | coords[1] = map.Height - 1; | 216 | continue; |
217 | if (coords[0] < 0) | 217 | if (coords[0] < 0) |
218 | coords[0] = 0; | 218 | continue; |
219 | if (coords[1] < 0) | 219 | if (coords[1] < 0) |
220 | coords[1] = 0; | 220 | continue; |
221 | 221 | ||
222 | double heightF = map[x, y]; | 222 | double heightF = map[x, y]; |
223 | double target = map[coords[0], coords[1]]; | 223 | double target = map[coords[0], coords[1]]; |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs index 6f9adc9..ca07443 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs | |||
@@ -332,6 +332,16 @@ namespace OpenSim.Region.Environment.Modules.Terrain | |||
332 | m_channel[x, y] = Double.Parse(param); | 332 | m_channel[x, y] = Double.Parse(param); |
333 | SendUpdatedLayerData(); | 333 | SendUpdatedLayerData(); |
334 | break; | 334 | break; |
335 | case "newbrushes": | ||
336 | if (Boolean.Parse(param)) | ||
337 | { | ||
338 | m_painteffects[StandardTerrainEffects.Revert] = new PaintBrushes.WeatherSphere(); | ||
339 | } | ||
340 | else | ||
341 | { | ||
342 | InstallDefaultEffects(); | ||
343 | } | ||
344 | break; | ||
335 | default: | 345 | default: |
336 | m_log.Warn("Unknown terrain command."); | 346 | m_log.Warn("Unknown terrain command."); |
337 | break; | 347 | break; |