aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2007-06-18 14:41:38 +0000
committerMW2007-06-18 14:41:38 +0000
commit82d309d00765944654db023416a104d96de04328 (patch)
tree51b0f366479231b0061be1dad9df7823cf3e7457 /OpenSim/OpenSim.Region/Scenes/Scene.cs
parentFixed inverted map texture problem. (diff)
downloadopensim-SC_OLD-82d309d00765944654db023416a104d96de04328.zip
opensim-SC_OLD-82d309d00765944654db023416a104d96de04328.tar.gz
opensim-SC_OLD-82d309d00765944654db023416a104d96de04328.tar.bz2
opensim-SC_OLD-82d309d00765944654db023416a104d96de04328.tar.xz
Fixed the flashing when crossing a border.
Diffstat (limited to '')
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.cs29
1 files changed, 19 insertions, 10 deletions
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
446 this.Terrain.setHeights1D(map); 446 this.Terrain.setHeights1D(map);
447 } 447 }
448 448
449 //create a texture asset of the terrain 449 CreateTerrainTexture();
450 byte[] data =this.Terrain.exportJpegImage("defaultstripe.png");
451 this.m_regInfo.estateSettings.terrainImageID= LLUUID.Random();
452 AssetBase asset = new AssetBase();
453 asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
454 asset.Data = data;
455 asset.Name = "terrainImage";
456 asset.Type = 0;
457 this.assetCache.AddAsset(asset);
458 450
459 } 451 }
460 catch (Exception e) 452 catch (Exception e)
@@ -462,6 +454,23 @@ namespace OpenSim.Region.Scenes
462 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString()); 454 OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.MEDIUM, "World.cs: LoadWorldMap() - Failed with exception " + e.ToString());
463 } 455 }
464 } 456 }
457
458
459 /// <summary>
460 ///
461 /// </summary>
462 private void CreateTerrainTexture()
463 {
464 //create a texture asset of the terrain
465 byte[] data = this.Terrain.exportJpegImage("defaultstripe.png");
466 this.m_regInfo.estateSettings.terrainImageID = LLUUID.Random();
467 AssetBase asset = new AssetBase();
468 asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
469 asset.Data = data;
470 asset.Name = "terrainImage";
471 asset.Type = 0;
472 this.assetCache.AddAsset(asset);
473 }
465 #endregion 474 #endregion
466 475
467 #region Primitives Methods 476 #region Primitives Methods
@@ -818,7 +827,7 @@ namespace OpenSim.Region.Scenes
818 /// <param name="RemoteClient"></param> 827 /// <param name="RemoteClient"></param>
819 public override void SendLayerData(int px, int py, IClientAPI RemoteClient) 828 public override void SendLayerData(int px, int py, IClientAPI RemoteClient)
820 { 829 {
821 RemoteClient.SendLayerData( Terrain.getHeights1D() ); 830 RemoteClient.SendLayerData(px, py, Terrain.getHeights1D());
822 } 831 }
823 } 832 }
824} 833}