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.

This commit is contained in:
MW
2007-06-17 18:04:35 +00:00
parent 45d407c7b5
commit ef494fdf9c
20 changed files with 86 additions and 71 deletions

View File

@@ -60,7 +60,7 @@ namespace OpenSim.Region.Scenes
}
}
this.CheckBorderCrossing();
this.CheckForBorderCrossing();
}
}
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Scenes
/// <summary>
///
/// </summary>
protected void CheckBorderCrossing()
protected void CheckForBorderCrossing()
{
LLVector3 pos2 = this.Pos;
LLVector3 vel = this.Velocity;

View File

@@ -228,24 +228,6 @@ namespace OpenSim.Region.Scenes
}
}
/// <summary>
///
/// </summary>
/// <param name="pack"></param>
public void HandleAgentUpdate(Packet pack)
{
this.HandleUpdate((AgentUpdatePacket)pack);
}
/// <summary>
///
/// </summary>
/// <param name="pack"></param>
public void HandleUpdate(AgentUpdatePacket pack)
{
}
/// <summary>
///
/// </summary>

View File

@@ -424,6 +424,17 @@ 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);
}
catch (Exception e)
{