diff options
author | Talun | 2012-04-09 19:58:07 +0100 |
---|---|---|
committer | Melanie | 2012-04-09 21:25:22 +0100 |
commit | 78c0028179923710949fea349baad2e6bebc49bd (patch) | |
tree | ad83b28069f46f0890cae3f9405f3d4c5f273da8 /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | Addresses mantis #5846 (diff) | |
download | opensim-SC_OLD-78c0028179923710949fea349baad2e6bebc49bd.zip opensim-SC_OLD-78c0028179923710949fea349baad2e6bebc49bd.tar.gz opensim-SC_OLD-78c0028179923710949fea349baad2e6bebc49bd.tar.bz2 opensim-SC_OLD-78c0028179923710949fea349baad2e6bebc49bd.tar.xz |
Mantis5502 implementation of some of the new constants
Signed-off-by: Melanie <melanie@t-data.com>
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a21c66f..8863df1 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3418,6 +3418,44 @@ namespace OpenSim.Region.Framework.Scenes | |||
3418 | return m_attachments.Count > 0; | 3418 | return m_attachments.Count > 0; |
3419 | } | 3419 | } |
3420 | 3420 | ||
3421 | /// <summary> | ||
3422 | /// Returns the total count of scripts in all parts inventories. | ||
3423 | /// </summary> | ||
3424 | public int ScriptCount() | ||
3425 | { | ||
3426 | int count = 0; | ||
3427 | lock (m_attachments) | ||
3428 | { | ||
3429 | foreach (SceneObjectGroup gobj in m_attachments) | ||
3430 | { | ||
3431 | if (gobj != null) | ||
3432 | { | ||
3433 | count += gobj.ScriptCount(); | ||
3434 | } | ||
3435 | } | ||
3436 | } | ||
3437 | return count; | ||
3438 | } | ||
3439 | |||
3440 | /// <summary> | ||
3441 | /// Returns the total count of running scripts in all parts. | ||
3442 | /// </summary> | ||
3443 | public int RunningScriptCount() | ||
3444 | { | ||
3445 | int count = 0; | ||
3446 | lock (m_attachments) | ||
3447 | { | ||
3448 | foreach (SceneObjectGroup gobj in m_attachments) | ||
3449 | { | ||
3450 | if (gobj != null) | ||
3451 | { | ||
3452 | count += gobj.RunningScriptCount(); | ||
3453 | } | ||
3454 | } | ||
3455 | } | ||
3456 | return count; | ||
3457 | } | ||
3458 | |||
3421 | public bool HasScriptedAttachments() | 3459 | public bool HasScriptedAttachments() |
3422 | { | 3460 | { |
3423 | lock (m_attachments) | 3461 | lock (m_attachments) |