diff options
author | UbitUmarov | 2014-08-10 22:13:39 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-10 22:13:39 +0100 |
commit | 67a91ee314b3c3bcf0d777057bba405cb33124e8 (patch) | |
tree | fa7dc224609618cfdb5065768a70f90f87743e36 /OpenSim | |
parent | TEST move parcelRegionCross to EntityTransferModule cross so it works on (diff) | |
download | opensim-SC_OLD-67a91ee314b3c3bcf0d777057bba405cb33124e8.zip opensim-SC_OLD-67a91ee314b3c3bcf0d777057bba405cb33124e8.tar.gz opensim-SC_OLD-67a91ee314b3c3bcf0d777057bba405cb33124e8.tar.bz2 opensim-SC_OLD-67a91ee314b3c3bcf0d777057bba405cb33124e8.tar.xz |
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)
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 11 |
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 |