OpenSim.Region.CoreModules.World.Voxels.VoxelModule.client_OnModifyTerrain C# (CSharp) Метод

client_OnModifyTerrain() приватный Метод

private client_OnModifyTerrain ( UUID user, int x, int y, int z, byte action, double str, UUID agentId ) : void
user UUID
x int
y int
z int
action byte
str double
agentId UUID
Результат void
        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
                }
            }
        }