mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
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:
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user