Change llUnSit to be able to unsit any avatar that is currently sat on the object, not just avatars sitting on the sittarget in the object containing the script. or when the object is owned by the parcel, land group or estate owner.

This commit is contained in:
Vegaslon
2014-05-05 19:56:35 -04:00
committed by Justin Clark-Casey (justincc)
parent c9742c826d
commit e245638f24

View File

@@ -6155,10 +6155,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
if (UUID.TryParse(id, out key))
{
ScenePresence av = World.GetScenePresence(key);
List<ScenePresence> sittingAvatars = m_host.ParentGroup.GetSittingAvatars();
if (av != null)
{
if (llAvatarOnSitTarget() == id)
if (sittingAvatars.Contains(av))
{
// if the avatar is sitting on this object, then
// we can unsit them. We don't want random scripts unsitting random people