aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 181399d..7bfe27b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -549,7 +549,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
549 return; 549 return;
550 550
551 toRegionPos = presence.AbsolutePosition; 551 toRegionPos = presence.AbsolutePosition;
552 dis = Math.Abs(Util.GetDistanceTo(toRegionPos, fromRegionPos)); 552 dis = Util.GetDistanceTo(toRegionPos, fromRegionPos);
553 if (presence.IsSatOnObject && presence.ParentPart != null &&
554 presence.ParentPart.ParentGroup != null &&
555 presence.ParentPart.ParentGroup.RootPart != null)
556 {
557 Vector3 rpos = presence.ParentPart.ParentGroup.RootPart.AbsolutePosition;
558 double dis2 = Util.GetDistanceTo(rpos, fromRegionPos);
559 if (dis > dis2)
560 dis = dis2;
561 }
553 562
554 // Disabled for now since all osNpc* methods check for appropriate ownership permission. 563 // Disabled for now since all osNpc* methods check for appropriate ownership permission.
555 // Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not 564 // Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not