diff options
author | Charles Krinke | 2008-04-10 15:38:33 +0000 |
---|---|---|
committer | Charles Krinke | 2008-04-10 15:38:33 +0000 |
commit | f565f44d89d57fe688d81d5c77b5aa43df922d96 (patch) | |
tree | 692145efc8f03bed0f13372a83f04cfb8eb1ed19 | |
parent | Thank you kindly, A_Biondi for a patch that: (diff) | |
download | opensim-SC-f565f44d89d57fe688d81d5c77b5aa43df922d96.zip opensim-SC-f565f44d89d57fe688d81d5c77b5aa43df922d96.tar.gz opensim-SC-f565f44d89d57fe688d81d5c77b5aa43df922d96.tar.bz2 opensim-SC-f565f44d89d57fe688d81d5c77b5aa43df922d96.tar.xz |
Thank you Justin for a patch that solves the issue of: When a sensor detects an Avatar,
and llDetectedOwner is called on the script, the current implementation attempts to
find the detected avatar as a SceneObjectPart and return the owner of that part.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index a070248..6a0b3e2 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -509,11 +509,21 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
509 | EntityBase SensedObject = entityDetectedKey(number); | 509 | EntityBase SensedObject = entityDetectedKey(number); |
510 | if (SensedObject ==null) | 510 | if (SensedObject ==null) |
511 | return String.Empty; | 511 | return String.Empty; |
512 | //return SensedObject.O .Name; // What is the owner of the object ? | ||
513 | //EntityBase SensedObject = World.GetScenePresence(SensedUUID); | ||
514 | LLUUID SensedUUID = uuidDetectedKey(number); | 512 | LLUUID SensedUUID = uuidDetectedKey(number); |
515 | SceneObjectPart SOP = World.GetSceneObjectPart(SensedUUID); | 513 | if (World.GetScenePresence(SensedUUID) == null) |
516 | if (SOP != null) { return SOP.ObjectOwner.ToString(); } | 514 | { |
515 | // sensed object is not an avatar | ||
516 | // so get the owner of the sensed object | ||
517 | SceneObjectPart SOP = World.GetSceneObjectPart(SensedUUID); | ||
518 | if (SOP != null) { return SOP.ObjectOwner.ToString(); } | ||
519 | } | ||
520 | else | ||
521 | { | ||
522 | // sensed object is an avatar, and so must be its own owner | ||
523 | return SensedUUID.ToString(); | ||
524 | } | ||
525 | |||
526 | |||
517 | return String.Empty; | 527 | return String.Empty; |
518 | 528 | ||
519 | } | 529 | } |