Esempio n. 1
0
        /*
         * David, I don't think we need this at all. When we do the snapshot, we can
         * simply look into the parcels that are marked for ShowDirectory -- see
         * conditional in RequestSnapshotData
         *
         * //Revise this, look for more direct way of checking for change in land
         #region Client hooks
         *
         * public void OnNewClient(IClientAPI client)
         * {
         *  //Land hooks
         *  client.OnParcelDivideRequest += ParcelSplitHook;
         *  client.OnParcelJoinRequest += ParcelSplitHook;
         *  client.OnParcelPropertiesUpdateRequest += ParcelPropsHook;
         * }
         *
         * public void ParcelSplitHook(int west, int south, int east, int north, IClientAPI remote_client)
         * {
         *  PrepareData();
         * }
         *
         * public void ParcelPropsHook(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client)
         * {
         *  PrepareData();
         * }
         *
         #endregion
         *
         * public void PrepareData()
         * {
         *  m_log.Info("[EXTERNALDATA]: Generating land data.");
         *
         *  m_landIndexed.Clear();
         *
         *  //Index sim land
         *  foreach (KeyValuePair<int, Land> curLand in m_scene.LandManager.landList)
         *  {
         *      //if ((curLand.Value.LandData.landFlags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)
         *      //{
         *          m_landIndexed.Add(curLand.Key, curLand.Value.Copy());
         *      //}
         *  }
         * }
         *
         * public Dictionary<int,Land> IndexedLand {
         *  get { return m_landIndexed; }
         * }
         */

        #endregion

        #region IDataSnapshotProvider members

        public void Initialize(Scene scene, DataSnapshotManager parent)
        {
            m_scene  = scene;
            m_parent = parent;

            //Brought back from the dead for staleness checks.
            m_scene.EventManager.OnNewClient += OnNewClient;
        }
Esempio n. 2
0
        public void Initialize(Scene scene, DataSnapshotManager parent)
        {
            m_scene = scene;
            // m_parent = parent;

            //To check for staleness, we must catch all incoming client packets.
            m_scene.EventManager.OnNewClient          += OnNewClient;
            m_scene.EventManager.OnParcelPrimCountAdd += delegate(SceneObjectGroup obj) { this.Stale = true; };
        }
Esempio n. 3
0
        public void Initialize(Scene scene, DataSnapshotManager parent)
        {
            m_scene = scene;
            // m_parent = parent;

            //To check for staleness, we must catch all incoming client packets.
            m_scene.EventManager.OnNewClient += OnNewClient;
            m_scene.EventManager.OnParcelPrimCountAdd += delegate(SceneObjectGroup obj) { this.Stale = true; };
        }
        public void Initialize(Scene scene, DataSnapshotManager parent)
        {
            m_scene = scene;
            // m_parent = parent;

            //To check for staleness, we must catch all incoming client packets.
            m_scene.EventManager.OnNewClient   += OnNewClient;
            scene.EventManager.OnClosingClient += OnClosingClient;
        }
Esempio n. 5
0
        /*
         * David, I don't think we need this at all. When we do the snapshot, we can
         * simply look into the parcels that are marked for ShowDirectory -- see
         * conditional in RequestSnapshotData
         *
        //Revise this, look for more direct way of checking for change in land
        #region Client hooks

        public void OnNewClient(IClientAPI client)
        {
            //Land hooks
            client.OnParcelDivideRequest += ParcelSplitHook;
            client.OnParcelJoinRequest += ParcelSplitHook;
            client.OnParcelPropertiesUpdateRequest += ParcelPropsHook;
        }

        public void ParcelSplitHook(int west, int south, int east, int north, IClientAPI remote_client)
        {
            PrepareData();
        }

        public void ParcelPropsHook(ParcelPropertiesUpdatePacket packet, IClientAPI remote_client)
        {
            PrepareData();
        }

        #endregion

        public void PrepareData()
        {
            m_log.Info("[EXTERNALDATA]: Generating land data.");

            m_landIndexed.Clear();

            //Index sim land
            foreach (KeyValuePair<int, Land> curLand in m_scene.LandManager.landList)
            {
                //if ((curLand.Value.LandData.landFlags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)
                //{
                    m_landIndexed.Add(curLand.Key, curLand.Value.Copy());
                //}
            }
        }

        public Dictionary<int,Land> IndexedLand {
            get { return m_landIndexed; }
        }
        */

        #endregion

        #region IDataSnapshotProvider members

        public void Initialize(Scene scene, DataSnapshotManager parent)
        {
            m_scene = scene;
            m_parent = parent;

            //Brought back from the dead for staleness checks.
            m_scene.EventManager.OnNewClient += OnNewClient;
        }
 public void Initialize(Scene scene, DataSnapshotManager parent)
 {
     m_scene = scene;
     // m_parent = parent;
 }
Esempio n. 7
0
 public void Initialize(Scene scene, DataSnapshotManager parent)
 {
     m_scene = scene;
     // m_parent = parent;
 }
        public void Initialize(IScene scene, DataSnapshotManager parent)
        {
            m_scene = scene;
            // m_parent = parent;

            //To check for staleness, we must catch all incoming client packets.
            m_scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnClosingClient += OnClosingClient;
        }