diff options
author | Melanie | 2012-05-07 23:03:07 +0200 |
---|---|---|
committer | Melanie | 2012-05-07 23:03:07 +0200 |
commit | 74eafb78ebe854c5c36f489b92c8c68328e2a80d (patch) | |
tree | 22d499d986bcd0a7345a81ea2b1f389e92ce8866 | |
parent | UbitODE: reduced the diference btw dinamic and static friction, making dinami... (diff) | |
download | opensim-SC_OLD-74eafb78ebe854c5c36f489b92c8c68328e2a80d.zip opensim-SC_OLD-74eafb78ebe854c5c36f489b92c8c68328e2a80d.tar.gz opensim-SC_OLD-74eafb78ebe854c5c36f489b92c8c68328e2a80d.tar.bz2 opensim-SC_OLD-74eafb78ebe854c5c36f489b92c8c68328e2a80d.tar.xz |
Fix moving no-mod objects. Fixes a regression introduced with the undo fix
-rw-r--r-- | OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 6 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 27 |
2 files changed, 29 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 40ebed1..bb76717 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | |||
@@ -11631,8 +11631,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11631 | 11631 | ||
11632 | udata.scale = new Vector3(block.Data, 0); | 11632 | udata.scale = new Vector3(block.Data, 0); |
11633 | 11633 | ||
11634 | // udata.change = ObjectChangeType.groupS; | 11634 | udata.change = ObjectChangeType.groupS; |
11635 | udata.change = ObjectChangeType.primS; // to conform to current SL | ||
11636 | updatehandler(localId, udata, this); | 11635 | updatehandler(localId, udata, this); |
11637 | 11636 | ||
11638 | break; | 11637 | break; |
@@ -11643,8 +11642,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
11643 | udata.position = new Vector3(block.Data, 0); | 11642 | udata.position = new Vector3(block.Data, 0); |
11644 | udata.scale = new Vector3(block.Data, 12); | 11643 | udata.scale = new Vector3(block.Data, 12); |
11645 | 11644 | ||
11646 | // udata.change = ObjectChangeType.groupPS; | 11645 | udata.change = ObjectChangeType.groupPS; |
11647 | udata.change = ObjectChangeType.primPS; // to conform to current SL | ||
11648 | updatehandler(localId, udata, this); | 11646 | updatehandler(localId, udata, this); |
11649 | break; | 11647 | break; |
11650 | 11648 | ||
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 | |||
1273 | { | 1273 | { |
1274 | if (m_parentScene.Permissions.CanEditObject(grp.UUID, remoteClient.AgentId)) | 1274 | if (m_parentScene.Permissions.CanEditObject(grp.UUID, remoteClient.AgentId)) |
1275 | { | 1275 | { |
1276 | // These two are exceptions SL makes in the interpretation | ||
1277 | // of the change flags. Must check them here because otherwise | ||
1278 | // the group flag (see below) would be lost | ||
1279 | if (data.change == ObjectChangeType.groupS) | ||
1280 | data.change = ObjectChangeType.primS; | ||
1281 | if (data.change == ObjectChangeType.groupPS) | ||
1282 | data.change = ObjectChangeType.primPS; | ||
1276 | part.StoreUndoState(data.change); // lets test only saving what we changed | 1283 | part.StoreUndoState(data.change); // lets test only saving what we changed |
1277 | grp.doChangeObject(part, (ObjectChangeData)data); | 1284 | grp.doChangeObject(part, (ObjectChangeData)data); |
1278 | } | 1285 | } |
1286 | else | ||
1287 | { | ||
1288 | // Is this any kind of group operation? | ||
1289 | if ((data.change & ObjectChangeType.Group) != 0) | ||
1290 | { | ||
1291 | // Is a move and/or rotation requested? | ||
1292 | if ((data.change & (ObjectChangeType.Position | ObjectChangeType.Rotation)) != 0) | ||
1293 | { | ||
1294 | // Are we allowed to move it? | ||
1295 | if (m_parentScene.Permissions.CanMoveObject(grp.UUID, remoteClient.AgentId)) | ||
1296 | { | ||
1297 | // Strip all but move and rotation from request | ||
1298 | data.change &= (ObjectChangeType.Group | ObjectChangeType.Position | ObjectChangeType.Rotation); | ||
1299 | |||
1300 | part.StoreUndoState(data.change); | ||
1301 | grp.doChangeObject(part, (ObjectChangeData)data); | ||
1302 | } | ||
1303 | } | ||
1304 | } | ||
1305 | } | ||
1279 | } | 1306 | } |
1280 | } | 1307 | } |
1281 | } | 1308 | } |