aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/OpenSim.Region/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2007-06-17 18:04:35 +0000
committerMW2007-06-17 18:04:35 +0000
commitef494fdf9c24387c2d98ffde5400f93fa276aa9e (patch)
tree9a0a30ef5903b527e3e265d5175ee07c8c57781b /OpenSim/OpenSim.Region/Scenes/Scene.cs
parent* SimpleApp: (diff)
downloadopensim-SC_OLD-ef494fdf9c24387c2d98ffde5400f93fa276aa9e.zip
opensim-SC_OLD-ef494fdf9c24387c2d98ffde5400f93fa276aa9e.tar.gz
opensim-SC_OLD-ef494fdf9c24387c2d98ffde5400f93fa276aa9e.tar.bz2
opensim-SC_OLD-ef494fdf9c24387c2d98ffde5400f93fa276aa9e.tar.xz
Each Region will now generate a texture image of their terrain and this will be used by the map. Note: Currently each region generates a new image every time they start; even if the terrain is read from the database. And also they don't update it when the terrain changes.
Diffstat (limited to 'OpenSim/OpenSim.Region/Scenes/Scene.cs')
-rw-r--r--OpenSim/OpenSim.Region/Scenes/Scene.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.Region/Scenes/Scene.cs b/OpenSim/OpenSim.Region/Scenes/Scene.cs
index eb942c2..ca9a112 100644
--- a/OpenSim/OpenSim.Region/Scenes/Scene.cs
+++ b/OpenSim/OpenSim.Region/Scenes/Scene.cs
@@ -424,6 +424,17 @@ namespace OpenSim.Region.Scenes
424 { 424 {
425 this.Terrain.setHeights1D(map); 425 this.Terrain.setHeights1D(map);
426 } 426 }
427
428 //create a texture asset of the terrain
429 byte[] data =this.Terrain.exportJpegImage("defaultstripe.png");
430 this.m_regInfo.estateSettings.terrainImageID= LLUUID.Random();
431 AssetBase asset = new AssetBase();
432 asset.FullID = this.m_regInfo.estateSettings.terrainImageID;
433 asset.Data = data;
434 asset.Name = "terrainImage";
435 asset.Type = 0;
436 this.assetCache.AddAsset(asset);
437
427 } 438 }
428 catch (Exception e) 439 catch (Exception e)
429 { 440 {