Thank you kindly, Idb for a patch that solves:
lsl conformity, llPushObject incorrectly restricts the pushing of objects based on region and parcel flags0.6.0-stable
parent
a5d945e199
commit
e9134a050a
|
@ -3480,16 +3480,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ScenePresence pusheeav = null;
|
ScenePresence pusheeav = null;
|
||||||
//SceneObjectPart pusheeob = null;
|
|
||||||
EntityBase obj = null;
|
|
||||||
Vector3 PusheePos = Vector3.Zero;
|
Vector3 PusheePos = Vector3.Zero;
|
||||||
SceneObjectPart pusheeob = null;
|
SceneObjectPart pusheeob = null;
|
||||||
|
|
||||||
List<ScenePresence> avatars = World.GetAvatars();
|
|
||||||
|
|
||||||
foreach (ScenePresence avatar in avatars)
|
ScenePresence avatar = World.GetScenePresence(targetID);
|
||||||
{
|
if (avatar != null)
|
||||||
if (avatar.UUID == targetID)
|
|
||||||
{
|
{
|
||||||
pusheeIsAvatar = true;
|
pusheeIsAvatar = true;
|
||||||
|
|
||||||
|
@ -3521,14 +3517,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
PusheePos = pusheeav.AbsolutePosition;
|
PusheePos = pusheeav.AbsolutePosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
obj = (EntityBase)pusheeav;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pusheeIsAvatar)
|
if (!pusheeIsAvatar)
|
||||||
{
|
{
|
||||||
|
// not an avatar so push is not affected by parcel flags
|
||||||
pusheeob = World.GetSceneObjectPart((UUID)target);
|
pusheeob = World.GetSceneObjectPart((UUID)target);
|
||||||
|
|
||||||
// We can't find object
|
// We can't find object
|
||||||
|
@ -3540,13 +3533,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PusheePos = pusheeob.AbsolutePosition;
|
PusheePos = pusheeob.AbsolutePosition;
|
||||||
//obj = (EntityBase)pusheeob;
|
pushAllowed = true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (pushrestricted)
|
if (pushrestricted)
|
||||||
{
|
{
|
||||||
ILandObject targetlandObj = World.LandChannel.GetLandObject(PusheePos.X,PusheePos.Y);
|
ILandObject targetlandObj = World.LandChannel.GetLandObject(PusheePos.X, PusheePos.Y);
|
||||||
|
|
||||||
// We didn't find the parcel but region is push restricted so assume it is NOT ok
|
// We didn't find the parcel but region is push restricted so assume it is NOT ok
|
||||||
if (targetlandObj == null)
|
if (targetlandObj == null)
|
||||||
|
@ -3587,6 +3580,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (pushAllowed)
|
if (pushAllowed)
|
||||||
{
|
{
|
||||||
float distance = (PusheePos - m_host.AbsolutePosition).Length();
|
float distance = (PusheePos - m_host.AbsolutePosition).Length();
|
||||||
|
|
Loading…
Reference in New Issue