From dce280913706f7359cac07b98a6126af0bb4240b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 4 Jan 2013 21:18:53 +0000 Subject: Automatically grant sit-related llRequestPermissions() for subsequent avatars sitting on the same scene obejct, instead of wrongly popping up request permissions dialog. Resolves http://opensimulator.org/mantis/view.php?id=6478 --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 14aaa86..967c249 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3412,21 +3412,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } else { - bool sitting = false; - if (m_host.SitTargetAvatar == agentID) - { - sitting = true; - } - else - { - foreach (SceneObjectPart p in m_host.ParentGroup.Parts) - { - if (p.SitTargetAvatar == agentID) - sitting = true; - } - } - - if (sitting) + if (m_host.ParentGroup.GetSittingAvatars().Contains(agentID) { // When agent is sitting, certain permissions are implicit if requested from sitting agent implicitPerms = ScriptBaseClass.PERMISSION_TRIGGER_ANIMATION | -- cgit v1.1