diff options
Diffstat (limited to 'OpenSim/Services/LLLoginService/LLLoginService.cs')
-rw-r--r-- | OpenSim/Services/LLLoginService/LLLoginService.cs | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 3ccdc9c..53a3c2f 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs | |||
@@ -489,7 +489,7 @@ namespace OpenSim.Services.LLLoginService | |||
489 | Vector3 position = Vector3.Zero; | 489 | Vector3 position = Vector3.Zero; |
490 | Vector3 lookAt = Vector3.Zero; | 490 | Vector3 lookAt = Vector3.Zero; |
491 | GridRegion gatekeeper = null; | 491 | GridRegion gatekeeper = null; |
492 | TeleportFlags flags; | 492 | Constants.TeleportFlags flags; |
493 | GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt, out flags); | 493 | GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt, out flags); |
494 | if (destination == null) | 494 | if (destination == null) |
495 | { | 495 | { |
@@ -508,7 +508,7 @@ namespace OpenSim.Services.LLLoginService | |||
508 | } | 508 | } |
509 | 509 | ||
510 | if (account.UserLevel >= 200) | 510 | if (account.UserLevel >= 200) |
511 | flags |= TeleportFlags.Godlike; | 511 | flags |= Constants.TeleportFlags.Godlike; |
512 | // | 512 | // |
513 | // Get the avatar | 513 | // Get the avatar |
514 | // | 514 | // |
@@ -582,9 +582,9 @@ namespace OpenSim.Services.LLLoginService | |||
582 | protected GridRegion FindDestination( | 582 | protected GridRegion FindDestination( |
583 | UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, | 583 | UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, |
584 | GridRegion home, out GridRegion gatekeeper, | 584 | GridRegion home, out GridRegion gatekeeper, |
585 | out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags) | 585 | out string where, out Vector3 position, out Vector3 lookAt, out Constants.TeleportFlags flags) |
586 | { | 586 | { |
587 | flags = TeleportFlags.ViaLogin; | 587 | flags = Constants.TeleportFlags.ViaLogin; |
588 | 588 | ||
589 | m_log.DebugFormat( | 589 | m_log.DebugFormat( |
590 | "[LLOGIN SERVICE]: Finding destination matching start location {0} for {1}", | 590 | "[LLOGIN SERVICE]: Finding destination matching start location {0} for {1}", |
@@ -618,7 +618,7 @@ namespace OpenSim.Services.LLLoginService | |||
618 | 618 | ||
619 | position = pinfo.HomePosition; | 619 | position = pinfo.HomePosition; |
620 | lookAt = pinfo.HomeLookAt; | 620 | lookAt = pinfo.HomeLookAt; |
621 | flags |= TeleportFlags.ViaHome; | 621 | flags |= Constants.TeleportFlags.ViaHome; |
622 | } | 622 | } |
623 | 623 | ||
624 | if (tryDefaults) | 624 | if (tryDefaults) |
@@ -626,7 +626,7 @@ namespace OpenSim.Services.LLLoginService | |||
626 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); | 626 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); |
627 | if (defaults != null && defaults.Count > 0) | 627 | if (defaults != null && defaults.Count > 0) |
628 | { | 628 | { |
629 | flags |= TeleportFlags.ViaRegionID; | 629 | flags |= Constants.TeleportFlags.ViaRegionID; |
630 | region = defaults[0]; | 630 | region = defaults[0]; |
631 | where = "safe"; | 631 | where = "safe"; |
632 | } | 632 | } |
@@ -637,7 +637,7 @@ namespace OpenSim.Services.LLLoginService | |||
637 | region = FindAlternativeRegion(scopeID); | 637 | region = FindAlternativeRegion(scopeID); |
638 | if (region != null) | 638 | if (region != null) |
639 | { | 639 | { |
640 | flags |= TeleportFlags.ViaRegionID; | 640 | flags |= Constants.TeleportFlags.ViaRegionID; |
641 | where = "safe"; | 641 | where = "safe"; |
642 | } | 642 | } |
643 | } | 643 | } |
@@ -660,7 +660,7 @@ namespace OpenSim.Services.LLLoginService | |||
660 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); | 660 | List<GridRegion> defaults = m_GridService.GetDefaultRegions(scopeID); |
661 | if (defaults != null && defaults.Count > 0) | 661 | if (defaults != null && defaults.Count > 0) |
662 | { | 662 | { |
663 | flags |= TeleportFlags.ViaRegionID; | 663 | flags |= Constants.TeleportFlags.ViaRegionID; |
664 | region = defaults[0]; | 664 | region = defaults[0]; |
665 | where = "safe"; | 665 | where = "safe"; |
666 | } | 666 | } |
@@ -670,7 +670,7 @@ namespace OpenSim.Services.LLLoginService | |||
670 | region = FindAlternativeRegion(scopeID); | 670 | region = FindAlternativeRegion(scopeID); |
671 | if (region != null) | 671 | if (region != null) |
672 | { | 672 | { |
673 | flags |= TeleportFlags.ViaRegionID; | 673 | flags |= Constants.TeleportFlags.ViaRegionID; |
674 | where = "safe"; | 674 | where = "safe"; |
675 | } | 675 | } |
676 | } | 676 | } |
@@ -686,7 +686,7 @@ namespace OpenSim.Services.LLLoginService | |||
686 | } | 686 | } |
687 | else | 687 | else |
688 | { | 688 | { |
689 | flags |= TeleportFlags.ViaRegionID; | 689 | flags |= Constants.TeleportFlags.ViaRegionID; |
690 | 690 | ||
691 | // free uri form | 691 | // free uri form |
692 | // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 | 692 | // e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34 |
@@ -704,6 +704,8 @@ namespace OpenSim.Services.LLLoginService | |||
704 | position = new Vector3(float.Parse(uriMatch.Groups["x"].Value, Culture.NumberFormatInfo), | 704 | position = new Vector3(float.Parse(uriMatch.Groups["x"].Value, Culture.NumberFormatInfo), |
705 | float.Parse(uriMatch.Groups["y"].Value, Culture.NumberFormatInfo), | 705 | float.Parse(uriMatch.Groups["y"].Value, Culture.NumberFormatInfo), |
706 | float.Parse(uriMatch.Groups["z"].Value, Culture.NumberFormatInfo)); | 706 | float.Parse(uriMatch.Groups["z"].Value, Culture.NumberFormatInfo)); |
707 | if (0 == position.Z) | ||
708 | flags |= Constants.TeleportFlags.ViaMap; | ||
707 | 709 | ||
708 | string regionName = uriMatch.Groups["region"].ToString(); | 710 | string regionName = uriMatch.Groups["region"].ToString(); |
709 | if (regionName != null) | 711 | if (regionName != null) |
@@ -858,7 +860,7 @@ namespace OpenSim.Services.LLLoginService | |||
858 | 860 | ||
859 | protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar, | 861 | protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar, |
860 | UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0, | 862 | UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0, |
861 | IPEndPoint clientIP, TeleportFlags flags, out string where, out string reason, out GridRegion dest) | 863 | IPEndPoint clientIP, Constants.TeleportFlags flags, out string where, out string reason, out GridRegion dest) |
862 | { | 864 | { |
863 | where = currentWhere; | 865 | where = currentWhere; |
864 | ISimulationService simConnector = null; | 866 | ISimulationService simConnector = null; |
@@ -895,7 +897,7 @@ namespace OpenSim.Services.LLLoginService | |||
895 | { | 897 | { |
896 | foreach (GridRegion r in fallbacks) | 898 | foreach (GridRegion r in fallbacks) |
897 | { | 899 | { |
898 | success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | TeleportFlags.ViaRegionID, out reason); | 900 | success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | Constants.TeleportFlags.ViaRegionID | Constants.TeleportFlags.ViaMap, out reason); |
899 | if (success) | 901 | if (success) |
900 | { | 902 | { |
901 | where = "safe"; | 903 | where = "safe"; |
@@ -1041,7 +1043,7 @@ namespace OpenSim.Services.LLLoginService | |||
1041 | 1043 | ||
1042 | } | 1044 | } |
1043 | 1045 | ||
1044 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason) | 1046 | private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, Constants.TeleportFlags flags, out string reason) |
1045 | { | 1047 | { |
1046 | EntityTransferContext ctx = new EntityTransferContext(); | 1048 | EntityTransferContext ctx = new EntityTransferContext(); |
1047 | 1049 | ||