aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2013-09-02 19:15:10 +0100
committerJustin Clark-Casey (justincc)2013-09-02 19:15:10 +0100
commit857f24a5e2b59072ad4d987d5e64318f5249c7e7 (patch)
treefb2bdcae26a3eb6290ed9a587cf729172bf4f8a2 /OpenSim/Region/CoreModules/Framework
parentComment out warning about agent updating without valid session ID for now. (diff)
downloadopensim-SC_OLD-857f24a5e2b59072ad4d987d5e64318f5249c7e7.zip
opensim-SC_OLD-857f24a5e2b59072ad4d987d5e64318f5249c7e7.tar.gz
opensim-SC_OLD-857f24a5e2b59072ad4d987d5e64318f5249c7e7.tar.bz2
opensim-SC_OLD-857f24a5e2b59072ad4d987d5e64318f5249c7e7.tar.xz
Fix bug where users teleporting to non-neighbour regions could continue to hear chat from their source region for some time after teleport completion.
This occurs on v2 teleport since the source region now waits 15 secs before closing the old child agent, which could still receive chat. This commit introduces a ScenePresenceState.PreClose which is set before the wait, so that ChatModule can check for ScenePresenceState.Running. This was theoretically also an issue on v1 teleport but since the pause before close was only 2 secs there, it was not noticed.
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 8950516..4219254 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -920,6 +920,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
920 920
921 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 921 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
922 { 922 {
923 if (!sp.Scene.IncomingPreCloseAgent(sp))
924 return;
925
923 // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before 926 // We need to delay here because Imprudence viewers, unlike v1 or v3, have a short (<200ms, <500ms) delay before
924 // they regard the new region as the current region after receiving the AgentMovementComplete 927 // they regard the new region as the current region after receiving the AgentMovementComplete
925 // response. If close is sent before then, it will cause the viewer to quit instead. 928 // response. If close is sent before then, it will cause the viewer to quit instead.
@@ -1082,6 +1085,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1082 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone 1085 // Finally, let's close this previously-known-as-root agent, when the jump is outside the view zone
1083 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg)) 1086 if (NeedsClosing(sp.DrawDistance, oldRegionX, newRegionX, oldRegionY, newRegionY, reg))
1084 { 1087 {
1088 if (!sp.Scene.IncomingPreCloseAgent(sp))
1089 return;
1090
1085 // RED ALERT!!!! 1091 // RED ALERT!!!!
1086 // PLEASE DO NOT DECREASE THIS WAIT TIME UNDER ANY CIRCUMSTANCES. 1092 // PLEASE DO NOT DECREASE THIS WAIT TIME UNDER ANY CIRCUMSTANCES.
1087 // THE VIEWERS SEEM TO NEED SOME TIME AFTER RECEIVING MoveAgentIntoRegion 1093 // THE VIEWERS SEEM TO NEED SOME TIME AFTER RECEIVING MoveAgentIntoRegion
@@ -1095,6 +1101,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1095 // then this will be handled in IncomingCloseAgent under lock conditions 1101 // then this will be handled in IncomingCloseAgent under lock conditions
1096 m_log.DebugFormat( 1102 m_log.DebugFormat(
1097 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name); 1103 "[ENTITY TRANSFER MODULE]: Closing agent {0} in {1} after teleport", sp.Name, Scene.Name);
1104
1098 sp.Scene.IncomingCloseAgent(sp.UUID, false); 1105 sp.Scene.IncomingCloseAgent(sp.UUID, false);
1099 } 1106 }
1100 else 1107 else