From 2d3072f053f172a1c75c98151a960b951a7a20b1 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Fri, 12 Sep 2014 23:37:44 +0100 Subject: [PATCH] When osNpcMoveToTarget() is called for a sitting avatar then silently do nothing rather than throwing an error. Resolves http://opensimulator.org/mantis/view.php?id=7311 --- OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs index 03c6265fec..95e59ab38e 100644 --- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs +++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs @@ -234,6 +234,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC ScenePresence sp; if (scene.TryGetScenePresence(agentID, out sp)) { + if (sp.IsSatOnObject || sp.SitGround) + return false; + // m_log.DebugFormat( // "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", // sp.Name, pos, scene.RegionInfo.RegionName,