From 82d309d00765944654db023416a104d96de04328 Mon Sep 17 00:00:00 2001
From: MW
Date: Mon, 18 Jun 2007 14:41:38 +0000
Subject: Fixed the flashing when crossing a border.
---
OpenSim/OpenSim.Region/Scenes/Scene.cs | 29 +++++++++++++++++++----------
1 file changed, 19 insertions(+), 10 deletions(-)
(limited to 'OpenSim/OpenSim.Region/Scenes/Scene.cs')
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index 5744f1f..cb3865f 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -446,15 +446,7 @@ namespace OpenSim.Region.Scenes
this.Terrain.setHeights1D(map);
}
- //create a texture asset of the terrain
- byte[] data =this.Terrain.exportJpegImage("defaultstripe.png");
- this.m_regInfo.estateSettings.terrainImageID= LLUUID.Random();
- AssetBase asset = new AssetBase();
- asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
- asset.Data = data;
- asset.Name = "terrainImage";
- asset.Type = 0;
- this.assetCache.AddAsset(asset);
+ CreateTerrainTexture();
}
catch (Exception e)
@@ -462,6 +454,23 @@ namespace OpenSim.Region.Scenes
OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
}
}
+
+
+ ///
+ ///
+ ///
+ private void CreateTerrainTexture()
+ {
+ //create a texture asset of the terrain
+ byte[] data = this.Terrain.exportJpegImage("defaultstripe.png");
+ this.m_regInfo.estateSettings.terrainImageID = LLUUID.Random();
+ AssetBase asset = new AssetBase();
+ asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
+ asset.Data = data;
+ asset.Name = "terrainImage";
+ asset.Type = 0;
+ this.assetCache.AddAsset(asset);
+ }
#endregion
#region Primitives Methods
@@ -818,7 +827,7 @@ namespace OpenSim.Region.Scenes
///
public override void SendLayerData(int px, int py, IClientAPI RemoteClient)
{
- RemoteClient.SendLayerData( Terrain.getHeights1D() );
+ RemoteClient.SendLayerData(px, py, Terrain.getHeights1D());
}
}
}
--
cgit v1.1