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

0.9.0-post-fixes
UbitUmarov 2017-06-26 20:51:16 +01:00
parent e53f439981
commit b319977a3f
1 changed files with 2 additions and 1 deletions

View File

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