aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2008-03-29 17:18:47 +0000
committerMW2008-03-29 17:18:47 +0000
commit7fcffa3a3a231a77d00bf2ec1772f0914073d28f (patch)
treeb5fa20f2a997edff3150f6643b7a123751e614f4 /OpenSim/Region/Environment/Scenes/Scene.cs
parentFix compiler warnings in BulletXPlugin. (diff)
downloadopensim-SC-7fcffa3a3a231a77d00bf2ec1772f0914073d28f.zip
opensim-SC-7fcffa3a3a231a77d00bf2ec1772f0914073d28f.tar.gz
opensim-SC-7fcffa3a3a231a77d00bf2ec1772f0914073d28f.tar.bz2
opensim-SC-7fcffa3a3a231a77d00bf2ec1772f0914073d28f.tar.xz
Re-enabled terrain texture generation for the world map. Adam can clean up/ sort it out when he gets time.
Most likely doesn't really work in grid mode as the generated textures are marked as temporary and I don't think they are updated to the asset server. We have to either live with these textures being sent to the asset server, and manually clean them out from time to time or wait until there is some asset management system in place. Also currently the texture is only generated at region startup, it is not updated after terraforming.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs29
1 files changed, 17 insertions, 12 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index b8a4831..c07f718 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -946,6 +946,7 @@ namespace OpenSim.Region.Environment.Scenes
946 { 946 {
947 Heightmap = new Modules.Terrain.TerrainChannel(map); 947 Heightmap = new Modules.Terrain.TerrainChannel(map);
948 } 948 }
949
949 } 950 }
950 catch (Exception e) 951 catch (Exception e)
951 { 952 {
@@ -981,19 +982,23 @@ namespace OpenSim.Region.Environment.Scenes
981 public void CreateTerrainTexture(bool temporary) 982 public void CreateTerrainTexture(bool temporary)
982 { 983 {
983 //TODOADAM: Move this to TerrainModule 984 //TODOADAM: Move this to TerrainModule
984 /* 985
985 //create a texture asset of the terrain 986 //create a texture asset of the terrain
986 byte[] data = Terrain.WriteJpegImage("defaultstripe.png"); 987 ITerrainTemp terrain = RequestModuleInterface<ITerrainTemp>();
987 m_regInfo.EstateSettings.terrainImageID = LLUUID.Random(); 988 if (terrain != null)
988 AssetBase asset = new AssetBase(); 989 {
989 asset.FullID = m_regInfo.EstateSettings.terrainImageID; 990 byte[] data = terrain.WriteJpegImage("defaultstripe.png");
990 asset.Data = data; 991 m_regInfo.EstateSettings.terrainImageID = LLUUID.Random();
991 asset.Name = "terrainImage"; 992 AssetBase asset = new AssetBase();
992 asset.Description = RegionInfo.RegionName; 993 asset.FullID = m_regInfo.EstateSettings.terrainImageID;
993 asset.Type = 0; 994 asset.Data = data;
994 asset.Temporary = temporary; 995 asset.Name = "terrainImage";
995 AssetCache.AddAsset(asset); 996 asset.Description = RegionInfo.RegionName;
996 */ 997 asset.Type = 0;
998 asset.Temporary = temporary;
999 AssetCache.AddAsset(asset);
1000 }
1001
997 } 1002 }
998 1003
999 #endregion 1004 #endregion