aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs17
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs6
2 files changed, 8 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 42c52dd..085d61f 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -7456,23 +7456,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7456 public LSL_Integer llGetNumberOfPrims() 7456 public LSL_Integer llGetNumberOfPrims()
7457 { 7457 {
7458 m_host.AddScriptLPS(1); 7458 m_host.AddScriptLPS(1);
7459 ScenePresence[] presences = World.GetScenePresences();
7460 if (presences.Length == 0)
7461 return 0;
7462
7463 int avatarCount = 0; 7459 int avatarCount = 0;
7464 for (int i = 0; i < presences.Length; i++) 7460 World.ForEachScenePresence(delegate(ScenePresence presence)
7465 { 7461 {
7466 ScenePresence presence = presences[i]; 7462 if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
7467
7468 if (!presence.IsChildAgent && presence.ParentID != 0)
7469 {
7470 if (m_host.ParentGroup.HasChildPrim(presence.ParentID))
7471 {
7472 avatarCount++; 7463 avatarCount++;
7473 } 7464 });
7474 }
7475 }
7476 7465
7477 return m_host.ParentGroup.PrimCount + avatarCount; 7466 return m_host.ParentGroup.PrimCount + avatarCount;
7478 } 7467 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index a5be251..1ddba1e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1987,6 +1987,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1987 1987
1988 return (int)pws; 1988 return (int)pws;
1989 } 1989 }
1990
1990 public void osSetSpeed(string UUID, float SpeedModifier) 1991 public void osSetSpeed(string UUID, float SpeedModifier)
1991 { 1992 {
1992 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); 1993 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
@@ -1994,6 +1995,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1994 ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); 1995 ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
1995 avatar.SpeedModifier = SpeedModifier; 1996 avatar.SpeedModifier = SpeedModifier;
1996 } 1997 }
1998
1997 public void osKickAvatar(string FirstName,string SurName,string alert) 1999 public void osKickAvatar(string FirstName,string SurName,string alert)
1998 { 2000 {
1999 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 2001 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
@@ -2014,6 +2016,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2014 } 2016 }
2015 } 2017 }
2016 } 2018 }
2019
2017 public void osCauseDamage(string avatar, double damage) 2020 public void osCauseDamage(string avatar, double damage)
2018 { 2021 {
2019 CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); 2022 CheckThreatLevel(ThreatLevel.High, "osCauseDamage");
@@ -2041,6 +2044,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2041 } 2044 }
2042 } 2045 }
2043 } 2046 }
2047
2044 public void osCauseHealing(string avatar, double healing) 2048 public void osCauseHealing(string avatar, double healing)
2045 { 2049 {
2046 CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); 2050 CheckThreatLevel(ThreatLevel.High, "osCauseHealing");
@@ -2065,4 +2069,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2065 } 2069 }
2066 } 2070 }
2067 } 2071 }
2068} 2072} \ No newline at end of file