aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs22
1 files changed, 5 insertions, 17 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index d5562f2..ee2a94c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -2110,14 +2110,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2110 public LSL_Integer llRotTarget(LSL_Rotation rot, double error) 2110 public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
2111 { 2111 {
2112 m_host.AddScriptLPS(1); 2112 m_host.AddScriptLPS(1);
2113 NotImplemented("llRotTarget"); 2113 return m_host.registerRotTargetWaypoint(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s), (float)error);
2114 return 0;
2115 } 2114 }
2116 2115
2117 public void llRotTargetRemove(int number) 2116 public void llRotTargetRemove(int number)
2118 { 2117 {
2119 m_host.AddScriptLPS(1); 2118 m_host.AddScriptLPS(1);
2120 NotImplemented("llRotTargetRemove"); 2119 m_host.unregisterRotTargetWaypoint(number);
2121 } 2120 }
2122 2121
2123 public void llMoveToTarget(LSL_Vector target, double tau) 2122 public void llMoveToTarget(LSL_Vector target, double tau)
@@ -7286,23 +7285,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7286 public LSL_Integer llGetNumberOfPrims() 7285 public LSL_Integer llGetNumberOfPrims()
7287 { 7286 {
7288 m_host.AddScriptLPS(1); 7287 m_host.AddScriptLPS(1);
7289 ScenePresence[] presences = World.GetScenePresences();
7290 if (presences.Length == 0)
7291 return 0;
7292
7293 int avatarCount = 0; 7288 int avatarCount = 0;
7294 for (int i = 0; i < presences.Length; i++) 7289 World.ForEachScenePresence(delegate(ScenePresence presence)
7295 { 7290 {
7296 ScenePresence presence = presences[i]; 7291 if (!presence.IsChildAgent && presence.ParentID != 0 && m_host.ParentGroup.HasChildPrim(presence.ParentID))
7297
7298 if (!presence.IsChildAgent && presence.ParentID != 0)
7299 {
7300 if (m_host.ParentGroup.HasChildPrim(presence.ParentID))
7301 {
7302 avatarCount++; 7292 avatarCount++;
7303 } 7293 });
7304 }
7305 }
7306 7294
7307 return m_host.ParentGroup.PrimCount + avatarCount; 7295 return m_host.ParentGroup.PrimCount + avatarCount;
7308 } 7296 }