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
ghosts
Justin Clark-Casey (justincc) 2014-09-12 23:37:44 +01:00
parent 7ff27e32bc
commit 95aade7fdb
1 changed files with 3 additions and 0 deletions

View File

@ -234,6 +234,9 @@ namespace OpenSim.Region.OptionalModules.World.NPC
ScenePresence sp; ScenePresence sp;
if (scene.TryGetScenePresence(agentID, out sp)) if (scene.TryGetScenePresence(agentID, out sp))
{ {
if (sp.IsSatOnObject || sp.SitGround)
return false;
// m_log.DebugFormat( // m_log.DebugFormat(
// "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}", // "[NPC MODULE]: Moving {0} to {1} in {2}, noFly {3}, landAtTarget {4}",
// sp.Name, pos, scene.RegionInfo.RegionName, // sp.Name, pos, scene.RegionInfo.RegionName,