diff options
author | UbitUmarov | 2014-11-19 18:20:30 +0000 |
---|---|---|
committer | UbitUmarov | 2014-11-19 18:20:30 +0000 |
commit | bb5ab05482c2eb3b8d6c0ae41f54866f41105033 (patch) | |
tree | a2f11cef7e77f59bfd9884d0efd8727e8cd0cf9a | |
parent | some steps to rez center or root of prim inventory object at requested (diff) | |
download | opensim-SC-bb5ab05482c2eb3b8d6c0ae41f54866f41105033.zip opensim-SC-bb5ab05482c2eb3b8d6c0ae41f54866f41105033.tar.gz opensim-SC-bb5ab05482c2eb3b8d6c0ae41f54866f41105033.tar.bz2 opensim-SC-bb5ab05482c2eb3b8d6c0ae41f54866f41105033.tar.xz |
fix rez position being for root or center for a single object case
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9721edb..1dd3d2f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -2491,6 +2491,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
2491 | sourcePart.Inventory.RemoveInventoryItem(item.ItemID); | 2491 | sourcePart.Inventory.RemoveInventoryItem(item.ItemID); |
2492 | } | 2492 | } |
2493 | 2493 | ||
2494 | SceneObjectGroup sog; | ||
2495 | // position adjust | ||
2496 | if (totalPrims > 1) // nothing to do on a single prim | ||
2497 | { | ||
2498 | if (objlist.Count == 1) | ||
2499 | { | ||
2500 | // current object position is root position | ||
2501 | if(!atRoot) | ||
2502 | { | ||
2503 | sog = objlist[0]; | ||
2504 | Quaternion orot; | ||
2505 | if (rot == null) | ||
2506 | orot = sog.RootPart.GetWorldRotation(); | ||
2507 | else | ||
2508 | orot = rot.Value; | ||
2509 | Vector3 off = sog.GetGeometricCenter(); | ||
2510 | off *= orot; | ||
2511 | pos -= off; | ||
2512 | } | ||
2513 | } | ||
2514 | } | ||
2515 | |||
2494 | for (int i = 0; i < objlist.Count; i++) | 2516 | for (int i = 0; i < objlist.Count; i++) |
2495 | { | 2517 | { |
2496 | SceneObjectGroup group = objlist[i]; | 2518 | SceneObjectGroup group = objlist[i]; |