diff options
author | Teravus Ovares (Dan Olivares) | 2009-11-25 14:13:51 -0500 |
---|---|---|
committer | Teravus Ovares (Dan Olivares) | 2009-11-25 14:13:51 -0500 |
commit | dac9c6fb2360fd46603e08877d57a704eb02e183 (patch) | |
tree | 614ef8a4851d69a3fb3a76c7839ef576c234b6e7 /OpenSim/Region | |
parent | Patch: Fix a bug in LAND animation when the TickCount wraps into negative num... (diff) | |
parent | Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff) | |
download | opensim-SC-dac9c6fb2360fd46603e08877d57a704eb02e183.zip opensim-SC-dac9c6fb2360fd46603e08877d57a704eb02e183.tar.gz opensim-SC-dac9c6fb2360fd46603e08877d57a704eb02e183.tar.bz2 opensim-SC-dac9c6fb2360fd46603e08877d57a704eb02e183.tar.xz |
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
12 files changed, 69 insertions, 20 deletions
diff --git a/OpenSim/Region/Application/HGCommands.cs b/OpenSim/Region/Application/HGCommands.cs index f503db7..7ae161d 100644 --- a/OpenSim/Region/Application/HGCommands.cs +++ b/OpenSim/Region/Application/HGCommands.cs | |||
@@ -42,7 +42,7 @@ namespace OpenSim | |||
42 | { | 42 | { |
43 | public class HGCommands | 43 | public class HGCommands |
44 | { | 44 | { |
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | public static Scene CreateScene(RegionInfo regionInfo, AgentCircuitManager circuitManager, CommunicationsManager m_commsManager, | 47 | public static Scene CreateScene(RegionInfo regionInfo, AgentCircuitManager circuitManager, CommunicationsManager m_commsManager, |
48 | StorageManager storageManager, ModuleLoader m_moduleLoader, ConfigSettings m_configSettings, OpenSimConfigSource m_config, string m_version) | 48 | StorageManager storageManager, ModuleLoader m_moduleLoader, ConfigSettings m_configSettings, OpenSimConfigSource m_config, string m_version) |
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index f9be1e2..5228e4b 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs | |||
@@ -232,7 +232,7 @@ namespace OpenSim | |||
232 | "Save named prim to XML2", SavePrimsXml2); | 232 | "Save named prim to XML2", SavePrimsXml2); |
233 | 233 | ||
234 | m_console.Commands.AddCommand("region", false, "load oar", | 234 | m_console.Commands.AddCommand("region", false, "load oar", |
235 | "load oar <oar name>", | 235 | "load oar [--merge] <oar name>", |
236 | "Load a region's data from OAR archive", LoadOar); | 236 | "Load a region's data from OAR archive", LoadOar); |
237 | 237 | ||
238 | m_console.Commands.AddCommand("region", false, "save oar", | 238 | m_console.Commands.AddCommand("region", false, "save oar", |
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index cd59bdb..6dacbba 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -57,21 +57,21 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
57 | #region ISharedRegionModule Members | 57 | #region ISharedRegionModule Members |
58 | public virtual void Initialise(IConfigSource config) | 58 | public virtual void Initialise(IConfigSource config) |
59 | { | 59 | { |
60 | |||
61 | m_config = config.Configs["Chat"]; | 60 | m_config = config.Configs["Chat"]; |
62 | 61 | ||
63 | if (null == m_config) | 62 | if (null == m_config) |
64 | { | 63 | { |
65 | m_log.Info("[CHAT]: no config found, plugin disabled"); | 64 | m_log.Info("[CHAT]: no config found, plugin disabled"); |
65 | m_enabled = false; | ||
66 | return; | 66 | return; |
67 | } | 67 | } |
68 | 68 | ||
69 | if (!m_config.GetBoolean("enabled", false)) | 69 | if (!m_config.GetBoolean("enabled", true)) |
70 | { | 70 | { |
71 | m_log.Info("[CHAT]: plugin disabled by configuration"); | 71 | m_log.Info("[CHAT]: plugin disabled by configuration"); |
72 | m_enabled = false; | ||
72 | return; | 73 | return; |
73 | } | 74 | } |
74 | m_enabled = true; | ||
75 | 75 | ||
76 | m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); | 76 | m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); |
77 | m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); | 77 | m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs index f08d8ec..71bfe57 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveWriteRequestPreparation.cs | |||
@@ -93,6 +93,16 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
93 | List<EntityBase> entities = m_scene.GetEntities(); | 93 | List<EntityBase> entities = m_scene.GetEntities(); |
94 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); | 94 | List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); |
95 | 95 | ||
96 | /* | ||
97 | foreach (ILandObject lo in m_scene.LandChannel.AllParcels()) | ||
98 | { | ||
99 | if (name == lo.LandData.Name) | ||
100 | { | ||
101 | // This is the parcel we want | ||
102 | } | ||
103 | } | ||
104 | */ | ||
105 | |||
96 | // Filter entities so that we only have scene objects. | 106 | // Filter entities so that we only have scene objects. |
97 | // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods | 107 | // FIXME: Would be nicer to have this as a proper list in SceneGraph, since lots of methods |
98 | // end up having to do this | 108 | // end up having to do this |
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 181f4c6..27763bb 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs | |||
@@ -26,9 +26,11 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using System.IO; | 30 | using System.IO; |
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using log4net; | 32 | using log4net; |
33 | using NDesk.Options; | ||
32 | using Nini.Config; | 34 | using Nini.Config; |
33 | using OpenSim.Region.Framework.Interfaces; | 35 | using OpenSim.Region.Framework.Interfaces; |
34 | using OpenSim.Region.Framework.Scenes; | 36 | using OpenSim.Region.Framework.Scenes; |
@@ -91,13 +93,23 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
91 | /// <param name="cmdparams"></param> | 93 | /// <param name="cmdparams"></param> |
92 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) | 94 | public void HandleLoadOarConsoleCommand(string module, string[] cmdparams) |
93 | { | 95 | { |
94 | if (cmdparams.Length > 2) | 96 | bool mergeOar = false; |
97 | |||
98 | OptionSet options = new OptionSet().Add("m|merge", delegate (string v) { mergeOar = v != null; }); | ||
99 | List<string> mainParams = options.Parse(cmdparams); | ||
100 | |||
101 | // m_log.DebugFormat("MERGE OAR IS [{0}]", mergeOar); | ||
102 | // | ||
103 | // foreach (string param in mainParams) | ||
104 | // m_log.DebugFormat("GOT PARAM [{0}]", param); | ||
105 | |||
106 | if (mainParams.Count > 2) | ||
95 | { | 107 | { |
96 | DearchiveRegion(cmdparams[2]); | 108 | DearchiveRegion(mainParams[2], mergeOar, Guid.Empty); |
97 | } | 109 | } |
98 | else | 110 | else |
99 | { | 111 | { |
100 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME); | 112 | DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME, mergeOar, Guid.Empty); |
101 | } | 113 | } |
102 | } | 114 | } |
103 | 115 | ||
diff --git a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs index 4ed23bb..81024db 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandChannel.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandChannel.cs | |||
@@ -105,7 +105,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
105 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); | 105 | ILandObject obj = new LandObject(UUID.Zero, false, m_scene); |
106 | obj.LandData.Name = "NO LAND"; | 106 | obj.LandData.Name = "NO LAND"; |
107 | return obj; | 107 | return obj; |
108 | } | 108 | } |
109 | 109 | ||
110 | public List<ILandObject> AllParcels() | 110 | public List<ILandObject> AllParcels() |
111 | { | 111 | { |
@@ -154,6 +154,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
154 | m_landManagementModule.UpdateLandObject(localID, data); | 154 | m_landManagementModule.UpdateLandObject(localID, data); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | |||
157 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) | 158 | public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient) |
158 | { | 159 | { |
159 | if (m_landManagementModule != null) | 160 | if (m_landManagementModule != null) |
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 968f46a..9a2ef50 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -67,7 +67,14 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
67 | private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64; | 67 | private const int landArrayMax = ((int)((int)Constants.RegionSize / 4) >= 64) ? (int)((int)Constants.RegionSize / 4) : 64; |
68 | #pragma warning restore 0429 | 68 | #pragma warning restore 0429 |
69 | 69 | ||
70 | /// <value> | ||
71 | /// Local land ids at specified region co-ordinates (region size / 4) | ||
72 | /// </value> | ||
70 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; | 73 | private readonly int[,] m_landIDList = new int[landArrayMax, landArrayMax]; |
74 | |||
75 | /// <value> | ||
76 | /// Land objects keyed by local id | ||
77 | /// </value> | ||
71 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); | 78 | private readonly Dictionary<int, ILandObject> m_landList = new Dictionary<int, ILandObject>(); |
72 | 79 | ||
73 | private bool m_landPrimCountTainted; | 80 | private bool m_landPrimCountTainted; |
@@ -570,6 +577,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
570 | 577 | ||
571 | if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) | 578 | if (x_float > Constants.RegionSize || x_float <= 0 || y_float > Constants.RegionSize || y_float <= 0) |
572 | return null; | 579 | return null; |
580 | |||
573 | try | 581 | try |
574 | { | 582 | { |
575 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); | 583 | x = Convert.ToInt32(Math.Floor(Convert.ToDouble(x_float) / 4.0)); |
@@ -584,6 +592,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
584 | { | 592 | { |
585 | return null; | 593 | return null; |
586 | } | 594 | } |
595 | |||
587 | lock (m_landList) | 596 | lock (m_landList) |
588 | { | 597 | { |
589 | // Corner case. If an autoreturn happens during sim startup | 598 | // Corner case. If an autoreturn happens during sim startup |
@@ -603,6 +612,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
603 | // they happen every time at border crossings | 612 | // they happen every time at border crossings |
604 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); | 613 | throw new Exception("Error: Parcel not found at point " + x + ", " + y); |
605 | } | 614 | } |
615 | |||
606 | lock (m_landIDList) | 616 | lock (m_landIDList) |
607 | { | 617 | { |
608 | try | 618 | try |
@@ -617,7 +627,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
617 | return null; | 627 | return null; |
618 | } | 628 | } |
619 | } | 629 | } |
620 | } | 630 | } |
621 | 631 | ||
622 | #endregion | 632 | #endregion |
623 | 633 | ||
diff --git a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs index 74f404f..6fe6118 100644 --- a/OpenSim/Region/Framework/Interfaces/ILandChannel.cs +++ b/OpenSim/Region/Framework/Interfaces/ILandChannel.cs | |||
@@ -33,26 +33,41 @@ namespace OpenSim.Region.Framework.Interfaces | |||
33 | { | 33 | { |
34 | public interface ILandChannel | 34 | public interface ILandChannel |
35 | { | 35 | { |
36 | List<ILandObject> ParcelsNearPoint(Vector3 position); | 36 | /// <summary> |
37 | /// Get all parcels | ||
38 | /// </summary> | ||
39 | /// <returns></returns> | ||
37 | List<ILandObject> AllParcels(); | 40 | List<ILandObject> AllParcels(); |
38 | 41 | ||
39 | /// <summary> | 42 | /// <summary> |
40 | /// Get the land object at the specified point | 43 | /// Get the parcel at the specified point |
41 | /// </summary> | 44 | /// </summary> |
42 | /// <param name="x">Value between 0 - 256 on the x axis of the point</param> | 45 | /// <param name="x">Value between 0 - 256 on the x axis of the point</param> |
43 | /// <param name="y">Value between 0 - 256 on the y axis of the point</param> | 46 | /// <param name="y">Value between 0 - 256 on the y axis of the point</param> |
44 | /// <returns>Land object at the point supplied</returns> | 47 | /// <returns>Land object at the point supplied</returns> |
45 | ILandObject GetLandObject(int x, int y); | 48 | ILandObject GetLandObject(int x, int y); |
46 | 49 | ||
47 | ILandObject GetLandObject(int localID); | ||
48 | |||
49 | /// <summary> | 50 | /// <summary> |
50 | /// Get the land object at the specified point | 51 | /// Get the parcel at the specified point |
51 | /// </summary> | 52 | /// </summary> |
52 | /// <param name="x">Value between 0 - 256 on the x axis of the point</param> | 53 | /// <param name="x">Value between 0 - 256 on the x axis of the point</param> |
53 | /// <param name="y">Value between 0 - 256 on the y axis of the point</param> | 54 | /// <param name="y">Value between 0 - 256 on the y axis of the point</param> |
54 | /// <returns>Land object at the point supplied</returns> | 55 | /// <returns>Land object at the point supplied</returns> |
55 | ILandObject GetLandObject(float x, float y); | 56 | ILandObject GetLandObject(float x, float y); |
57 | |||
58 | /// <summary> | ||
59 | /// Get the parcels near the specified point | ||
60 | /// </summary> | ||
61 | /// <param name="position"></param> | ||
62 | /// <returns></returns> | ||
63 | List<ILandObject> ParcelsNearPoint(Vector3 position); | ||
64 | |||
65 | /// <summary> | ||
66 | /// Get the parcel given the land's local id. | ||
67 | /// </summary> | ||
68 | /// <param name="localID"></param> | ||
69 | /// <returns></returns> | ||
70 | ILandObject GetLandObject(int localID); | ||
56 | 71 | ||
57 | bool IsLandPrimCountTainted(); | 72 | bool IsLandPrimCountTainted(); |
58 | bool IsForcefulBansAllowed(); | 73 | bool IsForcefulBansAllowed(); |
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs index 146ec66..9da818a 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerLargeLandChannel.cs | |||
@@ -118,6 +118,7 @@ public class RegionCombinerLargeLandChannel : ILandChannel | |||
118 | return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY); | 118 | return regionData.RegionScene.LandChannel.GetLandObject(x - offsetX, y - offsetY); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | |||
121 | ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); | 122 | ILandObject obj = new LandObject(UUID.Zero, false, RegData.RegionScene); |
122 | obj.LandData.Name = "NO LAND"; | 123 | obj.LandData.Name = "NO LAND"; |
123 | return obj; | 124 | return obj; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 7fdbac8..e72fa70 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -636,13 +636,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
636 | } | 636 | } |
637 | 637 | ||
638 | // Teleport functions | 638 | // Teleport functions |
639 | public void osTeleportAgent(string agent, uint regionX, uint regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) | 639 | public void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) |
640 | { | 640 | { |
641 | // High because there is no security check. High griefer potential | 641 | // High because there is no security check. High griefer potential |
642 | // | 642 | // |
643 | CheckThreatLevel(ThreatLevel.High, "osTeleportAgent"); | 643 | CheckThreatLevel(ThreatLevel.High, "osTeleportAgent"); |
644 | 644 | ||
645 | ulong regionHandle = Util.UIntsToLong((regionX * (uint)Constants.RegionSize), (regionY * (uint)Constants.RegionSize)); | 645 | ulong regionHandle = Util.UIntsToLong(((uint)regionX * (uint)Constants.RegionSize), ((uint)regionY * (uint)Constants.RegionSize)); |
646 | 646 | ||
647 | m_host.AddScriptLPS(1); | 647 | m_host.AddScriptLPS(1); |
648 | UUID agentId = new UUID(); | 648 | UUID agentId = new UUID(); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 2a403bf..470946a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -83,7 +83,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
83 | 83 | ||
84 | // Teleport commands | 84 | // Teleport commands |
85 | void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | 85 | void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); |
86 | void osTeleportAgent(string agent, uint regionX, uint regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | 86 | void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); |
87 | void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); | 87 | void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); |
88 | 88 | ||
89 | // Animation commands | 89 | // Animation commands |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 4928e90..6b88834 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -201,9 +201,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
201 | m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat); | 201 | m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat); |
202 | } | 202 | } |
203 | 203 | ||
204 | public void osTeleportAgent(string agent, long regionX, long regionY, vector position, vector lookat) | 204 | public void osTeleportAgent(string agent, int regionX, int regionY, vector position, vector lookat) |
205 | { | 205 | { |
206 | m_OSSL_Functions.osTeleportAgent(agent, (uint) regionX, (uint) regionY, position, lookat); | 206 | m_OSSL_Functions.osTeleportAgent(agent, regionX, regionY, position, lookat); |
207 | } | 207 | } |
208 | 208 | ||
209 | public void osTeleportAgent(string agent, vector position, vector lookat) | 209 | public void osTeleportAgent(string agent, vector position, vector lookat) |