mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 06:06:06 +08:00
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)
This commit is contained in:
@@ -549,7 +549,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
return;
|
||||
|
||||
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.
|
||||
// Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not
|
||||
|
||||
Reference in New Issue
Block a user