diff options
author | Melanie | 2012-07-23 18:54:12 +0100 |
---|---|---|
committer | Melanie | 2012-07-23 18:54:12 +0100 |
commit | fb8e92c90b8bde44831a06d4a7adae64f181b5aa (patch) | |
tree | fdbb76f70f8016e685b616b51a90f7b1ef21427b /OpenSim/Region/ScriptEngine | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Update BulletSim DLLs and SOs (diff) | |
download | opensim-SC_OLD-fb8e92c90b8bde44831a06d4a7adae64f181b5aa.zip opensim-SC_OLD-fb8e92c90b8bde44831a06d4a7adae64f181b5aa.tar.gz opensim-SC_OLD-fb8e92c90b8bde44831a06d4a7adae64f181b5aa.tar.bz2 opensim-SC_OLD-fb8e92c90b8bde44831a06d4a7adae64f181b5aa.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/ScriptEngine/Shared/Helpers.cs
prebuild.xml
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
3 files changed, 34 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 19f3ce1..f7314da 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 | } |
@@ -484,7 +485,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
484 | // "[SENSOR REPEAT]: Inspecting scene presence {0}, type {1} on sensor sweep for {2}, type {3}", | 485 | // "[SENSOR REPEAT]: Inspecting scene presence {0}, type {1} on sensor sweep for {2}, type {3}", |
485 | // presence.Name, presence.PresenceType, ts.name, ts.type); | 486 | // presence.Name, presence.PresenceType, ts.name, ts.type); |
486 | 487 | ||
487 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) | 488 | if ((ts.type & NPC) == 0 && (ts.type & OS_NPC) == 0 && presence.PresenceType == PresenceType.Npc) |
488 | { | 489 | { |
489 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | 490 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); |
490 | if (npcData == null || !npcData.SenseAsAgent) | 491 | 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 a08cc42..5669917 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; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs index 5c9d30f..9e5fb24 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Helpers.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Helpers.cs | |||
@@ -36,6 +36,7 @@ using OpenSim.Framework; | |||
36 | using OpenSim.Region.CoreModules; | 36 | using OpenSim.Region.CoreModules; |
37 | using OpenSim.Region.Framework.Scenes; | 37 | using OpenSim.Region.Framework.Scenes; |
38 | using OpenSim.Services.Interfaces; | 38 | using OpenSim.Services.Interfaces; |
39 | using OpenSim.Region.Framework.Interfaces; | ||
39 | 40 | ||
40 | namespace OpenSim.Region.ScriptEngine.Shared | 41 | namespace OpenSim.Region.ScriptEngine.Shared |
41 | { | 42 | { |
@@ -83,6 +84,12 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
83 | 84 | ||
84 | public class DetectParams | 85 | public class DetectParams |
85 | { | 86 | { |
87 | public const int AGENT = 1; | ||
88 | public const int ACTIVE = 2; | ||
89 | public const int PASSIVE = 4; | ||
90 | public const int SCRIPTED = 8; | ||
91 | public const int OS_NPC = 0x01000000; | ||
92 | |||
86 | public DetectParams() | 93 | public DetectParams() |
87 | { | 94 | { |
88 | Key = UUID.Zero; | 95 | Key = UUID.Zero; |
@@ -199,8 +206,27 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
199 | Type = 0x01; // Avatar | 206 | Type = 0x01; // Avatar |
200 | if (presence.PresenceType == PresenceType.Npc) | 207 | if (presence.PresenceType == PresenceType.Npc) |
201 | Type = 0x20; | 208 | Type = 0x20; |
209 | |||
210 | // Cope Impl. We don't use OS_NPC. | ||
211 | //if (presence.PresenceType != PresenceType.Npc) | ||
212 | //{ | ||
213 | // Type = AGENT; | ||
214 | //} | ||
215 | //else | ||
216 | //{ | ||
217 | // Type = OS_NPC; | ||
218 | |||
219 | // INPCModule npcModule = scene.RequestModuleInterface<INPCModule>(); | ||
220 | // INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | ||
221 | |||
222 | // if (npcData.SenseAsAgent) | ||
223 | // { | ||
224 | // Type |= AGENT; | ||
225 | // } | ||
226 | //} | ||
227 | |||
202 | if (presence.Velocity != Vector3.Zero) | 228 | if (presence.Velocity != Vector3.Zero) |
203 | Type |= 0x02; // Active | 229 | Type |= ACTIVE; |
204 | 230 | ||
205 | Group = presence.ControllingClient.ActiveGroupId; | 231 | Group = presence.ControllingClient.ActiveGroupId; |
206 | 232 | ||
@@ -215,15 +241,15 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
215 | Name = part.Name; | 241 | Name = part.Name; |
216 | Owner = part.OwnerID; | 242 | Owner = part.OwnerID; |
217 | if (part.Velocity == Vector3.Zero) | 243 | if (part.Velocity == Vector3.Zero) |
218 | Type = 0x04; // Passive | 244 | Type = PASSIVE; |
219 | else | 245 | else |
220 | Type = 0x02; // Passive | 246 | Type = ACTIVE; |
221 | 247 | ||
222 | foreach (SceneObjectPart p in part.ParentGroup.Parts) | 248 | foreach (SceneObjectPart p in part.ParentGroup.Parts) |
223 | { | 249 | { |
224 | if (p.Inventory.ContainsScripts()) | 250 | if (p.Inventory.ContainsScripts()) |
225 | { | 251 | { |
226 | Type |= 0x08; // Scripted | 252 | Type |= SCRIPTED; // Scripted |
227 | break; | 253 | break; |
228 | } | 254 | } |
229 | } | 255 | } |