aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins
diff options
context:
space:
mode:
authorMelanie2012-08-01 23:03:03 +0100
committerMelanie2012-08-01 23:03:03 +0100
commitecffcf7f65151a45b6396354d66fec70a7f3bad8 (patch)
treec2b98c522344cf713421b21ddb4452e537396f5a /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins
parentMerge branch 'master' into careminster (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-ecffcf7f65151a45b6396354d66fec70a7f3bad8.zip
opensim-SC_OLD-ecffcf7f65151a45b6396354d66fec70a7f3bad8.tar.gz
opensim-SC_OLD-ecffcf7f65151a45b6396354d66fec70a7f3bad8.tar.bz2
opensim-SC_OLD-ecffcf7f65151a45b6396354d66fec70a7f3bad8.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/Scene.cs OpenSim/Region/Physics/Manager/PhysicsScene.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs11
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(