mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
Merge branch 'ubitworkmaster'
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