Пример #1
0
        public override bool HandleIn(RegionSyncModule pRegionContext)
        {
            if (base.HandleIn(pRegionContext))
            {
            // if this is a relay node, forward the message
            if (pRegionContext.IsSyncRelay)
            {
                List<SceneObjectGroup> tempBeforeDelinkGroups = new List<SceneObjectGroup>();
                foreach (UUID sogID in BeforeDelinkGroupIDs)
                {
                    SceneObjectGroup sog = pRegionContext.Scene.GetGroupByPrim(sogID);
                    tempBeforeDelinkGroups.Add(sog);
                }
                pRegionContext.SendDelinkObjectToRelevantSyncConnectors(ConnectorContext.otherSideActorID, tempBeforeDelinkGroups, this);
            }

            //DSL Scene.DelinkObjectsBySync(delinkPrimIDs, beforeDelinkGroupIDs, incomingAfterDelinkGroups);

            //Sync properties
            //Update properties, for each prim in each deLinked-Object
            foreach (Dictionary<UUID, SyncInfoBase> primsSyncInfo in PrimSyncInfo)
            {
                foreach (KeyValuePair<UUID, SyncInfoBase> inPrimSyncInfo in primsSyncInfo)
                {
                    UUID uuid = inPrimSyncInfo.Key;
                    SyncInfoBase updatedPrimSyncInfo = inPrimSyncInfo.Value;

                    SceneObjectPart part = pRegionContext.Scene.GetSceneObjectPart(uuid);
                    if (part == null)
                    {
                        m_log.ErrorFormat("{0}: HandleSyncDelinkObject, prim {1} not in local Scene Graph after DelinkObjectsBySync is called", LogHeader, uuid);
                    }
                    else
                    {
                        pRegionContext.InfoManager.UpdateSyncInfoBySync(part.UUID, updatedPrimSyncInfo);
                    }
                }
            }
            }
            return true;
        }