aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs11
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs1
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs44
3 files changed, 55 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index ea4283f..8894db0 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -890,6 +890,17 @@ namespace OpenSim.Region.Environment.Scenes
890 } 890 }
891 } 891 }
892 } 892 }
893 public void UpdatePrimGroupScale(uint localID, LLVector3 scale, IClientAPI remoteClient)
894 {
895 SceneObjectGroup group = GetGroupByPrim(localID);
896 if (group != null)
897 {
898 if (PermissionsMngr.CanEditObjectPosition(remoteClient.AgentId, group.UUID))
899 {
900 group.GroupResize(scale, localID);
901 }
902 }
903 }
893 904
894 /// <summary> 905 /// <summary>
895 /// This handles the nifty little tool tip that you get when you drag your mouse over an object 906 /// This handles the nifty little tool tip that you get when you drag your mouse over an object
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index b81b2d4..c5ed958 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -1513,6 +1513,7 @@ namespace OpenSim.Region.Environment.Scenes
1513 client.OnUpdatePrimGroupMouseRotation += m_innerScene.UpdatePrimRotation; 1513 client.OnUpdatePrimGroupMouseRotation += m_innerScene.UpdatePrimRotation;
1514 client.OnUpdatePrimSingleRotation += m_innerScene.UpdatePrimSingleRotation; 1514 client.OnUpdatePrimSingleRotation += m_innerScene.UpdatePrimSingleRotation;
1515 client.OnUpdatePrimScale += m_innerScene.UpdatePrimScale; 1515 client.OnUpdatePrimScale += m_innerScene.UpdatePrimScale;
1516 client.OnUpdatePrimGroupScale += m_innerScene.UpdatePrimGroupScale;
1516 client.OnUpdateExtraParams += m_innerScene.UpdateExtraParam; 1517 client.OnUpdateExtraParams += m_innerScene.UpdateExtraParam;
1517 client.OnUpdatePrimShape += m_innerScene.UpdatePrimShape; 1518 client.OnUpdatePrimShape += m_innerScene.UpdatePrimShape;
1518 client.OnRequestMapBlocks += RequestMapBlocks; 1519 client.OnRequestMapBlocks += RequestMapBlocks;
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 3a9e52a..1f38e4f 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1520,7 +1520,7 @@ namespace OpenSim.Region.Environment.Scenes
1520 new PhysicsVector(scale.X, scale.Y, scale.Z); 1520 new PhysicsVector(scale.X, scale.Y, scale.Z);
1521 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); 1521 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor);
1522 } 1522 }
1523 if (part.UUID != m_rootPart.UUID) 1523 //if (part.UUID != m_rootPart.UUID)
1524 ScheduleGroupForFullUpdate(); 1524 ScheduleGroupForFullUpdate();
1525 1525
1526 //if (part.UUID == m_rootPart.UUID) 1526 //if (part.UUID == m_rootPart.UUID)
@@ -1534,6 +1534,48 @@ namespace OpenSim.Region.Environment.Scenes
1534 //} 1534 //}
1535 } 1535 }
1536 } 1536 }
1537 public void GroupResize(LLVector3 scale, uint localID)
1538 {
1539 SceneObjectPart part = GetChildPart(localID);
1540 if (part != null)
1541 {
1542 float x = (scale.X / part.Scale.X);
1543 float y = (scale.Y / part.Scale.Y);
1544 float z = (scale.Z / part.Scale.Z);
1545 part.Resize(scale);
1546
1547 lock (m_parts)
1548 {
1549 foreach (SceneObjectPart obPart in m_parts.Values)
1550 {
1551 if (obPart.UUID != m_rootPart.UUID)
1552 {
1553
1554 LLVector3 currentpos = new LLVector3(obPart.OffsetPosition);
1555 currentpos.X *= x;
1556 currentpos.Y *= y;
1557 currentpos.Z *= z;
1558 LLVector3 newSize = new LLVector3(obPart.Scale);
1559 newSize.X *= x;
1560 newSize.Y *= y;
1561 newSize.Z *= z;
1562 obPart.Resize(newSize);
1563 obPart.UpdateOffSet(currentpos);
1564 }
1565 }
1566 }
1567
1568 if (part.PhysActor != null)
1569 {
1570 part.PhysActor.Size =
1571 new PhysicsVector(scale.X, scale.Y, scale.Z);
1572 m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor);
1573 }
1574
1575
1576 ScheduleGroupForTerseUpdate();
1577 }
1578 }
1537 1579
1538 #endregion 1580 #endregion
1539 1581