Beispiel #1
0
        protected virtual List<MapBlockData> GetAndSendBlocks(IClientAPI remoteClient, int minX, int minY, int maxX, int maxY, uint flag)
        {
            MapBlockRequestData req = new MapBlockRequestData();

            req.client = remoteClient;
            req.minX = minX;
            req.maxX = maxX;
            req.minY = minY;
            req.maxY = maxY;
            req.flags = flag;

            lock (m_mapBlockRequestEvent)
            {
                if (!m_mapBlockRequests.ContainsKey(remoteClient.AgentId))
                    m_mapBlockRequests[remoteClient.AgentId] = new Queue<MapBlockRequestData>();
                m_mapBlockRequests[remoteClient.AgentId].Enqueue(req);
                m_mapBlockRequestEvent.Set();
            }

            return new List<MapBlockData>();
        }