From 2760378f7ae9fc9b804b9a4a2936ea7c38e75876 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Tue, 24 Jul 2007 05:54:44 +0000
Subject: * Users doing terraforming should see updates instantly now. * Other
viewers in the sim will see updates no more than once every 5 seconds.
---
.../ClientStack/ClientView.ProcessPackets.cs | 2 +-
.../Environment/Scenes/Scene.PacketHandlers.cs | 4 +--
OpenSim/Region/Environment/Scenes/Scene.cs | 30 +---------------------
3 files changed, 4 insertions(+), 32 deletions(-)
(limited to 'OpenSim/Region')
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
if (OnModifyTerrain != null)
{
OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, modify.ModifyBlock.BrushSize,
- modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West);
+ modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West, this);
}
}
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
/// The action to be performed
/// Distance from the north border where the cursor is located
/// Distance from the west border where the cursor is located
- public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west)
+ public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, IClientAPI remoteUser)
{
// Shiny.
double size = (double)(1 << brushsize);
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Environment.Scenes
break;
}
- RegenerateTerrain(true, (int)(north / 16.0f), (int)(west / 16.0f));
+ remoteUser.SendLayerData((int)(west / 16), (int)(north / 16), Terrain.GetHeights1D());
return;
}
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
}
terrainCheckCount++;
- if (terrainCheckCount >= 5)
+ if (terrainCheckCount >= 50)
{
terrainCheckCount = 0;
@@ -373,34 +373,6 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- ///
- /// Rebuilds the terrain assuming changes occured at a specified point[?]
- ///
- /// ???
- /// ???
- /// ???
- public void RegenerateTerrain(bool changes, int pointx, int pointy)
- {
- try
- {
- if (changes)
- {
- /* Dont save here, rely on tainting system instead */
-
- float[] terrain = Terrain.GetHeights1D();
-
- ForEachScenePresence(delegate(ScenePresence presence)
- {
- SendLayerData(pointx, pointy, presence.ControllingClient, terrain);
- });
- }
- }
- catch (Exception e)
- {
- MainLog.Instance.Warn("terrain", "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
- }
- }
-
#endregion
#region Load Terrain
--
cgit v1.1