Add TeleportFlags.ViaRegionID to the flags sent on login when the region
was entered by hand to determine whether or not to honor the landing pointavinationmerge
parent
0e1d28a862
commit
3b8b606eeb
|
@ -327,7 +327,8 @@ namespace OpenSim.Services.LLLoginService
|
|||
Vector3 position = Vector3.Zero;
|
||||
Vector3 lookAt = Vector3.Zero;
|
||||
GridRegion gatekeeper = null;
|
||||
GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt);
|
||||
TeleportFlags flags;
|
||||
GridRegion destination = FindDestination(account, scopeID, guinfo, session, startLocation, home, out gatekeeper, out where, out position, out lookAt, out flags);
|
||||
if (destination == null)
|
||||
{
|
||||
m_PresenceService.LogoutAgent(session);
|
||||
|
@ -350,7 +351,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
string reason = string.Empty;
|
||||
GridRegion dest;
|
||||
AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
|
||||
clientVersion, channel, mac, id0, clientIP, out where, out reason, out dest);
|
||||
clientVersion, channel, mac, id0, clientIP, flags, out where, out reason, out dest);
|
||||
destination = dest;
|
||||
if (aCircuit == null)
|
||||
{
|
||||
|
@ -385,8 +386,10 @@ namespace OpenSim.Services.LLLoginService
|
|||
}
|
||||
}
|
||||
|
||||
protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt)
|
||||
protected GridRegion FindDestination(UserAccount account, UUID scopeID, GridUserInfo pinfo, UUID sessionID, string startLocation, GridRegion home, out GridRegion gatekeeper, out string where, out Vector3 position, out Vector3 lookAt, out TeleportFlags flags)
|
||||
{
|
||||
flags = TeleportFlags.ViaLogin;
|
||||
|
||||
m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation);
|
||||
|
||||
gatekeeper = null;
|
||||
|
@ -480,6 +483,8 @@ namespace OpenSim.Services.LLLoginService
|
|||
}
|
||||
else
|
||||
{
|
||||
flags |= TeleportFlags.ViaRegionID;
|
||||
|
||||
// free uri form
|
||||
// e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34
|
||||
where = "url";
|
||||
|
@ -631,7 +636,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
|
||||
protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar,
|
||||
UUID session, UUID secureSession, Vector3 position, string currentWhere, string viewer, string channel, string mac, string id0,
|
||||
IPEndPoint clientIP, out string where, out string reason, out GridRegion dest)
|
||||
IPEndPoint clientIP, TeleportFlags flags, out string where, out string reason, out GridRegion dest)
|
||||
{
|
||||
where = currentWhere;
|
||||
ISimulationService simConnector = null;
|
||||
|
@ -670,7 +675,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
{
|
||||
circuitCode = (uint)Util.RandomClass.Next(); ;
|
||||
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
|
||||
success = LaunchAgentDirectly(simConnector, destination, aCircuit, out reason);
|
||||
success = LaunchAgentDirectly(simConnector, destination, aCircuit, flags, out reason);
|
||||
if (!success && m_GridService != null)
|
||||
{
|
||||
// Try the fallback regions
|
||||
|
@ -679,7 +684,7 @@ namespace OpenSim.Services.LLLoginService
|
|||
{
|
||||
foreach (GridRegion r in fallbacks)
|
||||
{
|
||||
success = LaunchAgentDirectly(simConnector, r, aCircuit, out reason);
|
||||
success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | TeleportFlags.ViaRegionID, out reason);
|
||||
if (success)
|
||||
{
|
||||
where = "safe";
|
||||
|
@ -802,9 +807,9 @@ namespace OpenSim.Services.LLLoginService
|
|||
|
||||
}
|
||||
|
||||
private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, out string reason)
|
||||
private bool LaunchAgentDirectly(ISimulationService simConnector, GridRegion region, AgentCircuitData aCircuit, TeleportFlags flags, out string reason)
|
||||
{
|
||||
return simConnector.CreateAgent(region, aCircuit, (int)Constants.TeleportFlags.ViaLogin, out reason);
|
||||
return simConnector.CreateAgent(region, aCircuit, (uint)flags, out reason);
|
||||
}
|
||||
|
||||
private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)
|
||||
|
|
Loading…
Reference in New Issue