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.0.6.0-stable
parent
4bdb4a2646
commit
f565f44d89
|
@ -509,11 +509,21 @@ namespace OpenSim.Region.ScriptEngine.Common
|
|||
EntityBase SensedObject = entityDetectedKey(number);
|
||||
if (SensedObject ==null)
|
||||
return String.Empty;
|
||||
//return SensedObject.O .Name; // What is the owner of the object ?
|
||||
//EntityBase SensedObject = World.GetScenePresence(SensedUUID);
|
||||
LLUUID SensedUUID = uuidDetectedKey(number);
|
||||
if (World.GetScenePresence(SensedUUID) == null)
|
||||
{
|
||||
// sensed object is not an avatar
|
||||
// so get the owner of the sensed object
|
||||
SceneObjectPart SOP = World.GetSceneObjectPart(SensedUUID);
|
||||
if (SOP != null) { return SOP.ObjectOwner.ToString(); }
|
||||
}
|
||||
else
|
||||
{
|
||||
// sensed object is an avatar, and so must be its own owner
|
||||
return SensedUUID.ToString();
|
||||
}
|
||||
|
||||
|
||||
return String.Empty;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue