aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs10
-rw-r--r--OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs4
-rwxr-xr-xOpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs20
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs2
5 files changed, 28 insertions, 13 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 97d417f..e6041b4 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -2607,7 +2607,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2607 return neighbourRegion; 2607 return neighbourRegion;
2608 } 2608 }
2609 2609
2610 2610/* not in use. -> CrossPrimGroupIntoNewRegion
2611 /// <summary> 2611 /// <summary>
2612 /// Move the given scene object into a new region depending on which region its absolute position has moved 2612 /// Move the given scene object into a new region depending on which region its absolute position has moved
2613 /// into. 2613 /// into.
@@ -2672,7 +2672,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2672 grp.ScheduleGroupForFullUpdate(); 2672 grp.ScheduleGroupForFullUpdate();
2673 } 2673 }
2674 } 2674 }
2675 2675*/
2676 /// <summary> 2676 /// <summary>
2677 /// Move the given scene object into a new region 2677 /// Move the given scene object into a new region
2678 /// </summary> 2678 /// </summary>
@@ -2682,7 +2682,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2682 /// true if the crossing itself was successful, false on failure 2682 /// true if the crossing itself was successful, false on failure
2683 /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region 2683 /// FIMXE: we still return true if the crossing object was not successfully deleted from the originating region
2684 /// </returns> 2684 /// </returns>
2685 public bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent) 2685 public bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent, bool removeScripts)
2686 { 2686 {
2687 //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<"); 2687 //m_log.Debug(" >>> CrossPrimGroupIntoNewRegion <<<");
2688 2688
@@ -2714,7 +2714,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2714 // We remove the object here 2714 // We remove the object here
2715 try 2715 try
2716 { 2716 {
2717 grp.Scene.DeleteSceneObject(grp, silent); 2717 grp.Scene.DeleteSceneObject(grp, silent, removeScripts);
2718 } 2718 }
2719 catch (Exception e) 2719 catch (Exception e)
2720 { 2720 {
@@ -2764,7 +2764,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
2764 "[ENTITY TRANSFER MODULE]: Sending attachment {0} to region {1}", 2764 "[ENTITY TRANSFER MODULE]: Sending attachment {0} to region {1}",
2765 clone.UUID, destination.RegionName); 2765 clone.UUID, destination.RegionName);
2766 2766
2767 CrossPrimGroupIntoNewRegion(destination, Vector3.Zero, clone, silent); 2767 CrossPrimGroupIntoNewRegion(destination, Vector3.Zero, clone, silent,true);
2768 } 2768 }
2769 } 2769 }
2770 2770
diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
index 80f8244..61d199f 100644
--- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs
@@ -96,8 +96,8 @@ namespace OpenSim.Region.Framework.Interfaces
96 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out string version, out Vector3 newpos); 96 GridRegion GetDestination(Scene scene, UUID agentID, Vector3 pos, out string version, out Vector3 newpos);
97 GridRegion GetObjectDestination(SceneObjectGroup grp, Vector3 targetPosition, out Vector3 newpos); 97 GridRegion GetObjectDestination(SceneObjectGroup grp, Vector3 targetPosition, out Vector3 newpos);
98 bool checkAgentAccessToRegion(ScenePresence agent, GridRegion destiny, Vector3 position, out string version, out string reason); 98 bool checkAgentAccessToRegion(ScenePresence agent, GridRegion destiny, Vector3 position, out string version, out string reason);
99 void Cross(SceneObjectGroup sog, Vector3 position, bool silent); 99// void Cross(SceneObjectGroup sog, Vector3 position, bool silent);
100 bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent); 100 bool CrossPrimGroupIntoNewRegion(GridRegion destination, Vector3 newPosition, SceneObjectGroup grp, bool silent, bool removeScripts);
101 101
102 ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version); 102 ScenePresence CrossAgentToNewRegionAsync(ScenePresence agent, Vector3 pos, GridRegion neighbourRegion, bool isFlying, string version);
103 103
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1b6d483..db64eb7 100755
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2177,7 +2177,7 @@ namespace OpenSim.Region.Framework.Scenes
2177 //// stored in the GridService, because that's what the world map module uses 2177 //// stored in the GridService, because that's what the world map module uses
2178 //// to send the map image UUIDs (of other regions) to the viewer... 2178 //// to send the map image UUIDs (of other regions) to the viewer...
2179 if (m_generateMaptiles) 2179 if (m_generateMaptiles)
2180 RegenerateMaptile(); 2180 RegenerateMaptile();
2181 2181
2182 GridRegion region = new GridRegion(RegionInfo); 2182 GridRegion region = new GridRegion(RegionInfo);
2183 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region); 2183 string error = GridService.RegisterRegion(RegionInfo.ScopeID, region);
@@ -2709,6 +2709,8 @@ namespace OpenSim.Region.Framework.Scenes
2709 { 2709 {
2710 m_sceneGraph.updateScenePartGroup(part, grp); 2710 m_sceneGraph.updateScenePartGroup(part, grp);
2711 } 2711 }
2712
2713/* not in use, outdate by async method
2712 /// <summary> 2714 /// <summary>
2713 /// Move the given scene object into a new region depending on which region its absolute position has moved 2715 /// Move the given scene object into a new region depending on which region its absolute position has moved
2714 /// into. 2716 /// into.
@@ -2757,6 +2759,7 @@ namespace OpenSim.Region.Framework.Scenes
2757 if (EntityTransferModule != null) 2759 if (EntityTransferModule != null)
2758 EntityTransferModule.Cross(grp, attemptedPosition, silent); 2760 EntityTransferModule.Cross(grp, attemptedPosition, silent);
2759 } 2761 }
2762*/
2760 2763
2761 // Simple test to see if a position is in the current region. 2764 // Simple test to see if a position is in the current region.
2762 // This test is mostly used to see if a region crossing is necessary. 2765 // This test is mostly used to see if a region crossing is necessary.
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index b3bd7e0..e860862 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -672,7 +672,7 @@ namespace OpenSim.Region.Framework.Scenes
672 672
673 if (sog.m_linkedAvatars.Count == 0) 673 if (sog.m_linkedAvatars.Count == 0)
674 { 674 {
675 entityTransfer.CrossPrimGroupIntoNewRegion(destination, newpos, sog, true); 675 entityTransfer.CrossPrimGroupIntoNewRegion(destination, newpos, sog, true, true);
676 return sog; 676 return sog;
677 } 677 }
678 678
@@ -716,7 +716,7 @@ namespace OpenSim.Region.Framework.Scenes
716 av.ParentID = 0; 716 av.ParentID = 0;
717 } 717 }
718 718
719 if (entityTransfer.CrossPrimGroupIntoNewRegion(destination, newpos, sog, true)) 719 if (entityTransfer.CrossPrimGroupIntoNewRegion(destination, newpos, sog, true, false))
720 { 720 {
721 foreach (avtocrossInfo avinfo in avsToCross) 721 foreach (avtocrossInfo avinfo in avsToCross)
722 { 722 {
@@ -730,14 +730,24 @@ namespace OpenSim.Region.Framework.Scenes
730// CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync; 730// CrossAgentToNewRegionDelegate d = entityTransfer.CrossAgentToNewRegionAsync;
731// d.BeginInvoke(av, val, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d); 731// d.BeginInvoke(av, val, destination, av.Flying, version, CrossAgentToNewRegionCompleted, d);
732 entityTransfer.CrossAgentToNewRegionAsync(av, newpos, destination, av.Flying, version); 732 entityTransfer.CrossAgentToNewRegionAsync(av, newpos, destination, av.Flying, version);
733 if(av.IsChildAgent) 733 if (av.IsChildAgent)
734 { 734 {
735 // avatar crossed do some extra cleanup
735 if (av.ParentUUID != UUID.Zero) 736 if (av.ParentUUID != UUID.Zero)
736 { 737 {
737 av.ClearControls(); 738 av.ClearControls();
738 av.ParentPart = null; 739 av.ParentPart = null;
739 } 740 }
740 } 741 }
742 else
743 {
744 // avatar cross failed we need do dedicated standUp
745 // part of it was done at CrossAgentToNewRegionAsync
746 // so for now just remove the sog controls
747 // this may need extra care
748 av.UnRegisterSeatControls(sog.UUID);
749 }
750
741 av.ParentUUID = UUID.Zero; 751 av.ParentUUID = UUID.Zero;
742 // In any case 752 // In any case
743 av.IsInTransit = false; 753 av.IsInTransit = false;
@@ -748,6 +758,7 @@ namespace OpenSim.Region.Framework.Scenes
748 m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar already in transit {0} to {1}", av.Name, val); 758 m_log.DebugFormat("[SCENE OBJECT]: Crossing avatar already in transit {0} to {1}", av.Name, val);
749 } 759 }
750 avsToCross.Clear(); 760 avsToCross.Clear();
761 sog.RemoveScriptInstances(true);
751 return sog; 762 return sog;
752 } 763 }
753 else // cross failed, put avas back ?? 764 else // cross failed, put avas back ??
@@ -805,6 +816,7 @@ namespace OpenSim.Region.Framework.Scenes
805 } 816 }
806 } 817 }
807 818
819/* outdated
808 private void CrossAgentToNewRegionCompleted(ScenePresence agent) 820 private void CrossAgentToNewRegionCompleted(ScenePresence agent)
809 { 821 {
810 //// If the cross was successful, this agent is a child agent 822 //// If the cross was successful, this agent is a child agent
@@ -829,7 +841,7 @@ namespace OpenSim.Region.Framework.Scenes
829 841
830 m_log.DebugFormat("[SCENE OBJECT]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname); 842 m_log.DebugFormat("[SCENE OBJECT]: Crossing agent {0} {1} completed.", agent.Firstname, agent.Lastname);
831 } 843 }
832 844*/
833 public override Vector3 Velocity 845 public override Vector3 Velocity
834 { 846 {
835 get { return RootPart.Velocity; } 847 get { return RootPart.Velocity; }
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 516736a..6210db0 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -5264,7 +5264,7 @@ namespace OpenSim.Region.Framework.Scenes
5264 } 5264 }
5265 } 5265 }
5266 5266
5267 private void UnRegisterSeatControls(UUID obj) 5267 public void UnRegisterSeatControls(UUID obj)
5268 { 5268 {
5269 List<UUID> takers = new List<UUID>(); 5269 List<UUID> takers = new List<UUID>();
5270 5270