diff options
author | Justin Clarke Casey | 2008-09-17 13:14:07 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-09-17 13:14:07 +0000 |
commit | 6bcdc82a465d8471e1aab66077ce5aaa944f78f6 (patch) | |
tree | 6f09e6a7150766b7ba93852e85b899e9ead59dab /OpenSim/Region/ScriptEngine/Shared/Api | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC-6bcdc82a465d8471e1aab66077ce5aaa944f78f6.zip opensim-SC-6bcdc82a465d8471e1aab66077ce5aaa944f78f6.tar.gz opensim-SC-6bcdc82a465d8471e1aab66077ce5aaa944f78f6.tar.bz2 opensim-SC-6bcdc82a465d8471e1aab66077ce5aaa944f78f6.tar.xz |
* Apply http://opensimulator.org/mantis/view.php?id=2206
* Fix/implement LSL group-related functions llDetectedGroup, llSameGroup
* Thanks nlin
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 4219854..20b52b7 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -4553,8 +4553,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4553 | public LSL_Types.LSLInteger llSameGroup(string agent) | 4553 | public LSL_Types.LSLInteger llSameGroup(string agent) |
4554 | { | 4554 | { |
4555 | m_host.AddScriptLPS(1); | 4555 | m_host.AddScriptLPS(1); |
4556 | NotImplemented("llSameGroup"); | 4556 | UUID agentId = new UUID(); |
4557 | return 0; | 4557 | if (!UUID.TryParse(agent, out agentId)) |
4558 | return new LSL_Types.LSLInteger(0); | ||
4559 | ScenePresence presence = World.GetScenePresence(agentId); | ||
4560 | if (presence == null) | ||
4561 | return new LSL_Types.LSLInteger(0); | ||
4562 | IClientAPI client = presence.ControllingClient; | ||
4563 | if (m_host.GroupID == client.ActiveGroupId) | ||
4564 | return new LSL_Types.LSLInteger(1); | ||
4565 | else | ||
4566 | return new LSL_Types.LSLInteger(0); | ||
4558 | } | 4567 | } |
4559 | 4568 | ||
4560 | public void llUnSit(string id) | 4569 | public void llUnSit(string id) |