dont list deleted ones, that still don't know they are gone

0.9.0-post-fixes
UbitUmarov 2017-06-26 20:55:44 +01:00
parent b319977a3f
commit 5242853d68
1 changed files with 2 additions and 2 deletions

View File

@ -3824,7 +3824,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
LSL_List result = new LSL_List();
World.ForEachRootScenePresence(delegate (ScenePresence avatar)
{
if (avatar != null && avatar.UUID != m_host.OwnerID)
if (avatar != null && !avatar.IsDeleted && avatar.UUID != m_host.OwnerID )
{
result.Add(new LSL_String(avatar.UUID.ToString()));
result.Add(new LSL_Vector(avatar.AbsolutePosition));
@ -3844,7 +3844,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
World.ForEachRootScenePresence(delegate (ScenePresence avatar)
{
// npcs are not childagents but that is now.
if (avatar != null && avatar.IsNPC && !avatar.IsDeleted && !avatar.IsChildAgent)
if (avatar != null && avatar.IsNPC && !avatar.IsDeleted && !avatar.IsChildAgent && !avatar.IsInTransit)
{
result.Add(new LSL_String(avatar.UUID.ToString()));
result.Add(new LSL_Vector(avatar.AbsolutePosition));