From 74eafb78ebe854c5c36f489b92c8c68328e2a80d Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 7 May 2012 23:03:07 +0200 Subject: Fix moving no-mod objects. Fixes a regression introduced with the undo fix --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index d4965ea..0d178c3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1273,9 +1273,36 @@ namespace OpenSim.Region.Framework.Scenes { if (m_parentScene.Permissions.CanEditObject(grp.UUID, remoteClient.AgentId)) { + // These two are exceptions SL makes in the interpretation + // of the change flags. Must check them here because otherwise + // the group flag (see below) would be lost + if (data.change == ObjectChangeType.groupS) + data.change = ObjectChangeType.primS; + if (data.change == ObjectChangeType.groupPS) + data.change = ObjectChangeType.primPS; part.StoreUndoState(data.change); // lets test only saving what we changed grp.doChangeObject(part, (ObjectChangeData)data); } + else + { + // Is this any kind of group operation? + if ((data.change & ObjectChangeType.Group) != 0) + { + // Is a move and/or rotation requested? + if ((data.change & (ObjectChangeType.Position | ObjectChangeType.Rotation)) != 0) + { + // Are we allowed to move it? + if (m_parentScene.Permissions.CanMoveObject(grp.UUID, remoteClient.AgentId)) + { + // Strip all but move and rotation from request + data.change &= (ObjectChangeType.Group | ObjectChangeType.Position | ObjectChangeType.Rotation); + + part.StoreUndoState(data.change); + grp.doChangeObject(part, (ObjectChangeData)data); + } + } + } + } } } } -- cgit v1.1