Small refactoring on Terrain Update sending, so that other code can force terrain updates to be sent to clients.
parent
33c4631c6d
commit
542cd417c8
|
@ -718,6 +718,15 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
|
||||
m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID);
|
||||
|
||||
SendTerrainUpdate(true);
|
||||
|
||||
Terrain.ResetTaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void SendTerrainUpdate(bool checkForTainted)
|
||||
{
|
||||
float[] terData = Terrain.GetHeights1D();
|
||||
|
||||
Broadcast(delegate(IClientAPI client)
|
||||
|
@ -726,17 +735,13 @@ namespace OpenSim.Region.Environment.Scenes
|
|||
{
|
||||
for (int y = 0; y < 16; y++)
|
||||
{
|
||||
if (Terrain.IsTainted(x*16, y*16))
|
||||
if ((!checkForTainted) || (Terrain.IsTainted(x * 16, y * 16)))
|
||||
{
|
||||
client.SendLayerData(x, y, terData);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Terrain.ResetTaint();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateStorageBackup()
|
||||
|
|
Loading…
Reference in New Issue