make sensors detect sitting avatars also by the distance to the root prim
of the object as sl does (as sl avatar needs to be in the arc)avinationmerge
parent
7fcd1068e7
commit
67a91ee314
|
@ -549,7 +549,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||||
return;
|
return;
|
||||||
|
|
||||||
toRegionPos = presence.AbsolutePosition;
|
toRegionPos = presence.AbsolutePosition;
|
||||||
dis = Math.Abs(Util.GetDistanceTo(toRegionPos, fromRegionPos));
|
dis = Util.GetDistanceTo(toRegionPos, fromRegionPos);
|
||||||
|
if (presence.IsSatOnObject && presence.ParentPart != null &&
|
||||||
|
presence.ParentPart.ParentGroup != null &&
|
||||||
|
presence.ParentPart.ParentGroup.RootPart != null)
|
||||||
|
{
|
||||||
|
Vector3 rpos = presence.ParentPart.ParentGroup.RootPart.AbsolutePosition;
|
||||||
|
double dis2 = Util.GetDistanceTo(rpos, fromRegionPos);
|
||||||
|
if (dis > dis2)
|
||||||
|
dis = dis2;
|
||||||
|
}
|
||||||
|
|
||||||
// Disabled for now since all osNpc* methods check for appropriate ownership permission.
|
// Disabled for now since all osNpc* methods check for appropriate ownership permission.
|
||||||
// Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not
|
// Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not
|
||||||
|
|
Loading…
Reference in New Issue