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.

0.8.0.3
Vegaslon 2014-05-05 19:56:35 -04:00 committed by Justin Clark-Casey (justincc)
parent c9742c826d
commit e245638f24
1 changed files with 2 additions and 1 deletions

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