aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs26
1 files changed, 23 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index af24ed3..fd03e93 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1310,7 +1310,9 @@ namespace OpenSim.Region.Framework.Scenes
1310 if (m_agentTransfer != null) 1310 if (m_agentTransfer != null)
1311 m_agentTransfer.EnableChildAgents(this); 1311 m_agentTransfer.EnableChildAgents(this);
1312 else 1312 else
1313 m_log.DebugFormat("[SCENE PRESENCE]: Unable to create child agents in neighbours, because AgentTransferModule is not active"); 1313 m_log.DebugFormat(
1314 "[SCENE PRESENCE]: Unable to create child agents in neighbours, because AgentTransferModule is not active for region {0}",
1315 m_scene.RegionInfo.RegionName);
1314 1316
1315 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>(); 1317 IFriendsModule friendsModule = m_scene.RequestModuleInterface<IFriendsModule>();
1316 if (friendsModule != null) 1318 if (friendsModule != null)
@@ -3028,8 +3030,11 @@ namespace OpenSim.Region.Framework.Scenes
3028 #region Border Crossing Methods 3030 #region Border Crossing Methods
3029 3031
3030 /// <summary> 3032 /// <summary>
3031 /// Checks to see if the avatar is in range of a border and calls CrossToNewRegion 3033 /// Starts the process of moving an avatar into another region if they are crossing the border.
3032 /// </summary> 3034 /// </summary>
3035 /// <remarks>
3036 /// Also removes the avatar from the physical scene if transit has started.
3037 /// </remarks>
3033 protected void CheckForBorderCrossing() 3038 protected void CheckForBorderCrossing()
3034 { 3039 {
3035 if (IsChildAgent) 3040 if (IsChildAgent)
@@ -3097,7 +3102,6 @@ namespace OpenSim.Region.Framework.Scenes
3097 neighbor = HaveNeighbor(Cardinals.N, ref fix); 3102 neighbor = HaveNeighbor(Cardinals.N, ref fix);
3098 } 3103 }
3099 3104
3100
3101 // Makes sure avatar does not end up outside region 3105 // Makes sure avatar does not end up outside region
3102 if (neighbor <= 0) 3106 if (neighbor <= 0)
3103 { 3107 {
@@ -3152,6 +3156,13 @@ namespace OpenSim.Region.Framework.Scenes
3152 } 3156 }
3153 else 3157 else
3154 { 3158 {
3159 // We must remove the agent from the physical scene if it has been placed in transit. If we don't,
3160 // then this method continues to be called from ScenePresence.Update() until the handover of the client between
3161 // regions is completed. Since this handover can take more than 1000ms (due to the 1000ms
3162 // event queue polling response from the server), this results in the avatar pausing on the border
3163 // for the handover period.
3164 RemoveFromPhysicalScene();
3165
3155 // This constant has been inferred from experimentation 3166 // This constant has been inferred from experimentation
3156 // I'm not sure what this value should be, so I tried a few values. 3167 // I'm not sure what this value should be, so I tried a few values.
3157 timeStep = 0.04f; 3168 timeStep = 0.04f;
@@ -3163,6 +3174,15 @@ namespace OpenSim.Region.Framework.Scenes
3163 } 3174 }
3164 } 3175 }
3165 3176
3177 /// <summary>
3178 /// Checks whether this region has a neighbour in the given direction.
3179 /// </summary>
3180 /// <param name="car"></param>
3181 /// <param name="fix"></param>
3182 /// <returns>
3183 /// An integer which represents a compass point. N == 1, going clockwise until we reach NW == 8.
3184 /// Returns a positive integer if there is a region in that direction, a negative integer if not.
3185 /// </returns>
3166 protected int HaveNeighbor(Cardinals car, ref int[] fix) 3186 protected int HaveNeighbor(Cardinals car, ref int[] fix)
3167 { 3187 {
3168 uint neighbourx = m_regionInfo.RegionLocX; 3188 uint neighbourx = m_regionInfo.RegionLocX;