* 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.
0.6.0-stable
Adam Frisby 2008-03-08 23:28:29 +00:00
parent f88324d6cd
commit 1011bbf39d
2 changed files with 14 additions and 4 deletions

View File

@ -211,13 +211,13 @@ namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
coords[1] += y;
if (coords[0] > map.Width - 1)
coords[0] = map.Width - 1;
continue;
if (coords[1] > map.Height - 1)
coords[1] = map.Height - 1;
continue;
if (coords[0] < 0)
coords[0] = 0;
continue;
if (coords[1] < 0)
coords[1] = 0;
continue;
double heightF = map[x, y];
double target = map[coords[0], coords[1]];

View File

@ -332,6 +332,16 @@ namespace OpenSim.Region.Environment.Modules.Terrain
m_channel[x, y] = Double.Parse(param);
SendUpdatedLayerData();
break;
case "newbrushes":
if (Boolean.Parse(param))
{
m_painteffects[StandardTerrainEffects.Revert] = new PaintBrushes.WeatherSphere();
}
else
{
InstallDefaultEffects();
}
break;
default:
m_log.Warn("Unknown terrain command.");
break;