aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorUbitUmarov2015-09-14 16:40:01 +0100
committerUbitUmarov2015-09-14 16:40:01 +0100
commit5becc16acfa28eb1daf2b6ca0680d00e581b4d64 (patch)
tree8014eda7f408358839c75b9228d8432bbdc028f1 /OpenSim/Region/Framework
parent try to add a mysql migration to avn (diff)
downloadopensim-SC-5becc16acfa28eb1daf2b6ca0680d00e581b4d64.zip
opensim-SC-5becc16acfa28eb1daf2b6ca0680d00e581b4d64.tar.gz
opensim-SC-5becc16acfa28eb1daf2b6ca0680d00e581b4d64.tar.bz2
opensim-SC-5becc16acfa28eb1daf2b6ca0680d00e581b4d64.tar.xz
try to improve vehicles crossing with Xengine. Lag seems main issue now, but needs testing, specially the fail cases, that most likelly need more work
Diffstat (limited to '')
-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
4 files changed, 23 insertions, 8 deletions
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