remove now unncessary parts of SceneObjectGroup.Resize()

bulletsim
Justin Clark-Casey (justincc) 2011-07-16 04:49:21 +01:00
parent 122745fe1c
commit 9a80adf33a
1 changed files with 5 additions and 21 deletions

View File

@ -2611,6 +2611,7 @@ namespace OpenSim.Region.Framework.Scenes
#region Resize #region Resize
/// <summary> /// <summary>
/// Resize the entire group of prims. /// Resize the entire group of prims.
/// </summary> /// </summary>
@ -2712,6 +2713,7 @@ namespace OpenSim.Region.Framework.Scenes
z *= a; z *= a;
} }
} }
obPart.IgnoreUndoUpdate = false; obPart.IgnoreUndoUpdate = false;
obPart.StoreUndoState(); obPart.StoreUndoState();
} }
@ -2729,47 +2731,29 @@ namespace OpenSim.Region.Framework.Scenes
{ {
SceneObjectPart obPart = parts[i]; SceneObjectPart obPart = parts[i];
obPart.IgnoreUndoUpdate = true; obPart.IgnoreUndoUpdate = true;
if (obPart.UUID != m_rootPart.UUID) if (obPart.UUID != m_rootPart.UUID)
{ {
Vector3 currentpos = new Vector3(obPart.OffsetPosition); Vector3 currentpos = new Vector3(obPart.OffsetPosition);
currentpos.X *= x; currentpos.X *= x;
currentpos.Y *= y; currentpos.Y *= y;
currentpos.Z *= z; currentpos.Z *= z;
Vector3 newSize = new Vector3(obPart.Scale); Vector3 newSize = new Vector3(obPart.Scale);
newSize.X *= x; newSize.X *= x;
newSize.Y *= y; newSize.Y *= y;
newSize.Z *= z; newSize.Z *= z;
obPart.Resize(newSize); obPart.Resize(newSize);
obPart.UpdateOffSet(currentpos); obPart.UpdateOffSet(currentpos);
if (obPart.PhysActor != null)
{
obPart.PhysActor.Size = newSize;
// If we're a sculpt wait for the trigger when the sculpt texture is retrieved.
if (((OpenMetaverse.SculptType)obPart.Shape.SculptType) != SculptType.Mesh)
m_scene.PhysicsScene.AddPhysicsActorTaint(obPart.PhysActor);
}
} }
obPart.IgnoreUndoUpdate = false; obPart.IgnoreUndoUpdate = false;
obPart.StoreUndoState(); obPart.StoreUndoState();
} }
if (RootPart.PhysActor != null)
{
RootPart.PhysActor.Size = prevScale;
// If we're a sculpt wait for the trigger when the sculpt texture is retrieved.
if (((OpenMetaverse.SculptType)RootPart.Shape.SculptType) != SculptType.Mesh)
m_scene.PhysicsScene.AddPhysicsActorTaint(RootPart.PhysActor);
}
RootPart.IgnoreUndoUpdate = false; RootPart.IgnoreUndoUpdate = false;
RootPart.StoreUndoState(); RootPart.StoreUndoState();
HasGroupChanged = true;
RootPart.TriggerScriptChangedEvent(Changed.SCALE);
ScheduleGroupForTerseUpdate();
} }
#endregion #endregion