diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index fcb1571..0448c25 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); |
@@ -2054,15 +2062,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
2054 | HasGroupChangedDueToDelink = false; | 2062 | HasGroupChangedDueToDelink = false; |
2055 | 2063 | ||
2056 | m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this); | 2064 | m_scene.EventManager.TriggerOnSceneObjectPreSave(backup_group, this); |
2065 | /* | ||
2057 | backup_group.ForEachPart(delegate(SceneObjectPart part) | 2066 | backup_group.ForEachPart(delegate(SceneObjectPart part) |
2058 | { | 2067 | { |
2059 | if (part.KeyframeMotion != null) | 2068 | if (part.KeyframeMotion != null) |
2060 | { | 2069 | { |
2061 | part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); | 2070 | part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); |
2062 | part.KeyframeMotion.UpdateSceneObject(this); | 2071 | // part.KeyframeMotion.UpdateSceneObject(this); |
2063 | } | 2072 | } |
2064 | }); | 2073 | }); |
2065 | 2074 | */ | |
2066 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); | 2075 | datastore.StoreObject(backup_group, m_scene.RegionInfo.RegionID); |
2067 | 2076 | ||
2068 | backup_group.ForEachPart(delegate(SceneObjectPart part) | 2077 | backup_group.ForEachPart(delegate(SceneObjectPart part) |
@@ -3025,7 +3034,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
3025 | /// <param name="objectGroup"></param> | 3034 | /// <param name="objectGroup"></param> |
3026 | public virtual void DetachFromBackup() | 3035 | public virtual void DetachFromBackup() |
3027 | { | 3036 | { |
3028 | m_scene.SceneGraph.FireDetachFromBackup(this); | 3037 | if (m_scene != null) |
3038 | m_scene.SceneGraph.FireDetachFromBackup(this); | ||
3029 | if (m_isBackedUp && Scene != null) | 3039 | if (m_isBackedUp && Scene != null) |
3030 | m_scene.EventManager.OnBackup -= ProcessBackup; | 3040 | m_scene.EventManager.OnBackup -= ProcessBackup; |
3031 | 3041 | ||