Test storing terrain texture to grid assetserver on startup. Needed for main map functionality.

afrisby
Brian McBee 2007-11-24 03:55:35 +00:00
parent 944b118c62
commit 892f942523
1 changed files with 14 additions and 1 deletions

View File

@ -563,7 +563,7 @@ namespace OpenSim.Region.Environment.Scenes
Terrain.SetHeights2D(map);
}
CreateTerrainTexture();
CreateTerrainTextureInitial();
CommsManager.GridService.RegisterRegion(RegionInfo); //hack to update the terrain texture in grid mode so it shows on world map
}
catch (Exception e)
@ -589,6 +589,19 @@ namespace OpenSim.Region.Environment.Scenes
AssetCache.AddAsset(asset);
}
public void CreateTerrainTextureInitial()
{
//create a texture asset of the terrain
byte[] data = Terrain.ExportJpegImage("defaultstripe.png");
m_regInfo.EstateSettings.terrainImageID = LLUUID.Random();
AssetBase asset = new AssetBase();
asset.FullID = m_regInfo.EstateSettings.terrainImageID;
asset.Data = data;
asset.Name = "terrainImage";
asset.Type = 0;
asset.Temporary = false;
AssetCache.AddAsset(asset);
}
#endregion
#region Primitives Methods