aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs38
1 files changed, 19 insertions, 19 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index da664da..34712b8 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -355,7 +355,7 @@ namespace OpenSim.Region.Framework.Scenes
355 { 355 {
356 foreach(SceneObjectPart p in m_parts.Values) 356 foreach(SceneObjectPart p in m_parts.Values)
357 { 357 {
358 p.StoreUndoState(true); 358 p.StoreUndoState(UndoType.STATE_GROUP_ROTATION);
359 } 359 }
360 } 360 }
361 finally 361 finally
@@ -435,7 +435,6 @@ namespace OpenSim.Region.Framework.Scenes
435 get { return m_rootPart.GroupPosition; } 435 get { return m_rootPart.GroupPosition; }
436 set 436 set
437 { 437 {
438
439 Vector3 val = value; 438 Vector3 val = value;
440 439
441 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W) 440 if ((m_scene.TestBorderCross(val - Vector3.UnitX, Cardinals.E) || m_scene.TestBorderCross(val + Vector3.UnitX, Cardinals.W)
@@ -464,7 +463,7 @@ namespace OpenSim.Region.Framework.Scenes
464 foreach (SceneObjectPart part in m_parts.Values) 463 foreach (SceneObjectPart part in m_parts.Values)
465 { 464 {
466 part.IgnoreUndoUpdate = false; 465 part.IgnoreUndoUpdate = false;
467 part.StoreUndoState(true); 466 part.StoreUndoState(UndoType.STATE_GROUP_POSITION);
468 part.GroupPosition = val; 467 part.GroupPosition = val;
469 } 468 }
470 lockPartsForRead(false); 469 lockPartsForRead(false);
@@ -1488,7 +1487,7 @@ namespace OpenSim.Region.Framework.Scenes
1488 1487
1489 public virtual void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient) 1488 public virtual void OnGrabPart(SceneObjectPart part, Vector3 offsetPos, IClientAPI remoteClient)
1490 { 1489 {
1491 part.StoreUndoState(); 1490 part.StoreUndoState(UndoType.STATE_PRIM_ALL);
1492 part.OnGrab(offsetPos, remoteClient); 1491 part.OnGrab(offsetPos, remoteClient);
1493 } 1492 }
1494 1493
@@ -3245,6 +3244,9 @@ namespace OpenSim.Region.Framework.Scenes
3245 prevScale.X *= x; 3244 prevScale.X *= x;
3246 prevScale.Y *= y; 3245 prevScale.Y *= y;
3247 prevScale.Z *= z;; 3246 prevScale.Z *= z;;
3247
3248 part.IgnoreUndoUpdate = false;
3249 part.StoreUndoState(UndoType.STATE_GROUP_SCALE);
3248 part.IgnoreUndoUpdate = true; 3250 part.IgnoreUndoUpdate = true;
3249 part.Resize(prevScale); 3251 part.Resize(prevScale);
3250 part.IgnoreUndoUpdate = false; 3252 part.IgnoreUndoUpdate = false;
@@ -3253,11 +3255,12 @@ namespace OpenSim.Region.Framework.Scenes
3253 { 3255 {
3254 foreach (SceneObjectPart obPart in m_parts.Values) 3256 foreach (SceneObjectPart obPart in m_parts.Values)
3255 { 3257 {
3256 obPart.IgnoreUndoUpdate = false;
3257 obPart.StoreUndoState(true);
3258 obPart.IgnoreUndoUpdate = true;
3259 if (obPart.UUID != m_rootPart.UUID) 3258 if (obPart.UUID != m_rootPart.UUID)
3260 { 3259 {
3260 obPart.IgnoreUndoUpdate = false;
3261 obPart.StoreUndoState(UndoType.STATE_GROUP_SCALE);
3262 obPart.IgnoreUndoUpdate = true;
3263
3261 Vector3 currentpos = new Vector3(obPart.OffsetPosition); 3264 Vector3 currentpos = new Vector3(obPart.OffsetPosition);
3262 currentpos.X *= x; 3265 currentpos.X *= x;
3263 currentpos.Y *= y; 3266 currentpos.Y *= y;
@@ -3296,14 +3299,11 @@ namespace OpenSim.Region.Framework.Scenes
3296 /// <param name="pos"></param> 3299 /// <param name="pos"></param>
3297 public void UpdateGroupPosition(Vector3 pos) 3300 public void UpdateGroupPosition(Vector3 pos)
3298 { 3301 {
3299 foreach (SceneObjectPart part in Children.Values)
3300 {
3301 part.StoreUndoState();
3302 }
3303 if (m_scene.EventManager.TriggerGroupMove(UUID, pos)) 3302 if (m_scene.EventManager.TriggerGroupMove(UUID, pos))
3304 { 3303 {
3305 if (IsAttachment) 3304 if (IsAttachment)
3306 { 3305 {
3306 m_rootPart.StoreUndoState(UndoType.STATE_GROUP_POSITION);
3307 m_rootPart.AttachedPos = pos; 3307 m_rootPart.AttachedPos = pos;
3308 } 3308 }
3309 if (RootPart.GetStatusSandbox()) 3309 if (RootPart.GetStatusSandbox())
@@ -3336,7 +3336,7 @@ namespace OpenSim.Region.Framework.Scenes
3336 SceneObjectPart part = GetChildPart(localID); 3336 SceneObjectPart part = GetChildPart(localID);
3337 foreach (SceneObjectPart parts in Children.Values) 3337 foreach (SceneObjectPart parts in Children.Values)
3338 { 3338 {
3339 parts.StoreUndoState(); 3339 parts.StoreUndoState(UndoType.STATE_PRIM_POSITION);
3340 } 3340 }
3341 if (part != null) 3341 if (part != null)
3342 { 3342 {
@@ -3361,7 +3361,7 @@ namespace OpenSim.Region.Framework.Scenes
3361 { 3361 {
3362 foreach (SceneObjectPart part in Children.Values) 3362 foreach (SceneObjectPart part in Children.Values)
3363 { 3363 {
3364 part.StoreUndoState(); 3364 part.StoreUndoState(UndoType.STATE_PRIM_POSITION);
3365 } 3365 }
3366 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z); 3366 Vector3 newPos = new Vector3(pos.X, pos.Y, pos.Z);
3367 Vector3 oldPos = 3367 Vector3 oldPos =
@@ -3409,7 +3409,7 @@ namespace OpenSim.Region.Framework.Scenes
3409 { 3409 {
3410 foreach (SceneObjectPart parts in Children.Values) 3410 foreach (SceneObjectPart parts in Children.Values)
3411 { 3411 {
3412 parts.StoreUndoState(); 3412 parts.StoreUndoState(UndoType.STATE_GROUP_ROTATION);
3413 } 3413 }
3414 m_rootPart.UpdateRotation(rot); 3414 m_rootPart.UpdateRotation(rot);
3415 3415
@@ -3433,7 +3433,7 @@ namespace OpenSim.Region.Framework.Scenes
3433 { 3433 {
3434 foreach (SceneObjectPart parts in Children.Values) 3434 foreach (SceneObjectPart parts in Children.Values)
3435 { 3435 {
3436 parts.StoreUndoState(); 3436 parts.StoreUndoState(UndoType.STATE_GROUP_ROTATION);
3437 } 3437 }
3438 m_rootPart.UpdateRotation(rot); 3438 m_rootPart.UpdateRotation(rot);
3439 3439
@@ -3460,7 +3460,7 @@ namespace OpenSim.Region.Framework.Scenes
3460 SceneObjectPart part = GetChildPart(localID); 3460 SceneObjectPart part = GetChildPart(localID);
3461 foreach (SceneObjectPart parts in Children.Values) 3461 foreach (SceneObjectPart parts in Children.Values)
3462 { 3462 {
3463 parts.StoreUndoState(); 3463 parts.StoreUndoState(UndoType.STATE_PRIM_ROTATION);
3464 } 3464 }
3465 if (part != null) 3465 if (part != null)
3466 { 3466 {
@@ -3496,7 +3496,7 @@ namespace OpenSim.Region.Framework.Scenes
3496 part.UpdateRotation(rot); 3496 part.UpdateRotation(rot);
3497 part.OffsetPosition = pos; 3497 part.OffsetPosition = pos;
3498 part.IgnoreUndoUpdate = false; 3498 part.IgnoreUndoUpdate = false;
3499 part.StoreUndoState(); 3499 part.StoreUndoState(UndoType.STATE_PRIM_ROTATION);
3500 } 3500 }
3501 } 3501 }
3502 } 3502 }
@@ -3510,7 +3510,7 @@ namespace OpenSim.Region.Framework.Scenes
3510 Quaternion axRot = rot; 3510 Quaternion axRot = rot;
3511 Quaternion oldParentRot = m_rootPart.RotationOffset; 3511 Quaternion oldParentRot = m_rootPart.RotationOffset;
3512 3512
3513 m_rootPart.StoreUndoState(); 3513 m_rootPart.StoreUndoState(UndoType.STATE_PRIM_ROTATION);
3514 m_rootPart.UpdateRotation(rot); 3514 m_rootPart.UpdateRotation(rot);
3515 if (m_rootPart.PhysActor != null) 3515 if (m_rootPart.PhysActor != null)
3516 { 3516 {
@@ -3542,7 +3542,7 @@ namespace OpenSim.Region.Framework.Scenes
3542 if (childpart != m_rootPart) 3542 if (childpart != m_rootPart)
3543 { 3543 {
3544 childpart.IgnoreUndoUpdate = false; 3544 childpart.IgnoreUndoUpdate = false;
3545 childpart.StoreUndoState(); 3545 childpart.StoreUndoState(UndoType.STATE_PRIM_ROTATION);
3546 } 3546 }
3547 } 3547 }
3548 3548