diff options
author | Justin Clark-Casey (justincc) | 2012-09-12 00:07:56 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-09-12 00:07:56 +0100 |
commit | 757d9163fa623b62f834e1684994d51f66428055 (patch) | |
tree | 718a48c936017847306b5d21f96a0b4a8b00cee7 /OpenSim/Region | |
parent | Add levels 4 and 5 to "debug http" console command that will log a sample of ... (diff) | |
parent | documentation (OnSceneObjectPartCopy) (diff) | |
download | opensim-SC-757d9163fa623b62f834e1684994d51f66428055.zip opensim-SC-757d9163fa623b62f834e1684994d51f66428055.tar.gz opensim-SC-757d9163fa623b62f834e1684994d51f66428055.tar.bz2 opensim-SC-757d9163fa623b62f834e1684994d51f66428055.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
7 files changed, 99 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs index 4bce416..5d8a278 100644 --- a/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs +++ b/OpenSim/Region/CoreModules/Asset/FlotsamAssetCache.cs | |||
@@ -49,8 +49,12 @@ using OpenSim.Region.Framework.Scenes; | |||
49 | using OpenSim.Services.Interfaces; | 49 | using OpenSim.Services.Interfaces; |
50 | 50 | ||
51 | 51 | ||
52 | [assembly: Addin("FlotsamAssetCache", "1.1")] | ||
53 | [assembly: AddinDependency("OpenSim", "0.5")] | ||
54 | |||
52 | namespace OpenSim.Region.CoreModules.Asset | 55 | namespace OpenSim.Region.CoreModules.Asset |
53 | { | 56 | { |
57 | [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] | ||
54 | public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache, IAssetService | 58 | public class FlotsamAssetCache : ISharedRegionModule, IImprovedAssetCache, IAssetService |
55 | { | 59 | { |
56 | private static readonly ILog m_log = | 60 | private static readonly ILog m_log = |
diff --git a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs index 9276d1a..1c2bfd0 100644 --- a/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs +++ b/OpenSim/Region/CoreModules/Asset/Tests/FlotsamAssetCacheTests.cs | |||
@@ -35,7 +35,6 @@ using Nini.Config; | |||
35 | using NUnit.Framework; | 35 | using NUnit.Framework; |
36 | using OpenMetaverse; | 36 | using OpenMetaverse; |
37 | using OpenMetaverse.Assets; | 37 | using OpenMetaverse.Assets; |
38 | using OpenSim.Region.CoreModules.Asset; | ||
39 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
40 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
41 | using OpenSim.Region.Framework.Scenes.Serialization; | 40 | using OpenSim.Region.Framework.Scenes.Serialization; |
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml index a09945e..424e0ab 100644 --- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml +++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml | |||
@@ -34,7 +34,6 @@ | |||
34 | <RegionModule id="LureModule" type="OpenSim.Region.CoreModules.Avatar.Lure.LureModule" /> | 34 | <RegionModule id="LureModule" type="OpenSim.Region.CoreModules.Avatar.Lure.LureModule" /> |
35 | <RegionModule id="InventoryTransferModule" type="OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.InventoryTransferModule" /> | 35 | <RegionModule id="InventoryTransferModule" type="OpenSim.Region.CoreModules.Avatar.Inventory.Transfer.InventoryTransferModule" /> |
36 | <RegionModule id="CoreAssetCache" type="OpenSim.Region.CoreModules.Asset.CoreAssetCache" /> | 36 | <RegionModule id="CoreAssetCache" type="OpenSim.Region.CoreModules.Asset.CoreAssetCache" /> |
37 | <RegionModule id="FlotsamAssetCache" type="OpenSim.Region.CoreModules.Asset.FlotsamAssetCache" /> | ||
38 | <RegionModule id="GlynnTuckerAssetCache" type="OpenSim.Region.CoreModules.Asset.GlynnTuckerAssetCache" /> | 37 | <RegionModule id="GlynnTuckerAssetCache" type="OpenSim.Region.CoreModules.Asset.GlynnTuckerAssetCache" /> |
39 | <RegionModule id="CenomeMemoryAssetCache" type="OpenSim.Region.CoreModules.Asset.CenomeMemoryAssetCache"/> | 38 | <RegionModule id="CenomeMemoryAssetCache" type="OpenSim.Region.CoreModules.Asset.CenomeMemoryAssetCache"/> |
40 | <RegionModule id="LibraryModule" type="OpenSim.Region.CoreModules.Framework.Library.LibraryModule"/> | 39 | <RegionModule id="LibraryModule" type="OpenSim.Region.CoreModules.Framework.Library.LibraryModule"/> |
diff --git a/OpenSim/Region/Framework/Scenes/EventManager.cs b/OpenSim/Region/Framework/Scenes/EventManager.cs index 4d65be9..9bdaecf 100644 --- a/OpenSim/Region/Framework/Scenes/EventManager.cs +++ b/OpenSim/Region/Framework/Scenes/EventManager.cs | |||
@@ -47,26 +47,71 @@ namespace OpenSim.Region.Framework.Scenes | |||
47 | 47 | ||
48 | public delegate void OnFrameDelegate(); | 48 | public delegate void OnFrameDelegate(); |
49 | 49 | ||
50 | /// <summary> | ||
51 | /// Triggered on each sim frame. | ||
52 | /// </summary> | ||
53 | /// <remarks> | ||
54 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.Update"/> | ||
55 | /// Core uses it for things like Sun, Wind & Clouds | ||
56 | /// The MRM module also uses it. | ||
57 | /// </remarks> | ||
50 | public event OnFrameDelegate OnFrame; | 58 | public event OnFrameDelegate OnFrame; |
51 | 59 | ||
52 | public delegate void ClientMovement(ScenePresence client); | 60 | public delegate void ClientMovement(ScenePresence client); |
53 | 61 | ||
62 | /// <summary> | ||
63 | /// Trigerred when an agent moves. | ||
64 | /// </summary> | ||
65 | /// <remarks> | ||
66 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.ScenePresence.HandleAgentUpdate"/> | ||
67 | /// prior to <see cref="OpenSim.Region.Framework.Scenes.ScenePresence.TriggerScenePresenceUpdated"/> | ||
68 | /// </remarks> | ||
54 | public event ClientMovement OnClientMovement; | 69 | public event ClientMovement OnClientMovement; |
55 | 70 | ||
56 | public delegate void OnTerrainTaintedDelegate(); | 71 | public delegate void OnTerrainTaintedDelegate(); |
57 | 72 | ||
73 | /// <summary> | ||
74 | /// Triggered if the terrain has been edited | ||
75 | /// </summary> | ||
76 | /// <remarks> | ||
77 | /// This gets triggered in <see cref="OpenSim.Region.CoreModules.World.Terrain.CheckForTerrainUpdates"/> | ||
78 | /// after it determines that an update has been made. | ||
79 | /// </remarks> | ||
58 | public event OnTerrainTaintedDelegate OnTerrainTainted; | 80 | public event OnTerrainTaintedDelegate OnTerrainTainted; |
59 | 81 | ||
60 | public delegate void OnTerrainTickDelegate(); | 82 | public delegate void OnTerrainTickDelegate(); |
61 | 83 | ||
84 | /// <summary> | ||
85 | /// Triggered if the terrain has been edited | ||
86 | /// </summary> | ||
87 | /// <remarks> | ||
88 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.UpdateTerrain"/> | ||
89 | /// but is used by core solely to update the physics engine. | ||
90 | /// </remarks> | ||
62 | public event OnTerrainTickDelegate OnTerrainTick; | 91 | public event OnTerrainTickDelegate OnTerrainTick; |
63 | 92 | ||
64 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); | 93 | public delegate void OnBackupDelegate(ISimulationDataService datastore, bool forceBackup); |
65 | 94 | ||
95 | /// <summary> | ||
96 | /// Triggered when a region is backed up/persisted to storage | ||
97 | /// </summary> | ||
98 | /// <remarks> | ||
99 | /// This gets triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.Backup"/> | ||
100 | /// and is fired before the persistence occurs. | ||
101 | /// </remarks> | ||
66 | public event OnBackupDelegate OnBackup; | 102 | public event OnBackupDelegate OnBackup; |
67 | 103 | ||
68 | public delegate void OnClientConnectCoreDelegate(IClientCore client); | 104 | public delegate void OnClientConnectCoreDelegate(IClientCore client); |
69 | 105 | ||
106 | /// <summary> | ||
107 | /// Triggered when a new client connects to the scene. | ||
108 | /// </summary> | ||
109 | /// <remarks> | ||
110 | /// This gets triggered in <see cref="TriggerOnNewClient"/>, | ||
111 | /// which checks if an instance of <see cref="OpenSim.Framework.IClientAPI"/> | ||
112 | /// also implements <see cref="OpenSim.Framework.Client.IClientCore"/> and as such, | ||
113 | /// is not triggered by <see cref="OpenSim.Region.OptionalModules.World.NPC">NPCs</see>. | ||
114 | /// </remarks> | ||
70 | public event OnClientConnectCoreDelegate OnClientConnect; | 115 | public event OnClientConnectCoreDelegate OnClientConnect; |
71 | 116 | ||
72 | public delegate void OnNewClientDelegate(IClientAPI client); | 117 | public delegate void OnNewClientDelegate(IClientAPI client); |
@@ -87,10 +132,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
87 | 132 | ||
88 | public delegate void OnNewPresenceDelegate(ScenePresence presence); | 133 | public delegate void OnNewPresenceDelegate(ScenePresence presence); |
89 | 134 | ||
135 | /// <summary> | ||
136 | /// Triggered when a new presence is added to the scene | ||
137 | /// </summary> | ||
138 | /// <remarks> | ||
139 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both | ||
140 | /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> | ||
141 | /// </remarks> | ||
90 | public event OnNewPresenceDelegate OnNewPresence; | 142 | public event OnNewPresenceDelegate OnNewPresence; |
91 | 143 | ||
92 | public delegate void OnRemovePresenceDelegate(UUID agentId); | 144 | public delegate void OnRemovePresenceDelegate(UUID agentId); |
93 | 145 | ||
146 | /// <summary> | ||
147 | /// Triggered when a presence is removed from the scene | ||
148 | /// </summary> | ||
149 | /// <remarks> | ||
150 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.Scene.AddNewClient"/> which is used by both | ||
151 | /// <see cref="OpenSim.Framework.PresenceType.User">users</see> and <see cref="OpenSim.Framework.PresenceType.Npc">NPCs</see> | ||
152 | /// </remarks> | ||
94 | public event OnRemovePresenceDelegate OnRemovePresence; | 153 | public event OnRemovePresenceDelegate OnRemovePresence; |
95 | 154 | ||
96 | public delegate void OnParcelPrimCountUpdateDelegate(); | 155 | public delegate void OnParcelPrimCountUpdateDelegate(); |
@@ -481,6 +540,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
481 | /// <param name="copy"></param> | 540 | /// <param name="copy"></param> |
482 | /// <param name="original"></param> | 541 | /// <param name="original"></param> |
483 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> | 542 | /// <param name="userExposed">True if the duplicate will immediately be in the scene, false otherwise</param> |
543 | /// <remarks> | ||
544 | /// Triggered in <see cref="OpenSim.Region.Framework.Scenes.SceneObjectPart.Copy"/> | ||
545 | /// </remarks> | ||
484 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; | 546 | public event SceneObjectPartCopyDelegate OnSceneObjectPartCopy; |
485 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); | 547 | public delegate void SceneObjectPartCopyDelegate(SceneObjectPart copy, SceneObjectPart original, bool userExposed); |
486 | 548 | ||
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ff3d3af..c2c0b96 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -123,6 +123,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
123 | /// </summary> | 123 | /// </summary> |
124 | public float m_maxPhys = 10; | 124 | public float m_maxPhys = 10; |
125 | 125 | ||
126 | /// <summary> | ||
127 | /// Max prims an object will hold | ||
128 | /// </summary> | ||
129 | public int m_linksetCapacity = 0; | ||
130 | |||
126 | public bool m_clampPrimSize; | 131 | public bool m_clampPrimSize; |
127 | public bool m_trustBinaries; | 132 | public bool m_trustBinaries; |
128 | public bool m_allowScriptCrossings; | 133 | public bool m_allowScriptCrossings; |
@@ -772,6 +777,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
772 | m_clampPrimSize = true; | 777 | m_clampPrimSize = true; |
773 | } | 778 | } |
774 | 779 | ||
780 | m_linksetCapacity = startupConfig.GetInt("LinksetPrims", m_linksetCapacity); | ||
781 | if (RegionInfo.LinksetCapacity > 0) | ||
782 | { | ||
783 | m_linksetCapacity = RegionInfo.LinksetCapacity; | ||
784 | } | ||
785 | |||
775 | m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete", m_useTrashOnDelete); | 786 | m_useTrashOnDelete = startupConfig.GetBoolean("UseTrashOnDelete", m_useTrashOnDelete); |
776 | m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); | 787 | m_trustBinaries = startupConfig.GetBoolean("TrustBinaries", m_trustBinaries); |
777 | m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); | 788 | m_allowScriptCrossings = startupConfig.GetBoolean("AllowScriptCrossing", m_allowScriptCrossings); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index b4a155e..e528288 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -2014,6 +2014,24 @@ namespace OpenSim.Region.Framework.Scenes | |||
2014 | if (objectGroup == this) | 2014 | if (objectGroup == this) |
2015 | return; | 2015 | return; |
2016 | 2016 | ||
2017 | // If the configured linkset capacity is greater than zero, | ||
2018 | // and the new linkset would have a prim count higher than this | ||
2019 | // value, do not link it. | ||
2020 | if (m_scene.m_linksetCapacity > 0 && | ||
2021 | (PrimCount + objectGroup.PrimCount) > | ||
2022 | m_scene.m_linksetCapacity) | ||
2023 | { | ||
2024 | m_log.DebugFormat( | ||
2025 | "[SCENE OBJECT GROUP]: Cannot link group with root" + | ||
2026 | " part {0}, {1} ({2} prims) to group with root part" + | ||
2027 | " {3}, {4} ({5} prims) because the new linkset" + | ||
2028 | " would exceed the configured maximum of {6}", | ||
2029 | objectGroup.RootPart.Name, objectGroup.RootPart.UUID, | ||
2030 | objectGroup.PrimCount, RootPart.Name, RootPart.UUID, | ||
2031 | PrimCount, m_scene.m_linksetCapacity); | ||
2032 | return; | ||
2033 | } | ||
2034 | |||
2017 | // 'linkPart' == the root of the group being linked into this group | 2035 | // 'linkPart' == the root of the group being linked into this group |
2018 | SceneObjectPart linkPart = objectGroup.m_rootPart; | 2036 | SceneObjectPart linkPart = objectGroup.m_rootPart; |
2019 | 2037 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs index cde2d9f..6809c09 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/MOD_Api.cs | |||
@@ -254,7 +254,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
254 | 254 | ||
255 | object[] convertedParms = new object[parms.Length]; | 255 | object[] convertedParms = new object[parms.Length]; |
256 | for (int i = 0; i < parms.Length; i++) | 256 | for (int i = 0; i < parms.Length; i++) |
257 | convertedParms[i] = ConvertFromLSL(parms[i],signature[i]); | 257 | convertedParms[i] = ConvertFromLSL(parms[i],signature[i], fname); |
258 | 258 | ||
259 | // now call the function, the contract with the function is that it will always return | 259 | // now call the function, the contract with the function is that it will always return |
260 | // non-null but don't trust it completely | 260 | // non-null but don't trust it completely |
@@ -294,7 +294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
294 | 294 | ||
295 | /// <summary> | 295 | /// <summary> |
296 | /// </summary> | 296 | /// </summary> |
297 | protected object ConvertFromLSL(object lslparm, Type type) | 297 | protected object ConvertFromLSL(object lslparm, Type type, string fname) |
298 | { | 298 | { |
299 | // ---------- String ---------- | 299 | // ---------- String ---------- |
300 | if (lslparm is LSL_String) | 300 | if (lslparm is LSL_String) |
@@ -374,14 +374,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
374 | (LSL_Vector)plist[i]); | 374 | (LSL_Vector)plist[i]); |
375 | } | 375 | } |
376 | else | 376 | else |
377 | MODError("unknown LSL list element type"); | 377 | MODError(String.Format("{0}: unknown LSL list element type", fname)); |
378 | } | 378 | } |
379 | 379 | ||
380 | return result; | 380 | return result; |
381 | } | 381 | } |
382 | } | 382 | } |
383 | 383 | ||
384 | MODError(String.Format("parameter type mismatch; expecting {0}",type.Name)); | 384 | MODError(String.Format("{1}: parameter type mismatch; expecting {0}",type.Name, fname)); |
385 | return null; | 385 | return null; |
386 | } | 386 | } |
387 | 387 | ||