diff options
author | BlueWall | 2012-02-10 16:28:11 -0500 |
---|---|---|
committer | BlueWall | 2012-02-10 16:28:11 -0500 |
commit | ee078f717a27b99ae699dd46da0e9f054b0787b1 (patch) | |
tree | a5e2541a383ebf56ff22d0f81a814b171080b5f5 /OpenSim/Region | |
parent | Merge branch 'master' of /home/opensim/var/repo/opensim (diff) | |
parent | Fix an npc delete race condition with LSL sensors where an initial presence c... (diff) | |
download | opensim-SC-ee078f717a27b99ae699dd46da0e9f054b0787b1.zip opensim-SC-ee078f717a27b99ae699dd46da0e9f054b0787b1.tar.gz opensim-SC-ee078f717a27b99ae699dd46da0e9f054b0787b1.tar.bz2 opensim-SC-ee078f717a27b99ae699dd46da0e9f054b0787b1.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-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; |