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 pointviewer-2-initial-appearance
parent
2bab8e5538
commit
61b67b2ead
|
@ -320,7 +320,8 @@ namespace OpenSim.Services.LLLoginService
|
||||||
Vector3 position = Vector3.Zero;
|
Vector3 position = Vector3.Zero;
|
||||||
Vector3 lookAt = Vector3.Zero;
|
Vector3 lookAt = Vector3.Zero;
|
||||||
GridRegion gatekeeper = null;
|
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)
|
if (destination == null)
|
||||||
{
|
{
|
||||||
m_PresenceService.LogoutAgent(session);
|
m_PresenceService.LogoutAgent(session);
|
||||||
|
@ -343,7 +344,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
string reason = string.Empty;
|
string reason = string.Empty;
|
||||||
GridRegion dest;
|
GridRegion dest;
|
||||||
AgentCircuitData aCircuit = LaunchAgentAtGrid(gatekeeper, destination, account, avatar, session, secureSession, position, where,
|
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;
|
destination = dest;
|
||||||
if (aCircuit == null)
|
if (aCircuit == null)
|
||||||
{
|
{
|
||||||
|
@ -378,8 +379,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);
|
m_log.DebugFormat("[LLOGIN SERVICE]: FindDestination for start location {0}", startLocation);
|
||||||
|
|
||||||
gatekeeper = null;
|
gatekeeper = null;
|
||||||
|
@ -473,6 +476,8 @@ namespace OpenSim.Services.LLLoginService
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
flags |= TeleportFlags.ViaRegionID;
|
||||||
|
|
||||||
// free uri form
|
// free uri form
|
||||||
// e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34
|
// e.g. New Moon&135&46 New Moon@osgrid.org:8002&153&34
|
||||||
where = "url";
|
where = "url";
|
||||||
|
@ -624,7 +629,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
|
|
||||||
protected AgentCircuitData LaunchAgentAtGrid(GridRegion gatekeeper, GridRegion destination, UserAccount account, AvatarAppearance avatar,
|
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,
|
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;
|
where = currentWhere;
|
||||||
ISimulationService simConnector = null;
|
ISimulationService simConnector = null;
|
||||||
|
@ -663,7 +668,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
{
|
{
|
||||||
circuitCode = (uint)Util.RandomClass.Next(); ;
|
circuitCode = (uint)Util.RandomClass.Next(); ;
|
||||||
aCircuit = MakeAgent(destination, account, avatar, session, secureSession, circuitCode, position, clientIP.Address.ToString(), viewer, channel, mac, id0);
|
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)
|
if (!success && m_GridService != null)
|
||||||
{
|
{
|
||||||
// Try the fallback regions
|
// Try the fallback regions
|
||||||
|
@ -672,7 +677,7 @@ namespace OpenSim.Services.LLLoginService
|
||||||
{
|
{
|
||||||
foreach (GridRegion r in fallbacks)
|
foreach (GridRegion r in fallbacks)
|
||||||
{
|
{
|
||||||
success = LaunchAgentDirectly(simConnector, r, aCircuit, out reason);
|
success = LaunchAgentDirectly(simConnector, r, aCircuit, flags | TeleportFlags.ViaRegionID, out reason);
|
||||||
if (success)
|
if (success)
|
||||||
{
|
{
|
||||||
where = "safe";
|
where = "safe";
|
||||||
|
@ -795,9 +800,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)
|
private bool LaunchAgentIndirectly(GridRegion gatekeeper, GridRegion destination, AgentCircuitData aCircuit, IPEndPoint clientIP, out string reason)
|
||||||
|
|
Loading…
Reference in New Issue