示例#1
0
        public bool UpdateAgent(GridRegion destination, AgentPosition cAgentData)
        {
            if (destination == null)
            {
                return(false);
            }

            bool retVal = false;

            foreach (IScene s in m_sceneList)
            {
                //MainConsole.Instance.Debug("[LOCAL COMMS]: Found region to send ChildAgentUpdate");
                IEntityTransferModule transferModule = s.RequestModuleInterface <IEntityTransferModule>();
                if (transferModule != null)
                {
                    if (retVal)
                    {
                        transferModule.IncomingChildAgentDataUpdate(s, cAgentData);
                    }
                    else
                    {
                        retVal = transferModule.IncomingChildAgentDataUpdate(s, cAgentData);
                    }
                }
            }
            //MainConsole.Instance.Debug("[LOCAL COMMS]: region not found for ChildAgentUpdate");
            return(retVal);
        }
示例#2
0
        public bool UpdateAgent(GridRegion destination, AgentData cAgentData)
        {
            if (destination == null || m_sceneList.Count == 0 || cAgentData == null)
            {
                return(false);
            }

            bool retVal = false;
            IEntityTransferModule transferModule = m_sceneList[0].RequestModuleInterface <IEntityTransferModule>();

            if (transferModule != null)
            {
#if (!ISWIN)
                foreach (IScene s in m_sceneList)
                {
                    if (destination.RegionID == s.RegionInfo.RegionID)
                    {
                        retVal = transferModule.IncomingChildAgentDataUpdate(s, cAgentData);
                    }
                }
#else
                foreach (IScene s in m_sceneList.Where(s => destination.RegionID == s.RegionInfo.RegionID))
                {
                    retVal = transferModule.IncomingChildAgentDataUpdate(s, cAgentData);
                }
#endif
            }

            //            MainConsole.Instance.DebugFormat("[LOCAL COMMS]: Did not find region {0} for ChildAgentUpdate", regionHandle);
            return(retVal);
        }
        public bool UpdateAgent(GridRegion destination, AgentPosition agentData)
        {
            if (Scene == null || destination == null)
            {
                return(false);
            }

            //MainConsole.Instance.Debug("[LOCAL COMMS]: Found region to send ChildAgentUpdate");
            IEntityTransferModule transferModule = Scene.RequestModuleInterface <IEntityTransferModule>();

            if (transferModule != null)
            {
                return(transferModule.IncomingChildAgentDataUpdate(Scene, agentData));
            }

            return(false);
        }
        public bool UpdateAgent(GridRegion destination, AgentData agentData)
        {
            if (destination == null || Scene == null || agentData == null)
            {
                return(false);
            }

            bool retVal = false;
            IEntityTransferModule transferModule = Scene.RequestModuleInterface <IEntityTransferModule>();

            if (transferModule != null)
            {
                retVal = transferModule.IncomingChildAgentDataUpdate(Scene, agentData);
            }

            //            MainConsole.Instance.DebugFormat("[LOCAL COMMS]: Did not find region {0} for ChildAgentUpdate", regionHandle);
            return(retVal);
        }