Log how many scripts are candidates for starting and how many are actually started.

Adds DebugLevel infrastructure to XEngine though currently commented out and unused.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-06-20 00:10:19 +01:00
parent 9737e6d52e
commit 0fa303b1cf
5 changed files with 169 additions and 69 deletions

View File

@@ -54,16 +54,28 @@ namespace OpenSim.Region.Framework.Scenes
/// <summary>
/// Start the scripts contained in all the prims in this group.
/// </summary>
public void CreateScriptInstances(int startParam, bool postOnRez,
string engine, int stateSource)
/// <param name="startParam"></param>
/// <param name="postOnRez"></param>
/// <param name="engine"></param>
/// <param name="stateSource"></param>
/// <returns>
/// Number of scripts that were valid for starting. This does not guarantee that all these scripts
/// were actually started, but just that the start could be attempt (e.g. the asset data for the script could be found)
/// </returns>
public int CreateScriptInstances(int startParam, bool postOnRez, string engine, int stateSource)
{
int scriptsStarted = 0;
// Don't start scripts if they're turned off in the region!
if (!m_scene.RegionInfo.RegionSettings.DisableScripts)
{
SceneObjectPart[] parts = m_parts.GetArray();
for (int i = 0; i < parts.Length; i++)
parts[i].Inventory.CreateScriptInstances(startParam, postOnRez, engine, stateSource);
scriptsStarted
+= parts[i].Inventory.CreateScriptInstances(startParam, postOnRez, engine, stateSource);
}
return scriptsStarted;
}
/// <summary>