diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 30 |
3 files changed, 4 insertions, 32 deletions
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 1613aa1..e5e872a 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -135,7 +135,7 @@ namespace OpenSim.Region.ClientStack | |||
135 | if (OnModifyTerrain != null) | 135 | if (OnModifyTerrain != null) |
136 | { | 136 | { |
137 | OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, modify.ModifyBlock.BrushSize, | 137 | OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, modify.ModifyBlock.BrushSize, |
138 | modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West); | 138 | modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West, this); |
139 | } | 139 | } |
140 | } | 140 | } |
141 | break; | 141 | break; |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index 571cead..b5faad5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
48 | /// <param name="action">The action to be performed</param> | 48 | /// <param name="action">The action to be performed</param> |
49 | /// <param name="north">Distance from the north border where the cursor is located</param> | 49 | /// <param name="north">Distance from the north border where the cursor is located</param> |
50 | /// <param name="west">Distance from the west border where the cursor is located</param> | 50 | /// <param name="west">Distance from the west border where the cursor is located</param> |
51 | public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west) | 51 | public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, IClientAPI remoteUser) |
52 | { | 52 | { |
53 | // Shiny. | 53 | // Shiny. |
54 | double size = (double)(1 << brushsize); | 54 | double size = (double)(1 << brushsize); |
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
92 | break; | 92 | break; |
93 | } | 93 | } |
94 | 94 | ||
95 | RegenerateTerrain(true, (int)(north / 16.0f), (int)(west / 16.0f)); | 95 | remoteUser.SendLayerData((int)(west / 16), (int)(north / 16), Terrain.GetHeights1D()); |
96 | 96 | ||
97 | return; | 97 | return; |
98 | } | 98 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index b2ae87d..9849145 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
237 | } | 237 | } |
238 | 238 | ||
239 | terrainCheckCount++; | 239 | terrainCheckCount++; |
240 | if (terrainCheckCount >= 5) | 240 | if (terrainCheckCount >= 50) |
241 | { | 241 | { |
242 | terrainCheckCount = 0; | 242 | terrainCheckCount = 0; |
243 | 243 | ||
@@ -373,34 +373,6 @@ namespace OpenSim.Region.Environment.Scenes | |||
373 | } | 373 | } |
374 | } | 374 | } |
375 | 375 | ||
376 | /// <summary> | ||
377 | /// Rebuilds the terrain assuming changes occured at a specified point[?] | ||
378 | /// </summary> | ||
379 | /// <param name="changes">???</param> | ||
380 | /// <param name="pointx">???</param> | ||
381 | /// <param name="pointy">???</param> | ||
382 | public void RegenerateTerrain(bool changes, int pointx, int pointy) | ||
383 | { | ||
384 | try | ||
385 | { | ||
386 | if (changes) | ||
387 | { | ||
388 | /* Dont save here, rely on tainting system instead */ | ||
389 | |||
390 | float[] terrain = Terrain.GetHeights1D(); | ||
391 | |||
392 | ForEachScenePresence(delegate(ScenePresence presence) | ||
393 | { | ||
394 | SendLayerData(pointx, pointy, presence.ControllingClient, terrain); | ||
395 | }); | ||
396 | } | ||
397 | } | ||
398 | catch (Exception e) | ||
399 | { | ||
400 | MainLog.Instance.Warn("terrain", "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString()); | ||
401 | } | ||
402 | } | ||
403 | |||
404 | #endregion | 376 | #endregion |
405 | 377 | ||
406 | #region Load Terrain | 378 | #region Load Terrain |