diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index f6c8e38..678f9d5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -60,8 +60,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
60 | m_CmdManager = CmdManager; | 60 | m_CmdManager = CmdManager; |
61 | maximumRange = CmdManager.m_ScriptEngine.Config.GetDouble("SensorMaxRange", 96.0d); | 61 | maximumRange = CmdManager.m_ScriptEngine.Config.GetDouble("SensorMaxRange", 96.0d); |
62 | maximumToReturn = CmdManager.m_ScriptEngine.Config.GetInt("SensorMaxResults", 16); | 62 | maximumToReturn = CmdManager.m_ScriptEngine.Config.GetInt("SensorMaxResults", 16); |
63 | m_npcModule = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<INPCModule>(); | ||
63 | } | 64 | } |
64 | 65 | ||
66 | private INPCModule m_npcModule; | ||
67 | |||
65 | private Object SenseLock = new Object(); | 68 | private Object SenseLock = new Object(); |
66 | 69 | ||
67 | private const int AGENT = 1; | 70 | private const int AGENT = 1; |
@@ -451,8 +454,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
451 | 454 | ||
452 | private List<SensedEntity> doAgentSensor(SenseRepeatClass ts) | 455 | private List<SensedEntity> doAgentSensor(SenseRepeatClass ts) |
453 | { | 456 | { |
454 | INPCModule npcModule = m_CmdManager.m_ScriptEngine.World.RequestModuleInterface<INPCModule>(); | ||
455 | |||
456 | List<SensedEntity> sensedEntities = new List<SensedEntity>(); | 457 | List<SensedEntity> sensedEntities = new List<SensedEntity>(); |
457 | 458 | ||
458 | // If nobody about quit fast | 459 | // If nobody about quit fast |
@@ -488,7 +489,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
488 | bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); | 489 | bool attached = (SensePoint.ParentGroup.AttachmentPoint != 0); |
489 | Vector3 toRegionPos; | 490 | Vector3 toRegionPos; |
490 | double dis; | 491 | double dis; |
491 | 492 | ||
492 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => | 493 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => |
493 | { | 494 | { |
494 | // m_log.DebugFormat( | 495 | // m_log.DebugFormat( |
@@ -497,7 +498,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
497 | 498 | ||
498 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) | 499 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) |
499 | { | 500 | { |
500 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | 501 | INPC npcData = m_npcModule.GetNPC(presence.UUID, presence.Scene); |
501 | if (npcData == null || !npcData.SenseAsAgent) | 502 | if (npcData == null || !npcData.SenseAsAgent) |
502 | { | 503 | { |
503 | // m_log.DebugFormat( | 504 | // m_log.DebugFormat( |
@@ -515,7 +516,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
515 | } | 516 | } |
516 | else | 517 | else |
517 | { | 518 | { |
518 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | 519 | INPC npcData = m_npcModule.GetNPC(presence.UUID, presence.Scene); |
519 | if (npcData != null && npcData.SenseAsAgent) | 520 | if (npcData != null && npcData.SenseAsAgent) |
520 | { | 521 | { |
521 | // m_log.DebugFormat( | 522 | // m_log.DebugFormat( |