* Users doing terraforming should see updates instantly now.
* Other viewers in the sim will see updates no more than once every 5 seconds.afrisby
parent
b9af2fe393
commit
2760378f7a
|
@ -37,7 +37,7 @@ namespace OpenSim.Framework.Interfaces
|
||||||
public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID);
|
||||||
public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list
|
public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list
|
||||||
public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
|
public delegate void RezObject(AssetBase primAsset, LLVector3 pos);
|
||||||
public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west);
|
public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west, IClientAPI remoteClient);
|
||||||
public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
|
public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam);
|
||||||
public delegate void StartAnim(LLUUID animID, int seq);
|
public delegate void StartAnim(LLUUID animID, int seq);
|
||||||
public delegate void LinkObjects(uint parent, List<uint> children);
|
public delegate void LinkObjects(uint parent, List<uint> children);
|
||||||
|
|
|
@ -135,7 +135,7 @@ namespace OpenSim.Region.ClientStack
|
||||||
if (OnModifyTerrain != null)
|
if (OnModifyTerrain != null)
|
||||||
{
|
{
|
||||||
OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, modify.ModifyBlock.BrushSize,
|
OnModifyTerrain(modify.ModifyBlock.Height, modify.ModifyBlock.Seconds, modify.ModifyBlock.BrushSize,
|
||||||
modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West);
|
modify.ModifyBlock.Action, modify.ParcelData[0].North, modify.ParcelData[0].West, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -48,7 +48,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="action">The action to be performed</param>
|
/// <param name="action">The action to be performed</param>
|
||||||
/// <param name="north">Distance from the north border where the cursor is located</param>
|
/// <param name="north">Distance from the north border where the cursor is located</param>
|
||||||
/// <param name="west">Distance from the west border where the cursor is located</param>
|
/// <param name="west">Distance from the west border where the cursor is located</param>
|
||||||
public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west)
|
public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, IClientAPI remoteUser)
|
||||||
{
|
{
|
||||||
// Shiny.
|
// Shiny.
|
||||||
double size = (double)(1 << brushsize);
|
double size = (double)(1 << brushsize);
|
||||||
|
@ -92,7 +92,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
RegenerateTerrain(true, (int)(north / 16.0f), (int)(west / 16.0f));
|
remoteUser.SendLayerData((int)(west / 16), (int)(north / 16), Terrain.GetHeights1D());
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
|
|
||||||
terrainCheckCount++;
|
terrainCheckCount++;
|
||||||
if (terrainCheckCount >= 5)
|
if (terrainCheckCount >= 50)
|
||||||
{
|
{
|
||||||
terrainCheckCount = 0;
|
terrainCheckCount = 0;
|
||||||
|
|
||||||
|
@ -373,34 +373,6 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Rebuilds the terrain assuming changes occured at a specified point[?]
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="changes">???</param>
|
|
||||||
/// <param name="pointx">???</param>
|
|
||||||
/// <param name="pointy">???</param>
|
|
||||||
public void RegenerateTerrain(bool changes, int pointx, int pointy)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (changes)
|
|
||||||
{
|
|
||||||
/* Dont save here, rely on tainting system instead */
|
|
||||||
|
|
||||||
float[] terrain = Terrain.GetHeights1D();
|
|
||||||
|
|
||||||
ForEachScenePresence(delegate(ScenePresence presence)
|
|
||||||
{
|
|
||||||
SendLayerData(pointx, pointy, presence.ControllingClient, terrain);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
MainLog.Instance.Warn("terrain", "World.cs: RegenerateTerrain() - Failed with exception " + e.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Load Terrain
|
#region Load Terrain
|
||||||
|
|
Loading…
Reference in New Issue