aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-25 03:39:10 +0100
committerJustin Clark-Casey (justincc)2012-05-25 03:39:10 +0100
commitab59c0a658c25f129255198f27704cdbbcb13d6b (patch)
treedd60b99403972acfcfb8c08b3cddfa04f544cde6 /OpenSim/Region
parentrefactor: make ETM.CrossAgentToNewRegionAsync neighbourRegion == null check r... (diff)
downloadopensim-SC_OLD-ab59c0a658c25f129255198f27704cdbbcb13d6b.zip
opensim-SC_OLD-ab59c0a658c25f129255198f27704cdbbcb13d6b.tar.gz
opensim-SC_OLD-ab59c0a658c25f129255198f27704cdbbcb13d6b.tar.bz2
opensim-SC_OLD-ab59c0a658c25f129255198f27704cdbbcb13d6b.tar.xz
on agent cross, remove from physics scene after its been placed in transit, not before.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 7295383..a5fb0c2 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -1111,6 +1111,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1111 1111
1112 try 1112 try
1113 { 1113 {
1114 SetInTransit(agent.UUID);
1115
1114 ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize)); 1116 ulong neighbourHandle = Utils.UIntsToLong((uint)(neighbourx * Constants.RegionSize), (uint)(neighboury * Constants.RegionSize));
1115 1117
1116 m_log.DebugFormat( 1118 m_log.DebugFormat(
@@ -1129,8 +1131,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1129 1131
1130 agent.RemoveFromPhysicalScene(); 1132 agent.RemoveFromPhysicalScene();
1131 1133
1132 SetInTransit(agent.UUID);
1133
1134 AgentData cAgent = new AgentData(); 1134 AgentData cAgent = new AgentData();
1135 agent.CopyTo(cAgent); 1135 agent.CopyTo(cAgent);
1136 cAgent.Position = pos; 1136 cAgent.Position = pos;
@@ -1146,9 +1146,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1146 if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) 1146 if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent))
1147 { 1147 {
1148 // region doesn't take it 1148 // region doesn't take it
1149 UpdateInTransit(agent.UUID, AgentTransferState.CleaningUp);
1150
1149 ReInstantiateScripts(agent); 1151 ReInstantiateScripts(agent);
1150 agent.AddToPhysicalScene(isFlying); 1152 agent.AddToPhysicalScene(isFlying);
1151 ResetFromTransit(agent.UUID); 1153 ResetFromTransit(agent.UUID);
1154
1152 return agent; 1155 return agent;
1153 } 1156 }
1154 1157
@@ -1208,7 +1211,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1208 CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true); 1211 CrossAttachmentsIntoNewRegion(neighbourRegion, agent, true);
1209 } 1212 }
1210 1213
1211
1212 // Next, let's close the child agent connections that are too far away. 1214 // Next, let's close the child agent connections that are too far away.
1213 agent.CloseChildAgents(neighbourx, neighboury); 1215 agent.CloseChildAgents(neighbourx, neighboury);
1214 1216
@@ -1232,6 +1234,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
1232 m_log.ErrorFormat( 1234 m_log.ErrorFormat(
1233 "[ENTITY TRANSFER MODULE]: Problem crossing user {0} to new region {1} from {2}. Exception {3}{4}", 1235 "[ENTITY TRANSFER MODULE]: Problem crossing user {0} to new region {1} from {2}. Exception {3}{4}",
1234 agent.Name, neighbourRegion.RegionName, agent.Scene.RegionInfo.RegionName, e.Message, e.StackTrace); 1236 agent.Name, neighbourRegion.RegionName, agent.Scene.RegionInfo.RegionName, e.Message, e.StackTrace);
1237
1238 // TODO: Might be worth attempting other restoration here such as reinstantiation of scripts, etc.
1235 } 1239 }
1236 1240
1237 return agent; 1241 return agent;