aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs29
1 files changed, 20 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 3e0e452..850f50b 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -445,17 +445,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
445 Vector3 toRegionPos; 445 Vector3 toRegionPos;
446 double dis; 446 double dis;
447 447
448 Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) 448 Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence =>
449 { 449 {
450 if ((ts.type & NPC) == 0 450 if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc)
451 && presence.PresenceType == PresenceType.Npc 451 {
452 && !npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent) 452 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
453 return; 453 if (npcData == null || !npcData.SenseAsAgent)
454 return;
455 }
454 456
455 if ((ts.type & AGENT) == 0 457 if ((ts.type & AGENT) == 0)
456 && (presence.PresenceType == PresenceType.User 458 {
457 || npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent)) 459 if (presence.PresenceType == PresenceType.User)
458 return; 460 {
461 return;
462 }
463 else
464 {
465 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
466 if (npcData != null && npcData.SenseAsAgent)
467 return;
468 }
469 }
459 470
460 if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) 471 if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0)
461 return; 472 return;