restore terrain modifiers, left out earlier bc of merge errors, (untested)

avinationmerge
UbitUmarov 2015-09-07 07:50:51 +01:00
parent cfcfa8f3d7
commit 3a8e76cdd1
2 changed files with 12 additions and 12 deletions

View File

@ -370,9 +370,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
} }
return mask; return mask;
} }
} }
} }

View File

@ -29,6 +29,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Reflection; using System.Reflection;
using System.Net; using System.Net;
using System.Threading;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
@ -36,7 +37,6 @@ using Nini.Config;
using OpenMetaverse; using OpenMetaverse;
using Mono.Addins; using Mono.Addins;
using OpenSim.Data;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Region.CoreModules.Framework.InterfaceCommander; using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
@ -86,7 +86,8 @@ namespace OpenSim.Region.CoreModules.World.Terrain
private readonly Dictionary<string, ITerrainLoader> m_loaders = new Dictionary<string, ITerrainLoader>(); private readonly Dictionary<string, ITerrainLoader> m_loaders = new Dictionary<string, ITerrainLoader>();
private readonly Dictionary<StandardTerrainEffects, ITerrainPaintableEffect> m_painteffects = private readonly Dictionary<StandardTerrainEffects, ITerrainPaintableEffect> m_painteffects =
new Dictionary<StandardTerrainEffects, ITerrainPaintableEffect>(); new Dictionary<StandardTerrainEffects, ITerrainPaintableEffect>();
private Dictionary<string, ITerrainModifier> m_modifyOperations =
new Dictionary<string, ITerrainModifier>();
private Dictionary<string, ITerrainEffect> m_plugineffects; private Dictionary<string, ITerrainEffect> m_plugineffects;
private ITerrainChannel m_channel; private ITerrainChannel m_channel;
private ITerrainChannel m_baked; private ITerrainChannel m_baked;
@ -643,7 +644,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
m_floodeffects[StandardTerrainEffects.Revert] = new RevertArea(m_baked); m_floodeffects[StandardTerrainEffects.Revert] = new RevertArea(m_baked);
// Terrain Modifier operations // Terrain Modifier operations
/*
m_modifyOperations["min"] = new MinModifier(this); m_modifyOperations["min"] = new MinModifier(this);
m_modifyOperations["max"] = new MaxModifier(this); m_modifyOperations["max"] = new MaxModifier(this);
m_modifyOperations["raise"] = new RaiseModifier(this); m_modifyOperations["raise"] = new RaiseModifier(this);
@ -651,7 +652,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
m_modifyOperations["fill"] = new FillModifier(this); m_modifyOperations["fill"] = new FillModifier(this);
m_modifyOperations["smooth"] = new SmoothModifier(this); m_modifyOperations["smooth"] = new SmoothModifier(this);
m_modifyOperations["noise"] = new NoiseModifier(this); m_modifyOperations["noise"] = new NoiseModifier(this);
*/
// Filesystem load/save loaders // Filesystem load/save loaders
m_loaders[".r32"] = new RAW32(); m_loaders[".r32"] = new RAW32();
m_loaders[".f32"] = m_loaders[".r32"]; m_loaders[".f32"] = m_loaders[".r32"];
@ -992,12 +993,16 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{ {
foreach (PatchUpdates pups in m_perClientPatchUpdates.Values) foreach (PatchUpdates pups in m_perClientPatchUpdates.Values)
{ {
if (!Monitor.TryEnter(pups))
continue;
// throught acording to land queue free to send bytes // throught acording to land queue free to send bytes
if (!pups.Presence.ControllingClient.CanSendLayerData()) if (!pups.Presence.ControllingClient.CanSendLayerData())
continue; continue;
if (pups.HasUpdates()) if (pups.HasUpdates())
{ {
// There is something that could be sent to this client. // There is something that could be sent to this client.
List<PatchesToSend> toSend = GetModifiedPatchesInViewDistance(pups); List<PatchesToSend> toSend = GetModifiedPatchesInViewDistance(pups);
if (toSend.Count > 0) if (toSend.Count > 0)
@ -1026,6 +1031,7 @@ namespace OpenSim.Region.CoreModules.World.Terrain
pups.Presence.ControllingClient.SendLayerData(-toSend.Count, 0, patchPieces); pups.Presence.ControllingClient.SendLayerData(-toSend.Count, 0, patchPieces);
} }
} }
Monitor.Exit(pups);
} }
} }
} }
@ -1414,7 +1420,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
} }
} }
} }
private void InterfaceElevateTerrain(Object[] args) private void InterfaceElevateTerrain(Object[] args)
@ -1707,7 +1712,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
public void ModifyCommand(string module, string[] cmd) public void ModifyCommand(string module, string[] cmd)
{ {
/*
string result; string result;
Scene scene = SceneManager.Instance.CurrentScene; Scene scene = SceneManager.Instance.CurrentScene;
if ((scene != null) && (scene != m_scene)) if ((scene != null) && (scene != m_scene))
@ -1747,7 +1751,6 @@ namespace OpenSim.Region.CoreModules.World.Terrain
{ {
MainConsole.Instance.Output(result); MainConsole.Instance.Output(result);
} }
*/
} }
#endregion #endregion