IncomingCloseAgent() публичный Метод

Tell a single agent to disconnect from the region.
public IncomingCloseAgent ( UUID agentID ) : bool
agentID UUID
Результат bool
Пример #1
0
        public bool DeleteNPC(UUID agentID, Scene scene)
        {
            lock (m_avatars)
            {
                NPCAvatar av;
                if (m_avatars.TryGetValue(agentID, out av))
                {
                    /*
                    m_log.DebugFormat("[NPC MODULE]: Found {0} {1} to remove",
                            agentID, av.Name);
                    */

                    scene.IncomingCloseAgent(agentID, false);
//                    scene.RemoveClient(agentID, false);
                    m_avatars.Remove(agentID);
                    /*
                    m_log.DebugFormat("[NPC MODULE]: Removed NPC {0} {1}",
                            agentID, av.Name);
                    */
                    return true;
                }
            }
            /*
            m_log.DebugFormat("[NPC MODULE]: Could not find {0} to remove",
                    agentID);
            */
            return false;
        }
Пример #2
0
 public void DeleteNPC(UUID agentID, Scene scene)
 {
     lock (m_avatars)
     {
         if (m_avatars.ContainsKey(agentID))
         {
             scene.IncomingCloseAgent(agentID);
             m_avatars.Remove(agentID);
         }
     }
 }