aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs37
1 files changed, 25 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
index a5efeb8..7bae9ec 100644
--- a/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/CoreModules/World/Terrain/TerrainModule.cs
@@ -1128,20 +1128,32 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1128 int zx = (int) (west + 0.5); 1128 int zx = (int) (west + 0.5);
1129 int zy = (int) (north + 0.5); 1129 int zy = (int) (north + 0.5);
1130 1130
1131 int dx,dy; 1131
1132 for (dx=-n; dx<=n; dx++) 1132 int startX = zx - n;
1133 if (startX < 0)
1134 startX = 0;
1135
1136 int startY = zy - n;
1137 if (startY < 0)
1138 startY = 0;
1139
1140 int endX = zx + n;
1141 if (endX >= m_channel.Width)
1142 endX = m_channel.Width - 1;
1143 int endY = zy + n;
1144 if (endY >= m_channel.Height)
1145 endY = m_channel.Height - 1;
1146
1147 int x, y;
1148
1149 for (x = startX; x <= endX; x++)
1133 { 1150 {
1134 for (dy=-n; dy<=n; dy++) 1151 for (y = startY; y <= endY; y++)
1135 { 1152 {
1136 int x = zx + dx; 1153 if (m_scene.Permissions.CanTerraformLand(agentId, new Vector3(x, y, 0)))
1137 int y = zy + dy;
1138 if (x>=0 && y>=0 && x<m_channel.Width && y<m_channel.Height)
1139 { 1154 {
1140 if (m_scene.Permissions.CanTerraformLand(agentId, new Vector3(x,y,0))) 1155 allowMask[x, y] = true;
1141 { 1156 allowed = true;
1142 allowMask[x, y] = true;
1143 allowed = true;
1144 }
1145 } 1157 }
1146 } 1158 }
1147 } 1159 }
@@ -1149,7 +1161,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
1149 { 1161 {
1150 StoreUndoState(); 1162 StoreUndoState();
1151 m_painteffects[(StandardTerrainEffects) action].PaintEffect( 1163 m_painteffects[(StandardTerrainEffects) action].PaintEffect(
1152 m_channel, allowMask, west, south, height, size, seconds); 1164 m_channel, allowMask, west, south, height, size, seconds,
1165 startX, endX, startY, endY);
1153 1166
1154 //block changes outside estate limits 1167 //block changes outside estate limits
1155 if (!god) 1168 if (!god)