diff options
author | UbitUmarov | 2014-11-01 15:38:14 +0000 |
---|---|---|
committer | UbitUmarov | 2014-11-01 15:38:14 +0000 |
commit | f6ae8534be0587ad79acbb642f5d79e2597972ab (patch) | |
tree | 40638a744e31ab7775301023941f4e082ef95ab9 /OpenSim/Region | |
parent | don't send updates for deleted agents (diff) | |
download | opensim-SC_OLD-f6ae8534be0587ad79acbb642f5d79e2597972ab.zip opensim-SC_OLD-f6ae8534be0587ad79acbb642f5d79e2597972ab.tar.gz opensim-SC_OLD-f6ae8534be0587ad79acbb642f5d79e2597972ab.tar.bz2 opensim-SC_OLD-f6ae8534be0587ad79acbb642f5d79e2597972ab.tar.xz |
only close child agents on sucess of V1 tp not at start
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 48 |
1 files changed, 10 insertions, 38 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index afc73ec..1861055 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -830,7 +830,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
830 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); | 830 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.Transferring); |
831 | 831 | ||
832 | // OK, it got this agent. Let's close some child agents | 832 | // OK, it got this agent. Let's close some child agents |
833 | sp.CloseChildAgents(newRegionX, newRegionY); | 833 | |
834 | 834 | ||
835 | if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) | 835 | if (NeedsNewAgent(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY)) |
836 | { | 836 | { |
@@ -972,7 +972,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
972 | return; | 972 | return; |
973 | } | 973 | } |
974 | 974 | ||
975 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); | ||
976 | 975 | ||
977 | // For backwards compatibility | 976 | // For backwards compatibility |
978 | if (version == "Unknown" || version == string.Empty) | 977 | if (version == "Unknown" || version == string.Empty) |
@@ -982,6 +981,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
982 | CrossAttachmentsIntoNewRegion(finalDestination, sp, true); | 981 | CrossAttachmentsIntoNewRegion(finalDestination, sp, true); |
983 | } | 982 | } |
984 | 983 | ||
984 | m_entityTransferStateMachine.UpdateInTransit(sp.UUID, AgentTransferState.CleaningUp); | ||
985 | |||
986 | |||
985 | // May need to logout or other cleanup | 987 | // May need to logout or other cleanup |
986 | // AgentHasMovedAway(sp, logout); | 988 | // AgentHasMovedAway(sp, logout); |
987 | // AgentHasMovedAway(sp, true); // until logout use is checked | 989 | // AgentHasMovedAway(sp, true); // until logout use is checked |
@@ -992,6 +994,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
992 | bool l_needsclosing = NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg); | 994 | bool l_needsclosing = NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg); |
993 | sp.HasMovedAway(!l_needsclosing); | 995 | sp.HasMovedAway(!l_needsclosing); |
994 | 996 | ||
997 | sp.CloseChildAgents(newRegionX, newRegionY); | ||
998 | |||
995 | // Now let's make it officially a child agent | 999 | // Now let's make it officially a child agent |
996 | sp.MakeChildAgent(destinationHandle); | 1000 | sp.MakeChildAgent(destinationHandle); |
997 | 1001 | ||
@@ -1518,10 +1522,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1518 | */ | 1522 | */ |
1519 | float regionSizeX = regInfo.RegionSizeX; | 1523 | float regionSizeX = regInfo.RegionSizeX; |
1520 | float regionSizeY = regInfo.RegionSizeY; | 1524 | float regionSizeY = regInfo.RegionSizeY; |
1521 | if (regionSizeX == 0) | ||
1522 | regionSizeX = 256f; | ||
1523 | if (regionSizeY == 0) | ||
1524 | regionSizeY = 256f; | ||
1525 | 1525 | ||
1526 | if (pos.X < boundaryDistance) | 1526 | if (pos.X < boundaryDistance) |
1527 | neighbourx--; | 1527 | neighbourx--; |
@@ -1565,9 +1565,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1565 | float newRegionSizeX = neighbourRegion.RegionSizeX; | 1565 | float newRegionSizeX = neighbourRegion.RegionSizeX; |
1566 | float newRegionSizeY = neighbourRegion.RegionSizeY; | 1566 | float newRegionSizeY = neighbourRegion.RegionSizeY; |
1567 | if (newRegionSizeX == 0) | 1567 | if (newRegionSizeX == 0) |
1568 | newRegionSizeX = 256f; | 1568 | newRegionSizeX = Constants.RegionSize; |
1569 | if (newRegionSizeY == 0) | 1569 | if (newRegionSizeY == 0) |
1570 | newRegionSizeY = 256f; | 1570 | newRegionSizeY = Constants.RegionSize; |
1571 | 1571 | ||
1572 | if (pos.X < boundaryDistance) | 1572 | if (pos.X < boundaryDistance) |
1573 | newpos.X += newRegionSizeX; | 1573 | newpos.X += newRegionSizeX; |
@@ -2450,10 +2450,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2450 | int neighboury = (int)srcRegionInfo.RegionLocY; | 2450 | int neighboury = (int)srcRegionInfo.RegionLocY; |
2451 | float regionSizeX = srcRegionInfo.RegionSizeX; | 2451 | float regionSizeX = srcRegionInfo.RegionSizeX; |
2452 | float regionSizeY = srcRegionInfo.RegionSizeY; | 2452 | float regionSizeY = srcRegionInfo.RegionSizeY; |
2453 | if (regionSizeX == 0) | ||
2454 | regionSizeX = 256f; | ||
2455 | if (regionSizeY == 0) | ||
2456 | regionSizeY = 256f; | ||
2457 | 2453 | ||
2458 | float edgeJitter = 0.2f; | 2454 | float edgeJitter = 0.2f; |
2459 | 2455 | ||
@@ -2479,9 +2475,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2479 | float newRegionSizeX = neighbourRegion.RegionSizeX; | 2475 | float newRegionSizeX = neighbourRegion.RegionSizeX; |
2480 | float newRegionSizeY = neighbourRegion.RegionSizeY; | 2476 | float newRegionSizeY = neighbourRegion.RegionSizeY; |
2481 | if (newRegionSizeX == 0) | 2477 | if (newRegionSizeX == 0) |
2482 | newRegionSizeX = 256f; | 2478 | newRegionSizeX = Constants.RegionSize; |
2483 | if (newRegionSizeY == 0) | 2479 | if (newRegionSizeY == 0) |
2484 | newRegionSizeY = 256f; | 2480 | newRegionSizeY = Constants.RegionSize; |
2485 | 2481 | ||
2486 | if (targetPosition.X < edgeJitter) | 2482 | if (targetPosition.X < edgeJitter) |
2487 | newpos.X += newRegionSizeX; | 2483 | newpos.X += newRegionSizeX; |
@@ -2773,30 +2769,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
2773 | grp, e); | 2769 | grp, e); |
2774 | } | 2770 | } |
2775 | } | 2771 | } |
2776 | /* | ||
2777 | * done on caller ( not in attachments crossing for now) | ||
2778 | else | ||
2779 | { | ||
2780 | |||
2781 | if (!grp.IsDeleted) | ||
2782 | { | ||
2783 | PhysicsActor pa = grp.RootPart.PhysActor; | ||
2784 | if (pa != null) | ||
2785 | { | ||
2786 | pa.CrossingFailure(); | ||
2787 | if (grp.RootPart.KeyframeMotion != null) | ||
2788 | { | ||
2789 | // moved to KeyframeMotion.CrossingFailure | ||
2790 | // grp.RootPart.Velocity = Vector3.Zero; | ||
2791 | grp.RootPart.KeyframeMotion.CrossingFailure(); | ||
2792 | // grp.SendGroupRootTerseUpdate(); | ||
2793 | } | ||
2794 | } | ||
2795 | } | ||
2796 | |||
2797 | m_log.ErrorFormat("[ENTITY TRANSFER MODULE]: Prim crossing failed for {0}", grp); | ||
2798 | } | ||
2799 | */ | ||
2800 | } | 2772 | } |
2801 | else | 2773 | else |
2802 | { | 2774 | { |