Пример #1
0
        public void WindlightRefresh(int interpolate, bool forRegion = true)
        {
            List <byte[]> ls = null;

            m_scene.ForEachRootScenePresence(delegate(ScenePresence sp)
            {
                if (sp.IsInTransit || sp.IsNPC)
                {
                    return;
                }

                IClientAPI client = sp.ControllingClient;

                if (!client.IsActive)
                {
                    return;
                }

                uint vflags = client.GetViewerCaps();

                if ((vflags & 0x8000) != 0)
                {
                    if (forRegion)
                    {
                        m_estateModule.HandleRegionInfoRequest(client);
                    }
                }
                else if ((vflags & 0x4000) != 0)
                {
                    m_eventQueue.WindlightRefreshEvent(interpolate, client.AgentId);
                }

                else
                {
                    if (ls == null)
                    {
                        ls = MakeLightShareData();
                    }
                    SendLightShare(client, ls);
                }
            });
        }