aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index c63b0a4..b51570f 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -323,6 +323,14 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
323 return; 323 return;
324 } 324 }
325 325
326 // Validate assorted conditions
327 string reason = string.Empty;
328 if (!ValidateGenericConditions(sp, reg, finalDestination, teleportFlags, out reason))
329 {
330 sp.ControllingClient.SendTeleportFailed(reason);
331 return;
332 }
333
326 // 334 //
327 // This is it 335 // This is it
328 // 336 //
@@ -354,6 +362,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
354 } 362 }
355 } 363 }
356 364
365 // Nothing to validate here
366 protected virtual bool ValidateGenericConditions(ScenePresence sp, GridRegion reg, GridRegion finalDestination, uint teleportFlags, out string reason)
367 {
368 reason = String.Empty;
369 return true;
370 }
371
357 /// <summary> 372 /// <summary>
358 /// Determines whether this instance is within the max transfer distance. 373 /// Determines whether this instance is within the max transfer distance.
359 /// </summary> 374 /// </summary>
@@ -568,7 +583,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
568 583
569 //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Updating agent..."); 584 //sp.ControllingClient.SendTeleportProgress(teleportFlags, "Updating agent...");
570 585
571 if (!UpdateAgent(reg, finalDestination, agent)) 586 if (!UpdateAgent(reg, finalDestination, agent, sp))
572 { 587 {
573 // Region doesn't take it 588 // Region doesn't take it
574 m_log.WarnFormat( 589 m_log.WarnFormat(
@@ -695,7 +710,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
695 return success; 710 return success;
696 } 711 }
697 712
698 protected virtual bool UpdateAgent(GridRegion reg, GridRegion finalDestination, AgentData agent) 713 protected virtual bool UpdateAgent(GridRegion reg, GridRegion finalDestination, AgentData agent, ScenePresence sp)
699 { 714 {
700 return Scene.SimulationService.UpdateAgent(finalDestination, agent); 715 return Scene.SimulationService.UpdateAgent(finalDestination, agent);
701 } 716 }