aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-09-12 00:07:56 +0100
committerJustin Clark-Casey (justincc)2012-09-12 00:07:56 +0100
commit757d9163fa623b62f834e1684994d51f66428055 (patch)
tree718a48c936017847306b5d21f96a0b4a8b00cee7 /OpenSim/Region/Framework
parentAdd levels 4 and 5 to "debug http" console command that will log a sample of ... (diff)
parentdocumentation (OnSceneObjectPartCopy) (diff)
downloadopensim-SC_OLD-757d9163fa623b62f834e1684994d51f66428055.zip
opensim-SC_OLD-757d9163fa623b62f834e1684994d51f66428055.tar.gz
opensim-SC_OLD-757d9163fa623b62f834e1684994d51f66428055.tar.bz2
opensim-SC_OLD-757d9163fa623b62f834e1684994d51f66428055.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/EventManager.cs62
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs11
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs18
3 files changed, 91 insertions, 0 deletions
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