Allow all NPCs to show up on sensors as all osNpc* script methods now check for ownership permission before executing.

As per #opensim-dev irc discussion.
iar_mods
Justin Clark-Casey (justincc) 2012-01-12 19:19:34 +00:00
parent ba3491c76e
commit d27dd3714f
1 changed files with 9 additions and 6 deletions

View File

@ -463,12 +463,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
toRegionPos = presence.AbsolutePosition; toRegionPos = presence.AbsolutePosition;
dis = Math.Abs(Util.GetDistanceTo(toRegionPos, fromRegionPos)); dis = Math.Abs(Util.GetDistanceTo(toRegionPos, fromRegionPos));
if (presence.PresenceType == PresenceType.Npc && npcModule != null) // 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
UUID npcOwner = npcModule.GetOwner(presence.UUID); // sensed might be useful.
if (npcOwner != UUID.Zero && npcOwner != SensePoint.OwnerID) // if (presence.PresenceType == PresenceType.Npc && npcModule != null)
return; // {
} // UUID npcOwner = npcModule.GetOwner(presence.UUID);
// if (npcOwner != UUID.Zero && npcOwner != SensePoint.OwnerID)
// return;
// }
// are they in range // are they in range
if (dis <= ts.range) if (dis <= ts.range)