diff options
author | Melanie Thielker | 2010-06-11 17:04:54 +0200 |
---|---|---|
committer | Melanie | 2010-06-11 17:03:45 +0100 |
commit | b64f42fa4142a71dffa2639769b9bf2d4584ec30 (patch) | |
tree | d5b40245e47900481de3eb65fffbe26fce648109 | |
parent | Better friends notification: get rid of OnLogout and use OnClientClose for se... (diff) | |
download | opensim-SC-b64f42fa4142a71dffa2639769b9bf2d4584ec30.zip opensim-SC-b64f42fa4142a71dffa2639769b9bf2d4584ec30.tar.gz opensim-SC-b64f42fa4142a71dffa2639769b9bf2d4584ec30.tar.bz2 opensim-SC-b64f42fa4142a71dffa2639769b9bf2d4584ec30.tar.xz |
Clone cmGetAvatarList into osGetAvatarList for more generic use.
Diffstat (limited to '')
3 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index dde664e..cd6d3a3 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2202,5 +2202,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2202 | 2202 | ||
2203 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules); | 2203 | m_LSL_Api.SetPrimitiveParamsEx(prim, rules); |
2204 | } | 2204 | } |
2205 | |||
2206 | /// <summary> | ||
2207 | /// Like osGetAgents but returns enough info for a radar | ||
2208 | /// </summary> | ||
2209 | /// <returns>Strided list of the UUID, position and name of each avatar in the region</returns> | ||
2210 | public LSL_List osGetAvatarList() | ||
2211 | { | ||
2212 | CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); | ||
2213 | |||
2214 | LSL_List result = new LSL_List(); | ||
2215 | World.ForEachScenePresence(delegate (ScenePresence avatar) | ||
2216 | { | ||
2217 | if (avatar != null && avatar.UUID != m_host.OwnerID) | ||
2218 | { | ||
2219 | if (avatar.IsChildAgent == false) | ||
2220 | { | ||
2221 | if (avatar.PhysicsActor != null && avatar.PhysicsActor.Position != null) | ||
2222 | { | ||
2223 | result.Add(avatar.UUID); | ||
2224 | result.Add(avatar.PhysicsActor.Position); | ||
2225 | result.Add(avatar.Name); | ||
2226 | } | ||
2227 | } | ||
2228 | } | ||
2229 | }); | ||
2230 | return result; | ||
2231 | } | ||
2205 | } | 2232 | } |
2206 | } | 2233 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index 9785b24..78ee43c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -176,6 +176,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
176 | void osCauseDamage(string avatar, double damage); | 176 | void osCauseDamage(string avatar, double damage); |
177 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); | 177 | LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules); |
178 | void osSetPrimitiveParams(LSL_Key prim, LSL_List rules); | 178 | void osSetPrimitiveParams(LSL_Key prim, LSL_List rules); |
179 | LSL_List osGetAvatarList(); | ||
179 | 180 | ||
180 | } | 181 | } |
181 | } | 182 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 7af5d43..6cc5f51 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -687,5 +687,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
687 | { | 687 | { |
688 | m_OSSL_Functions.osSetPrimitiveParams(prim, rules); | 688 | m_OSSL_Functions.osSetPrimitiveParams(prim, rules); |
689 | } | 689 | } |
690 | |||
691 | public LSL_List osGetAvatarList() | ||
692 | { | ||
693 | return m_OSSL_Functions.osGetAvatarList(); | ||
694 | } | ||
690 | } | 695 | } |
691 | } | 696 | } |