diff options
author | Justin Clark-Casey (justincc) | 2012-07-20 21:08:04 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-07-20 21:08:04 +0100 |
commit | bcfc392edfb09adbd1cfb21843f2505d9a2adb57 (patch) | |
tree | 105aa10257a940c36c76d7f5d1f7fb3f05a88e85 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |
parent | Enables support for UUIDs to be returned in lists from (diff) | |
download | opensim-SC_OLD-bcfc392edfb09adbd1cfb21843f2505d9a2adb57.zip opensim-SC_OLD-bcfc392edfb09adbd1cfb21843f2505d9a2adb57.tar.gz opensim-SC_OLD-bcfc392edfb09adbd1cfb21843f2505d9a2adb57.tar.bz2 opensim-SC_OLD-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.cs | 5 |
1 files changed, 3 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) |