private void client_OnModifyTerrain(UUID user, int x, int y, int z, byte action, double str, UUID agentId)
{
bool god = m_scene.Permissions.IsGod(user);
bool allowed = false;
if (m_painteffects.ContainsKey((StandardVoxelActions) action))
{
bool[,] allowMask = new bool[m_channel.Width,m_channel.Length];
allowMask.Initialize();
if (x>=0 && y>=0 && z>=0 && x<m_channel.Width && y<m_channel.Length && z<m_channel.Height)
{
if (m_scene.Permissions.CanTerraformLand(agentId, new Vector3(x,y,0)))
{
allowMask[x, y] = true;
allowed = true;
}
}
if (allowed)
{
StoreUndoState();
m_painteffects[(StandardVoxelActions) action].PaintEffect(
m_channel, allowMask, x,y,z,str);
CheckForTerrainUpdates(); //revert changes outside estate limits
}
}
}