diff options
author | Justin Clark-Casey (justincc) | 2012-02-13 20:48:50 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-02-13 20:48:50 +0000 |
commit | 21393af631c743f0ee0094a20a9fa9f2aeb2e500 (patch) | |
tree | dd74990b038ca912b6a0fe42a8a3305f9e51c7f2 /OpenSim/Region/ScriptEngine/Shared | |
parent | On object deserialization, go back to logging errors at DEBUG level rather th... (diff) | |
parent | correct the default avatar_terminal_velocity value that I accidentally left i... (diff) | |
download | opensim-SC-21393af631c743f0ee0094a20a9fa9f2aeb2e500.zip opensim-SC-21393af631c743f0ee0094a20a9fa9f2aeb2e500.tar.gz opensim-SC-21393af631c743f0ee0094a20a9fa9f2aeb2e500.tar.bz2 opensim-SC-21393af631c743f0ee0094a20a9fa9f2aeb2e500.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-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 3e0e452..850f50b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -445,17 +445,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
445 | Vector3 toRegionPos; | 445 | Vector3 toRegionPos; |
446 | double dis; | 446 | double dis; |
447 | 447 | ||
448 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) | 448 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => |
449 | { | 449 | { |
450 | if ((ts.type & NPC) == 0 | 450 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) |
451 | && presence.PresenceType == PresenceType.Npc | 451 | { |
452 | && !npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent) | 452 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); |
453 | return; | 453 | if (npcData == null || !npcData.SenseAsAgent) |
454 | return; | ||
455 | } | ||
454 | 456 | ||
455 | if ((ts.type & AGENT) == 0 | 457 | if ((ts.type & AGENT) == 0) |
456 | && (presence.PresenceType == PresenceType.User | 458 | { |
457 | || npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent)) | 459 | if (presence.PresenceType == PresenceType.User) |
458 | return; | 460 | { |
461 | return; | ||
462 | } | ||
463 | else | ||
464 | { | ||
465 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | ||
466 | if (npcData != null && npcData.SenseAsAgent) | ||
467 | return; | ||
468 | } | ||
469 | } | ||
459 | 470 | ||
460 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) | 471 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) |
461 | return; | 472 | return; |