diff options
author | Oren Hurvitz | 2014-04-03 12:47:20 +0300 |
---|---|---|
committer | Oren Hurvitz | 2014-04-03 14:13:03 +0100 |
commit | 6d2893be67fd725090b69f5f31c0985c3d211135 (patch) | |
tree | 6dd6ff48ed74f751730930635638b3a54fce4b7f /OpenSim/Region/CoreModules/Framework | |
parent | BulletSim: make avatar physical shape to be a rectangle rather than (diff) | |
download | opensim-SC_OLD-6d2893be67fd725090b69f5f31c0985c3d211135.zip opensim-SC_OLD-6d2893be67fd725090b69f5f31c0985c3d211135.tar.gz opensim-SC_OLD-6d2893be67fd725090b69f5f31c0985c3d211135.tar.bz2 opensim-SC_OLD-6d2893be67fd725090b69f5f31c0985c3d211135.tar.xz |
When teleporting using Hypergrid, show more informative error messages in case of error
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | 22 |
2 files changed, 27 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index caeb4f8..92ea62c 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -529,14 +529,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
529 | 529 | ||
530 | if (reg != null) | 530 | if (reg != null) |
531 | { | 531 | { |
532 | finalDestination = GetFinalDestination(reg); | 532 | string message; |
533 | finalDestination = GetFinalDestination(reg, out message); | ||
533 | 534 | ||
534 | if (finalDestination == null) | 535 | if (finalDestination == null) |
535 | { | 536 | { |
536 | m_log.WarnFormat( "{0} Final destination is having problems. Unable to teleport {1} {2}", | 537 | m_log.WarnFormat( "{0} Final destination is having problems. Unable to teleport {1} {2}: {3}", |
537 | LogHeader, sp.Name, sp.UUID); | 538 | LogHeader, sp.Name, sp.UUID, message); |
538 | 539 | ||
539 | sp.ControllingClient.SendTeleportFailed("Problem at destination"); | 540 | sp.ControllingClient.SendTeleportFailed(message); |
540 | return; | 541 | return; |
541 | } | 542 | } |
542 | 543 | ||
@@ -557,6 +558,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
557 | return; | 558 | return; |
558 | } | 559 | } |
559 | 560 | ||
561 | if (message != null) | ||
562 | sp.ControllingClient.SendAgentAlertMessage(message, true); | ||
563 | |||
560 | // | 564 | // |
561 | // This is it | 565 | // This is it |
562 | // | 566 | // |
@@ -1327,8 +1331,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1327 | scene.SendKillObject(new List<uint> { localID }); | 1331 | scene.SendKillObject(new List<uint> { localID }); |
1328 | } | 1332 | } |
1329 | 1333 | ||
1330 | protected virtual GridRegion GetFinalDestination(GridRegion region) | 1334 | protected virtual GridRegion GetFinalDestination(GridRegion region, out string message) |
1331 | { | 1335 | { |
1336 | message = null; | ||
1332 | return region; | 1337 | return region; |
1333 | } | 1338 | } |
1334 | 1339 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs index e354522..fa05c90 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/HGEntityTransferModule.cs | |||
@@ -225,19 +225,20 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
225 | 225 | ||
226 | #region HG overrides of IEntiryTransferModule | 226 | #region HG overrides of IEntiryTransferModule |
227 | 227 | ||
228 | protected override GridRegion GetFinalDestination(GridRegion region) | 228 | protected override GridRegion GetFinalDestination(GridRegion region, out string message) |
229 | { | 229 | { |
230 | int flags = Scene.GridService.GetRegionFlags(Scene.RegionInfo.ScopeID, region.RegionID); | 230 | int flags = Scene.GridService.GetRegionFlags(Scene.RegionInfo.ScopeID, region.RegionID); |
231 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: region {0} flags: {1}", region.RegionName, flags); | 231 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: region {0} flags: {1}", region.RegionName, flags); |
232 | message = null; | ||
232 | 233 | ||
233 | if ((flags & (int)OpenSim.Framework.RegionFlags.Hyperlink) != 0) | 234 | if ((flags & (int)OpenSim.Framework.RegionFlags.Hyperlink) != 0) |
234 | { | 235 | { |
235 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region is hyperlink"); | 236 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: Destination region is hyperlink"); |
236 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID); | 237 | GridRegion real_destination = m_GatekeeperConnector.GetHyperlinkRegion(region, region.RegionID, out message); |
237 | if (real_destination != null) | 238 | if (real_destination != null) |
238 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination serveruri -> {0}", real_destination.ServerURI); | 239 | m_log.DebugFormat("[HG ENTITY TRANSFER MODULE]: GetFinalDestination: ServerURI={0}", real_destination.ServerURI); |
239 | else | 240 | else |
240 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: GetHyperlinkRegion to Gatekeeper {0} failed", region.ServerURI); | 241 | m_log.WarnFormat("[HG ENTITY TRANSFER MODULE]: GetHyperlinkRegion of region {0} from Gatekeeper {1} failed: {2}", region.RegionID, region.ServerURI, message); |
241 | return real_destination; | 242 | return real_destination; |
242 | } | 243 | } |
243 | 244 | ||
@@ -533,7 +534,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
533 | GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); | 534 | GatekeeperServiceConnector gConn = new GatekeeperServiceConnector(); |
534 | GridRegion gatekeeper = new GridRegion(); | 535 | GridRegion gatekeeper = new GridRegion(); |
535 | gatekeeper.ServerURI = lm.Gatekeeper; | 536 | gatekeeper.ServerURI = lm.Gatekeeper; |
536 | GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID)); | 537 | string message; |
538 | GridRegion finalDestination = gConn.GetHyperlinkRegion(gatekeeper, new UUID(lm.RegionID), out message); | ||
537 | 539 | ||
538 | if (finalDestination != null) | 540 | if (finalDestination != null) |
539 | { | 541 | { |
@@ -541,9 +543,19 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
541 | IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>(); | 543 | IEntityTransferModule transferMod = scene.RequestModuleInterface<IEntityTransferModule>(); |
542 | 544 | ||
543 | if (transferMod != null && sp != null) | 545 | if (transferMod != null && sp != null) |
546 | { | ||
547 | if (message != null) | ||
548 | sp.ControllingClient.SendAgentAlertMessage(message, true); | ||
549 | |||
544 | transferMod.DoTeleport( | 550 | transferMod.DoTeleport( |
545 | sp, gatekeeper, finalDestination, lm.Position, Vector3.UnitX, | 551 | sp, gatekeeper, finalDestination, lm.Position, Vector3.UnitX, |
546 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); | 552 | (uint)(Constants.TeleportFlags.SetLastToTarget | Constants.TeleportFlags.ViaLandmark)); |
553 | } | ||
554 | } | ||
555 | else | ||
556 | { | ||
557 | remoteClient.SendTeleportFailed(message); | ||
558 | return; | ||
547 | } | 559 | } |
548 | 560 | ||
549 | } | 561 | } |