aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorMelanie2010-01-16 00:05:08 +0000
committerMelanie2010-01-16 00:05:08 +0000
commit10f8c2ea9b67158c32b361f9652d503ea48de292 (patch)
treebe0d88bc4b6df3825a0d27f62a08170d7c7ad262 /OpenSim/Region/ScriptEngine/Shared/Api
parentMerge branch 'presence-refactor' of ssh://diva@opensimulator.org/var/git/open... (diff)
parentAdd "create user" instructions to README.txt (diff)
downloadopensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.zip
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.gz
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.bz2
opensim-SC_OLD-10f8c2ea9b67158c32b361f9652d503ea48de292.tar.xz
Merge branch 'master' into presence-refactor
This merge was very conflicted. I think I got them all, but I can't be sure. I had to merge to master or risk divergence to the point of unmergeability.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs22
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs3
3 files changed, 12 insertions, 19 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 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 0ed7f51..7462ba0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1981,6 +1981,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1981 1981
1982 return (int)pws; 1982 return (int)pws;
1983 } 1983 }
1984
1984 public void osSetSpeed(string UUID, float SpeedModifier) 1985 public void osSetSpeed(string UUID, float SpeedModifier)
1985 { 1986 {
1986 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed"); 1987 CheckThreatLevel(ThreatLevel.Moderate, "osSetSpeed");
@@ -1988,6 +1989,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1988 ScenePresence avatar = World.GetScenePresence(new UUID(UUID)); 1989 ScenePresence avatar = World.GetScenePresence(new UUID(UUID));
1989 avatar.SpeedModifier = SpeedModifier; 1990 avatar.SpeedModifier = SpeedModifier;
1990 } 1991 }
1992
1991 public void osKickAvatar(string FirstName,string SurName,string alert) 1993 public void osKickAvatar(string FirstName,string SurName,string alert)
1992 { 1994 {
1993 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar"); 1995 CheckThreatLevel(ThreatLevel.Severe, "osKickAvatar");
@@ -2008,6 +2010,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2008 } 2010 }
2009 } 2011 }
2010 } 2012 }
2013
2011 public void osCauseDamage(string avatar, double damage) 2014 public void osCauseDamage(string avatar, double damage)
2012 { 2015 {
2013 CheckThreatLevel(ThreatLevel.High, "osCauseDamage"); 2016 CheckThreatLevel(ThreatLevel.High, "osCauseDamage");
@@ -2035,6 +2038,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2035 } 2038 }
2036 } 2039 }
2037 } 2040 }
2041
2038 public void osCauseHealing(string avatar, double healing) 2042 public void osCauseHealing(string avatar, double healing)
2039 { 2043 {
2040 CheckThreatLevel(ThreatLevel.High, "osCauseHealing"); 2044 CheckThreatLevel(ThreatLevel.High, "osCauseHealing");
@@ -2059,4 +2063,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2059 } 2063 }
2060 } 2064 }
2061 } 2065 }
2062} 2066} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
index 7f67599..9615315 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/Executor.cs
@@ -62,6 +62,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
62 land_collision_end = 4096, 62 land_collision_end = 4096,
63 land_collision_start = 8192, 63 land_collision_start = 8192,
64 at_target = 16384, 64 at_target = 16384,
65 at_rot_target = 16777216,
65 listen = 32768, 66 listen = 32768,
66 money = 65536, 67 money = 65536,
67 moving_end = 131072, 68 moving_end = 131072,
@@ -203,7 +204,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
203 } 204 }
204 205
205 m_eventFlagsMap.Add("attach", scriptEvents.attach); 206 m_eventFlagsMap.Add("attach", scriptEvents.attach);
206 // m_eventFlagsMap.Add("at_rot_target",(long)scriptEvents.at_rot_target); 207 m_eventFlagsMap.Add("at_rot_target", scriptEvents.at_rot_target);
207 m_eventFlagsMap.Add("at_target", scriptEvents.at_target); 208 m_eventFlagsMap.Add("at_target", scriptEvents.at_target);
208 // m_eventFlagsMap.Add("changed",(long)scriptEvents.changed); 209 // m_eventFlagsMap.Add("changed",(long)scriptEvents.changed);
209 m_eventFlagsMap.Add("collision", scriptEvents.collision); 210 m_eventFlagsMap.Add("collision", scriptEvents.collision);