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/Avatar.Update.cs | 2 +- OpenSim/OpenSim.Region/Scenes/Scene.cs | 29 +++++++++++++++++--------- 2 files changed, 20 insertions(+), 11 deletions(-) (limited to 'OpenSim/OpenSim.Region') diff --git a/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs b/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs index 50d5a14..534bda4 100644 --- a/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs +++ b/OpenSim/OpenSim.Region/Scenes/Avatar.Update.cs @@ -87,7 +87,7 @@ namespace OpenSim.Region.Scenes /// public void SendInitialPosition() { - this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.localid, new LLVector3(128, 128, 60)); + this.ControllingClient.SendAvatarData(m_regionInfo, this.firstname, this.lastname, this.uuid, this.localid, this.Pos); } /// 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