aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorAdam Frisby2007-07-24 05:54:44 +0000
committerAdam Frisby2007-07-24 05:54:44 +0000
commit2760378f7ae9fc9b804b9a4a2936ea7c38e75876 (patch)
treeab7ff67cde1d44231b2cb32b0e703ad1d7ad3bf5 /OpenSim
parent* SendLayerData overload including coords now uses patch number rather than c... (diff)
downloadopensim-SC_OLD-2760378f7ae9fc9b804b9a4a2936ea7c38e75876.zip
opensim-SC_OLD-2760378f7ae9fc9b804b9a4a2936ea7c38e75876.tar.gz
opensim-SC_OLD-2760378f7ae9fc9b804b9a4a2936ea7c38e75876.tar.bz2
opensim-SC_OLD-2760378f7ae9fc9b804b9a4a2936ea7c38e75876.tar.xz
* Users doing terraforming should see updates instantly now.
* Other viewers in the sim will see updates no more than once every 5 seconds.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/General/Interfaces/IClientAPI.cs2
-rw-r--r--OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs4
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs30
4 files changed, 5 insertions, 33 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
index c2af2f4..e13016b 100644
--- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs
+++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework.Interfaces
37 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); 37 public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
38 public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list 38 public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list
39 public delegate void RezObject(AssetBase primAsset, LLVector3 pos); 39 public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
40 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west); 40 public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient);
41 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); 41 public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
42 public delegate void StartAnim(LLUUID animID, int seq); 42 public delegate void StartAnim(LLUUID animID, int seq);
43 public delegate void LinkObjects(uint parent, List<uint> children); 43 public delegate void LinkObjects(uint parent, List<uint> children);
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