mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 09:16:28 +08:00
duhh things about scripts are for objects with scripts, not all
This commit is contained in:
@@ -5228,14 +5228,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
return time;
|
||||
}
|
||||
|
||||
public int ScriptsMemory()
|
||||
public bool ScriptsMemory(out int memory)
|
||||
{
|
||||
memory = 0;
|
||||
IScriptModule[] engines = Scene.RequestModuleInterfaces<IScriptModule>();
|
||||
|
||||
if (engines.Length == 0) // No engine at all
|
||||
return 0;
|
||||
|
||||
int memory = 0;
|
||||
return false;
|
||||
|
||||
// get all the scripts in all parts
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
@@ -5244,6 +5242,10 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
scripts.AddRange(parts[i].Inventory.GetInventoryItems(InventoryType.LSL));
|
||||
}
|
||||
|
||||
if (scripts.Count == 0)
|
||||
return false;
|
||||
|
||||
// extract the UUIDs
|
||||
List<UUID> ids = new List<UUID>(scripts.Count);
|
||||
foreach (TaskInventoryItem script in scripts)
|
||||
@@ -5261,7 +5263,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
memory += e.GetScriptsMemory(ids);
|
||||
}
|
||||
}
|
||||
return memory;
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user