public void DestroyAgent(LSAgent agent)
 {
     agent.Deactivate();
     CachedAgents[(int)agent.MyAgentCode].Add(agent);
     OpenLocalIDs.Add(agent.LocalID);
     AgentActive[agent.LocalID] = false;
 }
        public static void DestroyAgent(LSAgent agent, bool Immediate = false)
        {
            agent.Deactivate(Immediate);

            ushort agentCodeID = AgentController.GetAgentCodeIndex(agent.MyAgentCode);

            TypeAgentsActive[agentCodeID][agent.TypeIndex] = false;

            ChangeController(agent, null);
        }
        public static void DestroyAgent(LSAgent agent, bool Immediate = false)
        {
            GlobalAgentActive[agent.GlobalID] = false;

            AgentController leController = agent.Controller;

            leController.LocalAgentActive[agent.LocalID] = false;
            leController.OpenLocalIDs.Add(agent.LocalID);
            OpenGlobalIDs.Add(agent.GlobalID);

            agent.Deactivate(Immediate);
        }
        private static void DestroyAgentBuffer(DeactivationData data)
        {
            LSAgent agent = data.Agent;

            if (agent.IsActive == false)
            {
                return;
            }
            bool immediate = data.Immediate;

            agent.Deactivate(immediate);

            ushort agentCodeID = AgentController.GetAgentCodeIndex(agent.MyAgentCode);

            TypeAgentsActive [agentCodeID] [agent.TypeIndex] = false;

            ChangeController(agent, null);
        }
        private static void DestroyAgentBuffer(DeactivationData data)
        {
            LSAgent agent = data.Agent;

            if (agent.IsActive == false)
            {
                return;
            }
            bool immediate = data.Immediate;

            agent.Deactivate(immediate);
            ChangeController(agent, null);

            //Pool if the agent is registered
            ushort agentCodeID;

            if (agent.TypeIndex != UNREGISTERED_TYPE_INDEX)
            {
                if (CodeIndexMap.TryGetValue(agent.MyAgentCode, out agentCodeID))
                {
                    TypeAgentsActive [agentCodeID] [agent.TypeIndex] = false;
                }
            }
        }
 public void DestroyAgent(LSAgent agent)
 {
     agent.Deactivate ();
     CachedAgents[(int)agent.MyAgentCode].Add (agent);
     OpenLocalIDs.Add (agent.LocalID);
     AgentActive[agent.LocalID] = false;
 }
        public static void DestroyAgent(LSAgent agent, bool Immediate = false)
        {
            GlobalAgentActive[agent.GlobalID]  = false;

            AgentController leController = agent.Controller;
            leController.LocalAgentActive[agent.LocalID] = false;
            leController.OpenLocalIDs.Add(agent.LocalID);
            OpenGlobalIDs.Add (agent.GlobalID);

            agent.Deactivate(Immediate);
        }