diff options
author | UbitUmarov | 2012-03-09 01:53:58 +0000 |
---|---|---|
committer | UbitUmarov | 2012-03-09 01:53:58 +0000 |
commit | 05cdf9bda910ced0da29474b8b40a58e8a423d69 (patch) | |
tree | f436b0dbfe714f50bc8bf6491e6e0e576b9ac744 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | Hold a ref to the prim we're sat on rather than querying scene each time (diff) | |
download | opensim-SC_OLD-05cdf9bda910ced0da29474b8b40a58e8a423d69.zip opensim-SC_OLD-05cdf9bda910ced0da29474b8b40a58e8a423d69.tar.gz opensim-SC_OLD-05cdf9bda910ced0da29474b8b40a58e8a423d69.tar.bz2 opensim-SC_OLD-05cdf9bda910ced0da29474b8b40a58e8a423d69.tar.xz |
more changes in undo/redo. Basicly moved control to llclientview.cs. later we can move back to a dispatcher function on SOG that handles the several cases( in a viwer independent way (?)) and calls current exec funtions. made cosmetic changes replacing decimals by hexs so bits are easier to read. Changed behavour of case 12 and 28 ( 0x0c and 0x1c) to make identical to 0x0d and 0x1d ( scale only and scale plus position). DOn't see 12 and 28 in use... cases 1c and 1d still broken
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 038eaa4..2d71372 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1569,7 +1569,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1569 | // "[SCENE OBJECT GROUP]: Processing OnGrabPart for {0} on {1} {2}, offsetPos {3}", | 1569 | // "[SCENE OBJECT GROUP]: Processing OnGrabPart for {0} on {1} {2}, offsetPos {3}", |
1570 | // remoteClient.Name, part.Name, part.LocalId, offsetPos); | 1570 | // remoteClient.Name, part.Name, part.LocalId, offsetPos); |
1571 | 1571 | ||
1572 | part.StoreUndoState(); | 1572 | // part.StoreUndoState(); |
1573 | part.OnGrab(offsetPos, remoteClient); | 1573 | part.OnGrab(offsetPos, remoteClient); |
1574 | } | 1574 | } |
1575 | 1575 | ||
@@ -3119,7 +3119,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3119 | { | 3119 | { |
3120 | // m_log.DebugFormat( | 3120 | // m_log.DebugFormat( |
3121 | // "[SCENE OBJECT GROUP]: Group resizing {0} {1} from {2} to {3}", Name, LocalId, RootPart.Scale, scale); | 3121 | // "[SCENE OBJECT GROUP]: Group resizing {0} {1} from {2} to {3}", Name, LocalId, RootPart.Scale, scale); |
3122 | RootPart.StoreUndoState(true); | 3122 | // RootPart.StoreUndoState(true); |
3123 | 3123 | ||
3124 | scale.X = Math.Min(scale.X, Scene.m_maxNonphys); | 3124 | scale.X = Math.Min(scale.X, Scene.m_maxNonphys); |
3125 | scale.Y = Math.Min(scale.Y, Scene.m_maxNonphys); | 3125 | scale.Y = Math.Min(scale.Y, Scene.m_maxNonphys); |
@@ -3230,7 +3230,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3230 | 3230 | ||
3231 | if (obPart.UUID != m_rootPart.UUID) | 3231 | if (obPart.UUID != m_rootPart.UUID) |
3232 | { | 3232 | { |
3233 | obPart.IgnoreUndoUpdate = true; | 3233 | // obPart.IgnoreUndoUpdate = true; |
3234 | 3234 | ||
3235 | Vector3 currentpos = new Vector3(obPart.OffsetPosition); | 3235 | Vector3 currentpos = new Vector3(obPart.OffsetPosition); |
3236 | currentpos.X *= x; | 3236 | currentpos.X *= x; |
@@ -3245,7 +3245,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3245 | obPart.Resize(newSize); | 3245 | obPart.Resize(newSize); |
3246 | obPart.UpdateOffSet(currentpos); | 3246 | obPart.UpdateOffSet(currentpos); |
3247 | 3247 | ||
3248 | obPart.IgnoreUndoUpdate = false; | 3248 | // obPart.IgnoreUndoUpdate = false; |
3249 | } | 3249 | } |
3250 | 3250 | ||
3251 | // obPart.IgnoreUndoUpdate = false; | 3251 | // obPart.IgnoreUndoUpdate = false; |
@@ -3270,7 +3270,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3270 | { | 3270 | { |
3271 | // m_log.DebugFormat("[SCENE OBJECT GROUP]: Updating group position on {0} {1} to {2}", Name, LocalId, pos); | 3271 | // m_log.DebugFormat("[SCENE OBJECT GROUP]: Updating group position on {0} {1} to {2}", Name, LocalId, pos); |
3272 | 3272 | ||
3273 | RootPart.StoreUndoState(true); | 3273 | // RootPart.StoreUndoState(true); |
3274 | 3274 | ||
3275 | // SceneObjectPart[] parts = m_parts.GetArray(); | 3275 | // SceneObjectPart[] parts = m_parts.GetArray(); |
3276 | // for (int i = 0; i < parts.Length; i++) | 3276 | // for (int i = 0; i < parts.Length; i++) |
@@ -3311,17 +3311,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
3311 | { | 3311 | { |
3312 | SceneObjectPart part = GetChildPart(localID); | 3312 | SceneObjectPart part = GetChildPart(localID); |
3313 | 3313 | ||
3314 | SceneObjectPart[] parts = m_parts.GetArray(); | 3314 | // SceneObjectPart[] parts = m_parts.GetArray(); |
3315 | for (int i = 0; i < parts.Length; i++) | 3315 | // for (int i = 0; i < parts.Length; i++) |
3316 | parts[i].StoreUndoState(); | 3316 | // parts[i].StoreUndoState(); |
3317 | 3317 | ||
3318 | if (part != null) | 3318 | if (part != null) |
3319 | { | 3319 | { |
3320 | // m_log.DebugFormat( | 3320 | // m_log.DebugFormat( |
3321 | // "[SCENE OBJECT GROUP]: Updating single position of {0} {1} to {2}", part.Name, part.LocalId, pos); | 3321 | // "[SCENE OBJECT GROUP]: Updating single position of {0} {1} to {2}", part.Name, part.LocalId, pos); |
3322 | 3322 | ||
3323 | part.StoreUndoState(false); | 3323 | // part.StoreUndoState(false); |
3324 | part.IgnoreUndoUpdate = true; | 3324 | // part.IgnoreUndoUpdate = true; |
3325 | 3325 | ||
3326 | // unlock parts position change | 3326 | // unlock parts position change |
3327 | if (m_rootPart.PhysActor != null) | 3327 | if (m_rootPart.PhysActor != null) |
@@ -3340,7 +3340,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3340 | m_rootPart.PhysActor.Building = false; | 3340 | m_rootPart.PhysActor.Building = false; |
3341 | 3341 | ||
3342 | HasGroupChanged = true; | 3342 | HasGroupChanged = true; |
3343 | part.IgnoreUndoUpdate = false; | 3343 | // part.IgnoreUndoUpdate = false; |
3344 | } | 3344 | } |
3345 | } | 3345 | } |
3346 | 3346 | ||
@@ -3377,16 +3377,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
3377 | } | 3377 | } |
3378 | 3378 | ||
3379 | //We have to set undoing here because otherwise an undo state will be saved | 3379 | //We have to set undoing here because otherwise an undo state will be saved |
3380 | if (!m_rootPart.Undoing) | 3380 | // if (!m_rootPart.Undoing) |
3381 | { | 3381 | // { |
3382 | m_rootPart.Undoing = true; | 3382 | // m_rootPart.Undoing = true; |
3383 | AbsolutePosition = newPos; | ||
3384 | m_rootPart.Undoing = false; | ||
3385 | } | ||
3386 | else | ||
3387 | { | ||
3388 | AbsolutePosition = newPos; | 3383 | AbsolutePosition = newPos; |
3389 | } | 3384 | // m_rootPart.Undoing = false; |
3385 | // } | ||
3386 | // else | ||
3387 | // { | ||
3388 | // AbsolutePosition = newPos; | ||
3389 | // } | ||
3390 | 3390 | ||
3391 | HasGroupChanged = true; | 3391 | HasGroupChanged = true; |
3392 | if (m_rootPart.Undoing) | 3392 | if (m_rootPart.Undoing) |
@@ -3416,9 +3416,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3416 | // for (int i = 0; i < parts.Length; i++) | 3416 | // for (int i = 0; i < parts.Length; i++) |
3417 | // parts[i].StoreUndoState(); | 3417 | // parts[i].StoreUndoState(); |
3418 | 3418 | ||
3419 | m_rootPart.StoreUndoState(true); | 3419 | // m_rootPart.StoreUndoState(true); |
3420 | 3420 | ||
3421 | m_rootPart.UpdateRotation(rot); | 3421 | // m_rootPart.UpdateRotation(rot); |
3422 | 3422 | ||
3423 | PhysicsActor actor = m_rootPart.PhysActor; | 3423 | PhysicsActor actor = m_rootPart.PhysActor; |
3424 | if (actor != null) | 3424 | if (actor != null) |
@@ -3445,8 +3445,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3445 | // for (int i = 0; i < parts.Length; i++) | 3445 | // for (int i = 0; i < parts.Length; i++) |
3446 | // parts[i].StoreUndoState(); | 3446 | // parts[i].StoreUndoState(); |
3447 | 3447 | ||
3448 | RootPart.StoreUndoState(true); | 3448 | // RootPart.StoreUndoState(true); |
3449 | RootPart.IgnoreUndoUpdate = true; | 3449 | // RootPart.IgnoreUndoUpdate = true; |
3450 | 3450 | ||
3451 | m_rootPart.UpdateRotation(rot); | 3451 | m_rootPart.UpdateRotation(rot); |
3452 | 3452 | ||
@@ -3462,7 +3462,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3462 | HasGroupChanged = true; | 3462 | HasGroupChanged = true; |
3463 | ScheduleGroupForTerseUpdate(); | 3463 | ScheduleGroupForTerseUpdate(); |
3464 | 3464 | ||
3465 | RootPart.IgnoreUndoUpdate = false; | 3465 | // RootPart.IgnoreUndoUpdate = false; |
3466 | } | 3466 | } |
3467 | 3467 | ||
3468 | /// <summary> | 3468 | /// <summary> |
@@ -3511,8 +3511,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3511 | // "[SCENE OBJECT GROUP]: Updating single position and rotation of {0} {1} to {2}", | 3511 | // "[SCENE OBJECT GROUP]: Updating single position and rotation of {0} {1} to {2}", |
3512 | // part.Name, part.LocalId, rot); | 3512 | // part.Name, part.LocalId, rot); |
3513 | 3513 | ||
3514 | part.StoreUndoState(); | 3514 | // part.StoreUndoState(); |
3515 | part.IgnoreUndoUpdate = true; | 3515 | // part.IgnoreUndoUpdate = true; |
3516 | 3516 | ||
3517 | if (m_rootPart.PhysActor != null) | 3517 | if (m_rootPart.PhysActor != null) |
3518 | m_rootPart.PhysActor.Building = true; | 3518 | m_rootPart.PhysActor.Building = true; |
@@ -3541,7 +3541,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3541 | if (m_rootPart.PhysActor != null) | 3541 | if (m_rootPart.PhysActor != null) |
3542 | m_rootPart.PhysActor.Building = false; | 3542 | m_rootPart.PhysActor.Building = false; |
3543 | 3543 | ||
3544 | part.IgnoreUndoUpdate = false; | 3544 | // part.IgnoreUndoUpdate = false; |
3545 | } | 3545 | } |
3546 | } | 3546 | } |
3547 | 3547 | ||
@@ -3557,7 +3557,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3557 | 3557 | ||
3558 | Quaternion axRot = rot; | 3558 | Quaternion axRot = rot; |
3559 | Quaternion oldParentRot = m_rootPart.RotationOffset; | 3559 | Quaternion oldParentRot = m_rootPart.RotationOffset; |
3560 | m_rootPart.StoreUndoState(); | 3560 | // m_rootPart.StoreUndoState(); |
3561 | 3561 | ||
3562 | //Don't use UpdateRotation because it schedules an update prematurely | 3562 | //Don't use UpdateRotation because it schedules an update prematurely |
3563 | m_rootPart.RotationOffset = rot; | 3563 | m_rootPart.RotationOffset = rot; |
@@ -3573,7 +3573,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3573 | SceneObjectPart prim = parts[i]; | 3573 | SceneObjectPart prim = parts[i]; |
3574 | if (prim.UUID != m_rootPart.UUID) | 3574 | if (prim.UUID != m_rootPart.UUID) |
3575 | { | 3575 | { |
3576 | prim.IgnoreUndoUpdate = true; | 3576 | // prim.IgnoreUndoUpdate = true; |
3577 | 3577 | ||
3578 | Quaternion NewRot = oldParentRot * prim.RotationOffset; | 3578 | Quaternion NewRot = oldParentRot * prim.RotationOffset; |
3579 | NewRot = Quaternion.Inverse(axRot) * NewRot; | 3579 | NewRot = Quaternion.Inverse(axRot) * NewRot; |
@@ -3585,7 +3585,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
3585 | axPos *= Quaternion.Inverse(axRot); | 3585 | axPos *= Quaternion.Inverse(axRot); |
3586 | prim.OffsetPosition = axPos; | 3586 | prim.OffsetPosition = axPos; |
3587 | 3587 | ||
3588 | prim.IgnoreUndoUpdate = false; | 3588 | // prim.IgnoreUndoUpdate = false; |
3589 | } | 3589 | } |
3590 | } | 3590 | } |
3591 | 3591 | ||