aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-01-12 19:19:34 +0000
committerJustin Clark-Casey (justincc)2012-01-12 19:19:34 +0000
commitd27dd3714f77aa37db1eeb241401270163cd236d (patch)
treee749ea3f42c31f05c473e77fe2f9fb0a6ebdde05
parentAdd permissions checks for owned avatars to all other osNpc* functions. (diff)
downloadopensim-SC-d27dd3714f77aa37db1eeb241401270163cd236d.zip
opensim-SC-d27dd3714f77aa37db1eeb241401270163cd236d.tar.gz
opensim-SC-d27dd3714f77aa37db1eeb241401270163cd236d.tar.bz2
opensim-SC-d27dd3714f77aa37db1eeb241401270163cd236d.tar.xz
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.
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs15
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 7d7813d..8356dce 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -463,12 +463,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
463 toRegionPos = presence.AbsolutePosition; 463 toRegionPos = presence.AbsolutePosition;
464 dis = Math.Abs(Util.GetDistanceTo(toRegionPos, fromRegionPos)); 464 dis = Math.Abs(Util.GetDistanceTo(toRegionPos, fromRegionPos));
465 465
466 if (presence.PresenceType == PresenceType.Npc && npcModule != null) 466 // Disabled for now since all osNpc* methods check for appropriate ownership permission.
467 { 467 // Perhaps could be re-enabled as an NPC setting at some point since being able to make NPCs not
468 UUID npcOwner = npcModule.GetOwner(presence.UUID); 468 // sensed might be useful.
469 if (npcOwner != UUID.Zero && npcOwner != SensePoint.OwnerID) 469// if (presence.PresenceType == PresenceType.Npc && npcModule != null)
470 return; 470// {
471 } 471// UUID npcOwner = npcModule.GetOwner(presence.UUID);
472// if (npcOwner != UUID.Zero && npcOwner != SensePoint.OwnerID)
473// return;
474// }
472 475
473 // are they in range 476 // are they in range
474 if (dis <= ts.range) 477 if (dis <= ts.range)