Пример #1
0
 public override bool HandleIn(RegionSyncModule pRegionContext)
 {
     if (base.HandleIn(pRegionContext))
     {
     m_log.DebugFormat("{0} SyncMsgChatBroadcast: {1} : {2}", LogHeader, ChatMessage.From, ChatMessage.Message);
     pRegionContext.RememberLocallyGeneratedEvent(MsgType.ChatBroadcast, ChatMessage);
     pRegionContext.Scene.EventManager.TriggerOnChatBroadcast(ChatMessage.SenderObject, ChatMessage);
     pRegionContext.ForgetLocallyGeneratedEvent();
     }
     return true;
 }
Пример #2
0
 public override bool HandleIn(RegionSyncModule pRegionContext)
 {
     if (base.HandleIn(pRegionContext))
     {
     m_log.DebugFormat("{0} SyncMsgChatFromWorld: {1} : {2}", LogHeader, ChatMessage.From, ChatMessage.Message);
     pRegionContext.RememberLocallyGeneratedEvent(MsgType.ChatFromWorld, ChatMessage);
     // Let ChatModule get the event and deliver it to avatars
     pRegionContext.Scene.EventManager.TriggerOnChatFromWorld(ChatMessage.SenderObject, ChatMessage);
     pRegionContext.ForgetLocallyGeneratedEvent();
     }
     return true;
 }
Пример #3
0
        public override bool HandleIn(RegionSyncModule pRegionContext)
        {
            if (base.HandleIn(pRegionContext))
            {
            ArrayList errors = new ArrayList();
            if (PrimID != UUID.Zero)
            {
                SceneObjectPart sop = pRegionContext.Scene.GetSceneObjectPart(PrimID);
                if (sop != null)
                {
                    TaskInventoryItem taskItem = sop.Inventory.GetInventoryItem(ItemID);
                    taskItem.AssetID = AssetID;
                    sop.ParentGroup.UpdateInventoryItem(taskItem);
                    if (IsRunning)
                    {
                        // Scripts are recreated when edited so replace the new script inventory item
                        sop.Inventory.RemoveScriptInstance(ItemID, false);
                        sop.Inventory.CreateScriptInstance(ItemID, 0, false, pRegionContext.Scene.DefaultScriptEngine, 0);
                        errors = sop.Inventory.GetScriptErrors(ItemID);
                    }
                    sop.ParentGroup.ResumeScripts();
                    if (errors.Count > 0)
                    {
                        m_log.ErrorFormat("{0} Script errors detected. TODO: Send errors back to actor that created script", LogHeader);
                    }

                    //trigger the event in the local scene
                    pRegionContext.RememberLocallyGeneratedEvent(MsgType.UpdateScript, AgentID, ItemID, PrimID, IsRunning, AssetID);
                    pRegionContext.Scene.EventManager.TriggerUpdateScript(AgentID, ItemID, PrimID, IsRunning, AssetID);
                    pRegionContext.ForgetLocallyGeneratedEvent();
                }
            }
            }
            return true;
        }
Пример #4
0
        public override bool HandleIn(RegionSyncModule pRegionContext)
        {
            if (base.HandleIn(pRegionContext))
            {
            SceneObjectPart part = pRegionContext.Scene.GetSceneObjectPart(PrimID);
            if (part == null)
            {
                m_log.WarnFormat("{0} HandleRemoteEvent_OnAttach: no part with UUID {1} found", LogHeader, PrimID);
                return false;
            }

            uint localID = part.LocalId;
            pRegionContext.RememberLocallyGeneratedEvent(MsgType.Attach, localID, ItemID, AvatarID);
            pRegionContext.Scene.EventManager.TriggerOnAttach(localID, ItemID, AvatarID);
            pRegionContext.ForgetLocallyGeneratedEvent();
            }
            return true;
        }
Пример #5
0
        public override bool HandleIn(RegionSyncModule pRegionContext)
        {
            if (base.HandleIn(pRegionContext))
            {
            if (SyncedProperties != null && SyncedProperties.Count > 0)
            {
                // Update local sync info and scene object/presence
                pRegionContext.RememberLocallyGeneratedEvent(MType);
                HashSet<SyncableProperties.Type> propertiesUpdated = pRegionContext.InfoManager.UpdateSyncInfoBySync(Uuid, SyncedProperties);
                if (propertiesUpdated.Contains(RegionSync.SyncableProperties.Type.AvatarAppearance))
                    m_log.DebugFormat("{0} SyncMsgUpdatedProperties:HandleIn AvatarAppearance for uuid {1}", LogHeader, Uuid);
                pRegionContext.ForgetLocallyGeneratedEvent();

                // Do our own detail logging after we know which properties are actually updated (in propertiesUpdated)
                pRegionContext.DetailedUpdateLogging(Uuid, propertiesUpdated, "RecUpdateN", ConnectorContext.otherSideActorID, DataLength);

                // Relay the update properties
                if (pRegionContext.IsSyncRelay)
                    pRegionContext.EnqueueUpdatedProperty(Uuid, propertiesUpdated);
            }
            }
            return true;
        }
Пример #6
0
 public override bool HandleIn(RegionSyncModule pRegionContext)
 {
     if (base.HandleIn(pRegionContext))
     {
     SceneObjectPart part = pRegionContext.Scene.GetSceneObjectPart(PrimID);
     if (part == null || part.ParentGroup.IsDeleted)
     {
         m_log.ErrorFormat("{0}: part {1} does not exist, or is deleted", LogHeader, PrimID);
         return false;
     }
     pRegionContext.RememberLocallyGeneratedEvent(MsgType.ScriptReset, part.LocalId, ItemID);
     pRegionContext.Scene.EventManager.TriggerScriptReset(part.LocalId, ItemID);
     pRegionContext.ForgetLocallyGeneratedEvent();
     }
     return false;
 }
Пример #7
0
        public override bool HandleIn(RegionSyncModule pRegionContext)
        {
            if (base.HandleIn(pRegionContext))
            {
            ColliderArgs CollidingMessage = new ColliderArgs();
            CollidingMessage.Colliders = Colliders;

            // m_log.DebugFormat("ScriptLandCollidingStart received for {0}", CollideeID);
            pRegionContext.RememberLocallyGeneratedEvent(MType, CollideeID, CollidingMessage);
            pRegionContext.Scene.EventManager.TriggerScriptLandCollidingStart(CollideeID, CollidingMessage);
            pRegionContext.ForgetLocallyGeneratedEvent();
            }
            return true;
        }
Пример #8
0
 public override bool HandleIn(RegionSyncModule pRegionContext)
 {
     bool ret = base.HandleIn(pRegionContext);
     if (ret)
     {
     pRegionContext.RememberLocallyGeneratedEvent(MsgType.ObjectGrabbing, SOP.LocalId, OriginalID, OffsetPos, SP.ControllingClient, SurfaceArgs);
     pRegionContext.Scene.EventManager.TriggerObjectGrabbing(SOP.LocalId, OriginalID, OffsetPos, SP.ControllingClient, SurfaceArgs);
     pRegionContext.ForgetLocallyGeneratedEvent();
     }
     return ret;
 }
Пример #9
0
        public override bool HandleIn(RegionSyncModule pRegionContext)
        {
            if (base.HandleIn(pRegionContext))
            {
            SceneObjectPart localPart = pRegionContext.Scene.GetSceneObjectPart(Uuid);

            if (localPart == null || localPart.ParentGroup.IsDeleted)
            {
                m_log.ErrorFormat("{0}: HandleRemoteEvent_OnNewScript: prim {1} no longer in local SceneGraph", LogHeader, Uuid);
                return false;
            }

            if (UpdatedProperties.Count > 0)
            {
                HashSet<SyncableProperties.Type> propertiesUpdated = pRegionContext.InfoManager.UpdateSyncInfoBySync(Uuid, UpdatedProperties);
            }

            //The TaskInventory value might have already been sync'ed by UpdatedPrimProperties,
            //but we still need to create the script instance by reading out the inventory.
            pRegionContext.RememberLocallyGeneratedEvent(MsgType.NewScript, AgentID, localPart, ItemID);
            pRegionContext.Scene.EventManager.TriggerNewScript(AgentID, localPart, ItemID);
            pRegionContext.ForgetLocallyGeneratedEvent();
            }
            return true;
        }