diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index eee53d7..5052683 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -509,6 +509,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
509 | Vector3 newpos = Vector3.Zero; | 509 | Vector3 newpos = Vector3.Zero; |
510 | OpenSim.Services.Interfaces.GridRegion destination = null; | 510 | OpenSim.Services.Interfaces.GridRegion destination = null; |
511 | 511 | ||
512 | if (m_rootPart.KeyframeMotion != null) | ||
513 | m_rootPart.KeyframeMotion.StartCrossingCheck(); | ||
514 | |||
512 | bool canCross = true; | 515 | bool canCross = true; |
513 | foreach (ScenePresence av in m_linkedAvatars) | 516 | foreach (ScenePresence av in m_linkedAvatars) |
514 | { | 517 | { |
@@ -551,7 +554,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
551 | av.ParentID = 0; | 554 | av.ParentID = 0; |
552 | } | 555 | } |
553 | 556 | ||
554 | // m_linkedAvatars.Clear(); | 557 | // m_linkedAvatars.Clear(); |
555 | m_scene.CrossPrimGroupIntoNewRegion(val, this, true); | 558 | m_scene.CrossPrimGroupIntoNewRegion(val, this, true); |
556 | 559 | ||
557 | // Normalize | 560 | // Normalize |
@@ -599,11 +602,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
599 | avsToCross.Clear(); | 602 | avsToCross.Clear(); |
600 | 603 | ||
601 | } | 604 | } |
602 | else if (RootPart.PhysActor != null) | 605 | else |
603 | { | 606 | { |
604 | RootPart.PhysActor.CrossingFailure(); | 607 | if (m_rootPart.KeyframeMotion != null) |
605 | } | 608 | m_rootPart.KeyframeMotion.CrossingFailure(); |
606 | 609 | ||
610 | if (RootPart.PhysActor != null) | ||
611 | { | ||
612 | RootPart.PhysActor.CrossingFailure(); | ||
613 | } | ||
614 | } | ||
607 | Vector3 oldp = AbsolutePosition; | 615 | Vector3 oldp = AbsolutePosition; |
608 | val.X = Util.Clamp<float>(oldp.X, 0.5f, (float)Constants.RegionSize - 0.5f); | 616 | val.X = Util.Clamp<float>(oldp.X, 0.5f, (float)Constants.RegionSize - 0.5f); |
609 | val.Y = Util.Clamp<float>(oldp.Y, 0.5f, (float)Constants.RegionSize - 0.5f); | 617 | val.Y = Util.Clamp<float>(oldp.Y, 0.5f, (float)Constants.RegionSize - 0.5f); |
@@ -2059,7 +2067,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2059 | if (part.KeyframeMotion != null) | 2067 | if (part.KeyframeMotion != null) |
2060 | { | 2068 | { |
2061 | part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); | 2069 | part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); |
2062 | part.KeyframeMotion.UpdateSceneObject(this); | 2070 | // part.KeyframeMotion.UpdateSceneObject(this); |
2063 | } | 2071 | } |
2064 | }); | 2072 | }); |
2065 | 2073 | ||
@@ -3025,7 +3033,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3025 | /// <param name="objectGroup"></param> | 3033 | /// <param name="objectGroup"></param> |
3026 | public virtual void DetachFromBackup() | 3034 | public virtual void DetachFromBackup() |
3027 | { | 3035 | { |
3028 | m_scene.SceneGraph.FireDetachFromBackup(this); | 3036 | if (m_scene != null) |
3037 | m_scene.SceneGraph.FireDetachFromBackup(this); | ||
3029 | if (m_isBackedUp && Scene != null) | 3038 | if (m_isBackedUp && Scene != null) |
3030 | m_scene.EventManager.OnBackup -= ProcessBackup; | 3039 | m_scene.EventManager.OnBackup -= ProcessBackup; |
3031 | 3040 | ||
@@ -4407,6 +4416,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
4407 | public virtual ISceneObject CloneForNewScene() | 4416 | public virtual ISceneObject CloneForNewScene() |
4408 | { | 4417 | { |
4409 | SceneObjectGroup sog = Copy(false); | 4418 | SceneObjectGroup sog = Copy(false); |
4419 | sog.ForEachPart(delegate(SceneObjectPart part) | ||
4420 | { | ||
4421 | if (part.KeyframeMotion != null) | ||
4422 | { | ||
4423 | part.KeyframeMotion = KeyframeMotion.FromData(sog, part.KeyframeMotion.Serialize()); | ||
4424 | // this is called later | ||
4425 | // part.KeyframeMotion.UpdateSceneObject(this); | ||
4426 | } | ||
4427 | }); | ||
4410 | sog.IsDeleted = false; | 4428 | sog.IsDeleted = false; |
4411 | return sog; | 4429 | return sog; |
4412 | } | 4430 | } |