diff options
author | UbitUmarov | 2015-09-14 16:40:01 +0100 |
---|---|---|
committer | UbitUmarov | 2015-09-14 16:40:01 +0100 |
commit | 5becc16acfa28eb1daf2b6ca0680d00e581b4d64 (patch) | |
tree | 8014eda7f408358839c75b9228d8432bbdc028f1 /OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |
parent | try to add a mysql migration to avn (diff) | |
download | opensim-SC_OLD-5becc16acfa28eb1daf2b6ca0680d00e581b4d64.zip opensim-SC_OLD-5becc16acfa28eb1daf2b6ca0680d00e581b4d64.tar.gz opensim-SC_OLD-5becc16acfa28eb1daf2b6ca0680d00e581b4d64.tar.bz2 opensim-SC_OLD-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 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 20 |
1 files changed, 16 insertions, 4 deletions
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; } |