aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs17
2 files changed, 19 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index b1583eb..c55e2ae 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -2233,7 +2233,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2233 CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); 2233 CheckThreatLevel(ThreatLevel.High, "osNpcCreate");
2234 m_host.AddScriptLPS(1); 2234 m_host.AddScriptLPS(1);
2235 2235
2236 return NpcCreate(firstname, lastname, position, notecard, false, true); 2236 return NpcCreate(firstname, lastname, position, notecard, false, false);
2237 } 2237 }
2238 2238
2239 public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) 2239 public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options)
@@ -2244,7 +2244,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2244 return NpcCreate( 2244 return NpcCreate(
2245 firstname, lastname, position, notecard, 2245 firstname, lastname, position, notecard,
2246 (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0, 2246 (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0,
2247 (options & ScriptBaseClass.OS_NPC_SENSE_AS_AGENT) == 0); 2247 (options & ScriptBaseClass.OS_NPC_SENSE_AS_AGENT) != 0);
2248 } 2248 }
2249 2249
2250 private LSL_Key NpcCreate( 2250 private LSL_Key NpcCreate(
@@ -2595,7 +2595,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2595 UUID npcID = new UUID(npc.m_string); 2595 UUID npcID = new UUID(npc.m_string);
2596 2596
2597 if (module.CheckPermissions(npcID, m_host.OwnerID)) 2597 if (module.CheckPermissions(npcID, m_host.OwnerID))
2598 AvatarPlayAnimation(npcID.ToString(), animation); 2598 AvatarStopAnimation(npcID.ToString(), animation);
2599 } 2599 }
2600 } 2600 }
2601 2601
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