diff options
author | Melanie | 2012-02-10 23:59:10 +0000 |
---|---|---|
committer | Melanie | 2012-02-10 23:59:10 +0000 |
commit | acfe7e555e41b84ede44db1978dcd23434be580d (patch) | |
tree | 4e5ca15b8661371ca397a7f73803b289d9e0faa5 /OpenSim/Region/ScriptEngine | |
parent | Change parser to leave embedded quotes alone if the pattern is recognized (diff) | |
parent | Change parser to leave embedded quotes alone if the pattern is recognized (diff) | |
download | opensim-SC-acfe7e555e41b84ede44db1978dcd23434be580d.zip opensim-SC-acfe7e555e41b84ede44db1978dcd23434be580d.tar.gz opensim-SC-acfe7e555e41b84ede44db1978dcd23434be580d.tar.bz2 opensim-SC-acfe7e555e41b84ede44db1978dcd23434be580d.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 2a0ce44..5c200d6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -450,17 +450,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
450 | Vector3 toRegionPos; | 450 | Vector3 toRegionPos; |
451 | double dis; | 451 | double dis; |
452 | 452 | ||
453 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) | 453 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => |
454 | { | 454 | { |
455 | if ((ts.type & NPC) == 0 | 455 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) |
456 | && presence.PresenceType == PresenceType.Npc | 456 | { |
457 | && !npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent) | 457 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); |
458 | return; | 458 | if (npcData == null || !npcData.SenseAsAgent) |
459 | return; | ||
460 | } | ||
459 | 461 | ||
460 | if ((ts.type & AGENT) == 0 | 462 | if ((ts.type & AGENT) == 0) |
461 | && (presence.PresenceType == PresenceType.User | 463 | { |
462 | || npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent)) | 464 | if (presence.PresenceType == PresenceType.User) |
463 | return; | 465 | { |
466 | return; | ||
467 | } | ||
468 | else | ||
469 | { | ||
470 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | ||
471 | if (npcData != null && npcData.SenseAsAgent) | ||
472 | return; | ||
473 | } | ||
474 | } | ||
464 | 475 | ||
465 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) | 476 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) |
466 | return; | 477 | return; |