From 0baaa23bde53bf47f4c8155c5927681bc6f3a5fc Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 21 Aug 2016 20:00:27 +0100 Subject: remove sceneGraph MoveObject and make it part of ProcessObjectGrabUpdate ( scene.PacketHandlers) where it belongs --- .../Region/Framework/Scenes/Scene.PacketHandlers.cs | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index c49edd1..fc90d60 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -377,8 +377,21 @@ namespace OpenSim.Region.Framework.Scenes if (part == null) return; - SceneObjectGroup obj = part.ParentGroup; + SceneObjectGroup group = part.ParentGroup; + if(group == null || group.IsDeleted) + return; + + if (Permissions.CanMoveObject(group.UUID, remoteClient.AgentId))// && PermissionsMngr.) + { + group.GrabMovement(objectID, offset, pos, remoteClient); + } + // This is outside the above permissions condition + // so that if the object is locked the client moving the object + // get's it's position on the simulator even if it was the same as before + // This keeps the moving user's client in sync with the rest of the world. + group.SendGroupTerseUpdate(); + SurfaceTouchEventArgs surfaceArg = null; if (surfaceArgs != null && surfaceArgs.Count > 0) surfaceArg = surfaceArgs[0]; @@ -391,9 +404,9 @@ namespace OpenSim.Region.Framework.Scenes // or if we're meant to pass on touches anyway. Don't send to root prim // if prim touched is the root prim as we just did it if (((part.ScriptEvents & scriptEvents.touch) == 0) || - (part.PassTouches && (part.LocalId != obj.RootPart.LocalId))) + (part.PassTouches && (part.LocalId != group.RootPart.LocalId))) { - EventManager.TriggerObjectGrabbing(obj.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); + EventManager.TriggerObjectGrabbing(group.RootPart.LocalId, part.LocalId, part.OffsetPosition, remoteClient, surfaceArg); } } -- cgit v1.1 From e33c2f0d7c02abf1e39de1b23141bddc96baae4c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 25 Aug 2016 06:32:04 +0100 Subject: fix missing PhysicsProprieties sending on Object select. This is a temporary Fix, entire Object select code needs to be changed --- .../Framework/Scenes/Scene.PacketHandlers.cs | 25 +--------------------- 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index fc90d60..1aa8087 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -166,30 +166,6 @@ namespace OpenSim.Region.Framework.Scenes /// public void SelectPrim(uint primLocalID, IClientAPI remoteClient) { - /* - SceneObjectPart part = GetSceneObjectPart(primLocalID); - - if (null == part) - return; - - if (part.IsRoot) - { - SceneObjectGroup sog = part.ParentGroup; - sog.SendPropertiesToClient(remoteClient); - - // A prim is only tainted if it's allowed to be edited by the person clicking it. - if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId) - || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId)) - { - sog.IsSelected = true; - EventManager.TriggerParcelPrimCountTainted(); - } - } - else - { - part.SendPropertiesToClient(remoteClient); - } - */ SceneObjectPart part = GetSceneObjectPart(primLocalID); if (null == part) @@ -200,6 +176,7 @@ namespace OpenSim.Region.Framework.Scenes return; part.SendPropertiesToClient(remoteClient); + remoteClient.SendPartPhysicsProprieties(part); // waste of time because properties do not send prim flags as they should // if a friend got or lost edit rights after login, a full update is needed -- cgit v1.1 From 991dd5f4712f7f6b61b4953f3f388f85992db67b Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 25 Aug 2016 06:56:13 +0100 Subject: first step changing Object Select code --- .../Framework/Scenes/Scene.PacketHandlers.cs | 51 ++++++++++++++-------- 1 file changed, 33 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 1aa8087..f8996d0 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -164,31 +164,46 @@ namespace OpenSim.Region.Framework.Scenes /// /// /// - public void SelectPrim(uint primLocalID, IClientAPI remoteClient) + public void SelectPrim(List primIDs, IClientAPI remoteClient) { - SceneObjectPart part = GetSceneObjectPart(primLocalID); + List needUpdates = new List(); - if (null == part) - return; + foreach(uint primLocalID in primIDs) + { + SceneObjectPart part = GetSceneObjectPart(primLocalID); - SceneObjectGroup sog = part.ParentGroup; - if (sog == null) - return; + if (part == null) + continue; + + SceneObjectGroup sog = part.ParentGroup; + if (sog == null) + continue; + + needUpdates.Add(part); - part.SendPropertiesToClient(remoteClient); - remoteClient.SendPartPhysicsProprieties(part); + // waste of time because properties do not send prim flags as they should + // if a friend got or lost edit rights after login, a full update is needed + if(sog.OwnerID != remoteClient.AgentId) + part.SendFullUpdate(remoteClient); - // waste of time because properties do not send prim flags as they should - // if a friend got or lost edit rights after login, a full update is needed - if(sog.OwnerID != remoteClient.AgentId) - part.SendFullUpdate(remoteClient); + // A prim is only tainted if it's allowed to be edited by the person clicking it. + if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId) + || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId)) + { + part.IsSelected = true; + EventManager.TriggerParcelPrimCountTainted(); + } + } - // A prim is only tainted if it's allowed to be edited by the person clicking it. - if (Permissions.CanEditObject(sog.UUID, remoteClient.AgentId) - || Permissions.CanMoveObject(sog.UUID, remoteClient.AgentId)) + if(needUpdates.Count > 0) { - part.IsSelected = true; - EventManager.TriggerParcelPrimCountTainted(); + // this will be replaced by single client function + // that will send the UDP and Caps part + foreach(SceneObjectPart part in needUpdates) + { + part.SendPropertiesToClient(remoteClient); + remoteClient.SendPartPhysicsProprieties(part); + } } } -- cgit v1.1 From d5f376a4b10ffdb5acc17d4e350a0a523ba0e9f5 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 25 Aug 2016 09:51:34 +0100 Subject: send selected objects Proprieties udp part outside update queues and as a physics single caps message per selection request --- OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index f8996d0..4d491d1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -166,7 +166,7 @@ namespace OpenSim.Region.Framework.Scenes /// public void SelectPrim(List primIDs, IClientAPI remoteClient) { - List needUpdates = new List(); + List needUpdates = new List(); foreach(uint primLocalID in primIDs) { @@ -179,7 +179,7 @@ namespace OpenSim.Region.Framework.Scenes if (sog == null) continue; - needUpdates.Add(part); + needUpdates.Add((ISceneEntity)part); // waste of time because properties do not send prim flags as they should // if a friend got or lost edit rights after login, a full update is needed @@ -196,15 +196,7 @@ namespace OpenSim.Region.Framework.Scenes } if(needUpdates.Count > 0) - { - // this will be replaced by single client function - // that will send the UDP and Caps part - foreach(SceneObjectPart part in needUpdates) - { - part.SendPropertiesToClient(remoteClient); - remoteClient.SendPartPhysicsProprieties(part); - } - } + remoteClient.SendSelectedPartsProprieties(needUpdates); } /// -- cgit v1.1