aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs17
1 files changed, 16 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 850f50b..5c1bdff 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -31,7 +31,6 @@ using System.Collections.Generic;
31using OpenMetaverse; 31using OpenMetaverse;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using log4net; 33using log4net;
34
35using OpenSim.Region.Framework.Interfaces; 34using OpenSim.Region.Framework.Interfaces;
36using OpenSim.Region.Framework.Scenes; 35using OpenSim.Region.Framework.Scenes;
37using OpenSim.Region.ScriptEngine.Shared; 36using OpenSim.Region.ScriptEngine.Shared;
@@ -41,6 +40,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
41{ 40{
42 public class SensorRepeat 41 public class SensorRepeat
43 { 42 {
43// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
44
44 public AsyncCommandManager m_CmdManager; 45 public AsyncCommandManager m_CmdManager;
45 46
46 public SensorRepeat(AsyncCommandManager CmdManager) 47 public SensorRepeat(AsyncCommandManager CmdManager)
@@ -447,11 +448,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
447 448
448 Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => 449 Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence =>
449 { 450 {
451// m_log.DebugFormat(
452// "[SENSOR REPEAT]: Inspecting scene presence {0}, type {1} on sensor sweep for {2}, type {3}",
453// presence.Name, presence.PresenceType, ts.name, ts.type);
454
450 if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) 455 if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc)
451 { 456 {
452 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); 457 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
453 if (npcData == null || !npcData.SenseAsAgent) 458 if (npcData == null || !npcData.SenseAsAgent)
459 {
460// m_log.DebugFormat(
461// "[SENSOR REPEAT]: Discarding NPC {0} from agent sense sweep for script item id {1}",
462// presence.Name, ts.itemID);
454 return; 463 return;
464 }
455 } 465 }
456 466
457 if ((ts.type & AGENT) == 0) 467 if ((ts.type & AGENT) == 0)
@@ -464,7 +474,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
464 { 474 {
465 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); 475 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
466 if (npcData != null && npcData.SenseAsAgent) 476 if (npcData != null && npcData.SenseAsAgent)
477 {
478// m_log.DebugFormat(
479// "[SENSOR REPEAT]: Discarding NPC {0} from non-agent sense sweep for script item id {1}",
480// presence.Name, ts.itemID);
467 return; 481 return;
482 }
468 } 483 }
469 } 484 }
470 485