Merge branch 'master' into careminster

This commit is contained in:
Melanie
2009-11-25 17:04:05 +00:00
13 changed files with 71 additions and 18 deletions

View File

@@ -57,21 +57,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
#region ISharedRegionModule Members
public virtual void Initialise(IConfigSource config)
{
m_config = config.Configs["Chat"];
if (null == m_config)
{
m_log.Info("[CHAT]: no config found, plugin disabled");
m_enabled = false;
return;
}
if (!m_config.GetBoolean("enabled", false))
if (!m_config.GetBoolean("enabled", true))
{
m_log.Info("[CHAT]: plugin disabled by configuration");
m_enabled = false;
return;
}
m_enabled = true;
m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance);
m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance);

View File

@@ -93,6 +93,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver
List<EntityBase> entities = m_scene.GetEntities();
List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
/*
foreach (ILandObject lo in m_scene.LandChannel.AllParcels())
{
if (name == lo.LandData.Name)
{
// This is the parcel we want
}
}
*/
// Filter entities so that we only have scene objects.
// FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods
// end up having to do this

View File

@@ -26,9 +26,11 @@
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using log4net;
using NDesk.Options;
using Nini.Config;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
@@ -91,13 +93,23 @@ namespace OpenSim.Region.CoreModules.World.Archiver
/// <param name="cmdparams"></param>
public void HandleLoadOarConsoleCommand(string module, string[] cmdparams)
{
if (cmdparams.Length > 2)
bool mergeOar = false;
OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; });
List<string> mainParams = options.Parse(cmdparams);
// m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar);
//
// foreach (string param in mainParams)
// m_log.DebugFormat("GOT PARAM [{0}]", param);
if (mainParams.Count > 2)
{
DearchiveRegion(cmdparams[2]);
DearchiveRegion(mainParams[2], mergeOar, Guid.Empty);
}
else
{
DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME);
DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, Guid.Empty);
}
}

View File

@@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.World.Land
ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
obj.LandData.Name = "NO LAND";
return obj;
}
}
public List<ILandObject> AllParcels()
{
@@ -154,6 +154,7 @@ namespace OpenSim.Region.CoreModules.World.Land
m_landManagementModule.UpdateLandObject(localID, data);
}
}
public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
{
if (m_landManagementModule != null)

View File

@@ -67,7 +67,14 @@ namespace OpenSim.Region.CoreModules.World.Land
private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64;
#pragma warning restore 0429
/// <value>
/// Local land ids at specified region co-ordinates (region size / 4)
/// </value>
private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax];
/// <value>
/// Land objects keyed by local id
/// </value>
private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>();
private bool m_landPrimCountTainted;
@@ -570,6 +577,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0)
return null;
try
{
x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0));
@@ -584,6 +592,7 @@ namespace OpenSim.Region.CoreModules.World.Land
{
return null;
}
lock (m_landList)
{
// Corner case. If an autoreturn happens during sim startup
@@ -603,6 +612,7 @@ namespace OpenSim.Region.CoreModules.World.Land
// they happen every time at border crossings
throw new Exception("Error: Parcel not found at point " + x + ", " + y);
}
lock (m_landIDList)
{
try
@@ -617,7 +627,7 @@ namespace OpenSim.Region.CoreModules.World.Land
return null;
}
}
}
}
#endregion