aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMW2008-02-05 15:03:08 +0000
committerMW2008-02-05 15:03:08 +0000
commit542cd417c844f55f1337bfd924ab5f7b7e71c4a6 (patch)
treec45c967924840345e281dc0f762a79db4169bc0c /OpenSim
parentsome small changes, like adding a couple of extra methods to IInventoryServic... (diff)
downloadopensim-SC-542cd417c844f55f1337bfd924ab5f7b7e71c4a6.zip
opensim-SC-542cd417c844f55f1337bfd924ab5f7b7e71c4a6.tar.gz
opensim-SC-542cd417c844f55f1337bfd924ab5f7b7e71c4a6.tar.bz2
opensim-SC-542cd417c844f55f1337bfd924ab5f7b7e71c4a6.tar.xz
Small refactoring on Terrain Update sending, so that other code can force terrain updates to be sent to clients.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs35
1 files changed, 20 insertions, 15 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index a80426b..1d688e3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -718,27 +718,32 @@ namespace OpenSim.Region.Environment.Scenes
718 718
719 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); 719 m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
720 720
721 float[] terData = Terrain.GetHeights1D(); 721 SendTerrainUpdate(true);
722
723 Broadcast(delegate(IClientAPI client)
724 {
725 for (int x = 0; x < 16; x++)
726 {
727 for (int y = 0; y < 16; y++)
728 {
729 if (Terrain.IsTainted(x*16, y*16))
730 {
731 client.SendLayerData(x, y, terData);
732 }
733 }
734 }
735 });
736 722
737 Terrain.ResetTaint(); 723 Terrain.ResetTaint();
738 } 724 }
739 } 725 }
740 } 726 }
741 727
728 public void SendTerrainUpdate(bool checkForTainted)
729 {
730 float[] terData = Terrain.GetHeights1D();
731
732 Broadcast(delegate(IClientAPI client)
733 {
734 for (int x = 0; x < 16; x++)
735 {
736 for (int y = 0; y < 16; y++)
737 {
738 if ((!checkForTainted) || (Terrain.IsTainted(x * 16, y * 16)))
739 {
740 client.SendLayerData(x, y, terData);
741 }
742 }
743 }
744 });
745 }
746
742 private void UpdateStorageBackup() 747 private void UpdateStorageBackup()
743 { 748 {
744 Backup(); 749 Backup();