aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-08-28 03:21:03 +0100
committerUbitUmarov2012-08-28 03:21:03 +0100
commitef6e007a4c7301dbd7a1a0392a07664e7034201b (patch)
tree090ee81b2784f6e3f21fe8e0df72c089d5ea9f5c /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
parent fix incoerence btw KFM_TRANSLATION and ROTATION LSL constants and internal (diff)
downloadopensim-SC_OLD-ef6e007a4c7301dbd7a1a0392a07664e7034201b.zip
opensim-SC_OLD-ef6e007a4c7301dbd7a1a0392a07664e7034201b.tar.gz
opensim-SC_OLD-ef6e007a4c7301dbd7a1a0392a07664e7034201b.tar.bz2
opensim-SC_OLD-ef6e007a4c7301dbd7a1a0392a07664e7034201b.tar.xz
[possible still very broken] mess around keyframes. timer events
threads overlaps, some null objects exceptions, region crossing...
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs29
1 files changed, 23 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index eee53d7..65a1da2 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);
@@ -2058,8 +2066,8 @@ namespace OpenSim.Region.Framework.Scenes
2058 { 2066 {
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(false));
2062 part.KeyframeMotion.UpdateSceneObject(this); 2070// part.KeyframeMotion.UpdateSceneObject(this);
2063 } 2071 }
2064 }); 2072 });
2065 2073
@@ -4407,6 +4415,15 @@ namespace OpenSim.Region.Framework.Scenes
4407 public virtual ISceneObject CloneForNewScene() 4415 public virtual ISceneObject CloneForNewScene()
4408 { 4416 {
4409 SceneObjectGroup sog = Copy(false); 4417 SceneObjectGroup sog = Copy(false);
4418 sog.ForEachPart(delegate(SceneObjectPart part)
4419 {
4420 if (part.KeyframeMotion != null)
4421 {
4422 part.KeyframeMotion = KeyframeMotion.FromData(sog, part.KeyframeMotion.Serialize(true));
4423 // this is called later
4424// part.KeyframeMotion.UpdateSceneObject(this);
4425 }
4426 });
4410 sog.IsDeleted = false; 4427 sog.IsDeleted = false;
4411 return sog; 4428 return sog;
4412 } 4429 }