aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-07-20 21:08:04 +0100
committerJustin Clark-Casey (justincc)2012-07-20 21:08:04 +0100
commitbcfc392edfb09adbd1cfb21843f2505d9a2adb57 (patch)
tree105aa10257a940c36c76d7f5d1f7fb3f05a88e85 /OpenSim/Region/ScriptEngine
parentEnables support for UUIDs to be returned in lists from (diff)
downloadopensim-SC-bcfc392edfb09adbd1cfb21843f2505d9a2adb57.zip
opensim-SC-bcfc392edfb09adbd1cfb21843f2505d9a2adb57.tar.gz
opensim-SC-bcfc392edfb09adbd1cfb21843f2505d9a2adb57.tar.bz2
opensim-SC-bcfc392edfb09adbd1cfb21843f2505d9a2adb57.tar.xz
As per opensim-dev mailing list conversation, introduce OS_NPC constant for use with llSensor()
This same constant will later be used with llGetDetectedType(). This constant has a different name from NPC to avoid possible conflict with future LSL changes. This constant has a different value to try and avoid unnecessary conflict with future constants that may use the same value. Using the 'NPC' constant with llSensor() will remain valid but is deprecated.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs1
2 files changed, 4 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
index 3844753..f2c8b60 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs
@@ -68,6 +68,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
68 private const int AGENT = 1; 68 private const int AGENT = 1;
69 private const int AGENT_BY_USERNAME = 0x10; 69 private const int AGENT_BY_USERNAME = 0x10;
70 private const int NPC = 0x20; 70 private const int NPC = 0x20;
71 private const int OS_NPC = 0x01000000;
71 private const int ACTIVE = 2; 72 private const int ACTIVE = 2;
72 private const int PASSIVE = 4; 73 private const int PASSIVE = 4;
73 private const int SCRIPTED = 8; 74 private const int SCRIPTED = 8;
@@ -220,7 +221,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
220 List<SensedEntity> sensedEntities = new List<SensedEntity>(); 221 List<SensedEntity> sensedEntities = new List<SensedEntity>();
221 222
222 // Is the sensor type is AGENT and not SCRIPTED then include agents 223 // Is the sensor type is AGENT and not SCRIPTED then include agents
223 if ((ts.type & (AGENT | AGENT_BY_USERNAME | NPC)) != 0 && (ts.type & SCRIPTED) == 0) 224 if ((ts.type & (AGENT | AGENT_BY_USERNAME | NPC | OS_NPC)) != 0 && (ts.type & SCRIPTED) == 0)
224 { 225 {
225 sensedEntities.AddRange(doAgentSensor(ts)); 226 sensedEntities.AddRange(doAgentSensor(ts));
226 } 227 }
@@ -479,7 +480,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
479// "[SENSOR REPEAT]: Inspecting scene presence {0}, type {1} on sensor sweep for {2}, type {3}", 480// "[SENSOR REPEAT]: Inspecting scene presence {0}, type {1} on sensor sweep for {2}, type {3}",
480// presence.Name, presence.PresenceType, ts.name, ts.type); 481// presence.Name, presence.PresenceType, ts.name, ts.type);
481 482
482 if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) 483 if ((ts.type & NPC) == 0 && (ts.type & OS_NPC) == 0 && presence.PresenceType == PresenceType.Npc)
483 { 484 {
484 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); 485 INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
485 if (npcData == null || !npcData.SenseAsAgent) 486 if (npcData == null || !npcData.SenseAsAgent)
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index b6c21e6..c3eada0 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -56,6 +56,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
56 public const int ACTIVE = 2; 56 public const int ACTIVE = 2;
57 public const int PASSIVE = 4; 57 public const int PASSIVE = 4;
58 public const int SCRIPTED = 8; 58 public const int SCRIPTED = 8;
59 public const int OS_NPC = 0x01000000;
59 60
60 public const int CONTROL_FWD = 1; 61 public const int CONTROL_FWD = 1;
61 public const int CONTROL_BACK = 2; 62 public const int CONTROL_BACK = 2;