mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
Merge branch 'master' into httptests
This commit is contained in:
@@ -320,13 +320,12 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
UUID targetID;
|
||||
UUID.TryParse(args[0], out targetID);
|
||||
|
||||
// Can't handle NPC yet...
|
||||
ScenePresence p = FindPresence(targetID);
|
||||
|
||||
if (null != p)
|
||||
ScenePresence p = FindPresence(targetID);
|
||||
if (p != null && p.isNPC)
|
||||
{
|
||||
if (p.PresenceType == PresenceType.Npc)
|
||||
return;
|
||||
remoteClient.SendAvatarClassifiedReply(new UUID(args[0]), new Dictionary<UUID, string>());
|
||||
return;
|
||||
}
|
||||
|
||||
string serverURI = string.Empty;
|
||||
@@ -575,10 +574,10 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
// Can't handle NPC yet...
|
||||
ScenePresence p = FindPresence(targetId);
|
||||
|
||||
if (null != p)
|
||||
if (p != null && p.isNPC)
|
||||
{
|
||||
if (p.PresenceType == PresenceType.Npc)
|
||||
return;
|
||||
remoteClient.SendAvatarPicksReply(new UUID(args[0]), new Dictionary<UUID, string>());
|
||||
return;
|
||||
}
|
||||
|
||||
string serverURI = string.Empty;
|
||||
@@ -860,6 +859,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
/// </param>
|
||||
public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes)
|
||||
{
|
||||
ScenePresence p = FindPresence(queryTargetID);
|
||||
if (p != null && p.isNPC)
|
||||
{
|
||||
remoteClient.SendAgentAlertMessage(
|
||||
"Notes for NPCs not available", false);
|
||||
return;
|
||||
}
|
||||
|
||||
UserProfileNotes note = new UserProfileNotes();
|
||||
|
||||
note.UserId = remoteClient.AgentId;
|
||||
@@ -1000,10 +1007,14 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
|
||||
// Can't handle NPC yet...
|
||||
ScenePresence p = FindPresence(avatarID);
|
||||
|
||||
if (null != p)
|
||||
if (p != null && p.isNPC)
|
||||
{
|
||||
if (p.PresenceType == PresenceType.Npc)
|
||||
return;
|
||||
remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, "5/25/1977",
|
||||
Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 16,
|
||||
UUID.Zero, UUID.Zero, "", UUID.Zero);
|
||||
remoteClient.SendAvatarInterestsReply(avatarID, 0, "",
|
||||
0, "Getting into trouble", "Droidspeak");
|
||||
return;
|
||||
}
|
||||
|
||||
string serverURI = string.Empty;
|
||||
|
||||
@@ -776,6 +776,8 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
else if (sp.Flying)
|
||||
teleportFlags |= (uint)TeleportFlags.IsFlying;
|
||||
|
||||
sp.IsInTransit = true;
|
||||
|
||||
if (DisableInterRegionTeleportCancellation)
|
||||
teleportFlags |= (uint)TeleportFlags.DisableCancel;
|
||||
|
||||
@@ -878,7 +880,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason);
|
||||
|
||||
sp.ControllingClient.SendTeleportFailed(reason);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -889,7 +891,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request",
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
else if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
|
||||
@@ -899,7 +901,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after CreateAgent due to previous client close.",
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -960,7 +962,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} before UpdateAgent",
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -977,7 +979,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after UpdateAgent due to previous client close.",
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -986,6 +988,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -998,7 +1001,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
CleanupFailedInterRegionTeleport(sp, currentAgentCircuit.SessionID.ToString(), finalDestination);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1035,7 +1038,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after WaitForAgentArrivedAtDestination due to previous client close.",
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1044,7 +1047,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.RegionInfo.RegionName);
|
||||
|
||||
Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Destination region did not signal teleport completion.");
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1093,6 +1096,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
Thread.Sleep(500);
|
||||
sp.Scene.CloseAgent(sp.UUID, false);
|
||||
}
|
||||
sp.IsInTransit = false;
|
||||
}
|
||||
|
||||
private void TransferAgent_V2(ScenePresence sp, AgentCircuitData agentCircuit, GridRegion reg, GridRegion finalDestination,
|
||||
@@ -1115,7 +1119,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.Name, sp.Scene.RegionInfo.RegionName, finalDestination.RegionName, reason);
|
||||
|
||||
sp.ControllingClient.SendTeleportFailed(reason);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1127,6 +1131,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
"[ENTITY TRANSFER MODULE]: Cancelled teleport of {0} to {1} from {2} after CreateAgent on client request",
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
else if (m_entityTransferStateMachine.GetAgentTransferState(sp.UUID) == AgentTransferState.Aborting)
|
||||
@@ -1137,6 +1142,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
"[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after CreateAgent due to previous client close.",
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1189,7 +1195,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
m_log.DebugFormat(
|
||||
"[ENTITY TRANSFER MODULE]: Aborted teleport of {0} to {1} from {2} after UpdateAgent due to previous client close.",
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1198,6 +1204,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.Name, finalDestination.RegionName, sp.Scene.Name);
|
||||
|
||||
Fail(sp, finalDestination, logout, currentAgentCircuit.SessionID.ToString(), "Connection between viewer and destination region could not be established.");
|
||||
sp.IsInTransit = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1255,6 +1262,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
|
||||
sp.Reset();
|
||||
}
|
||||
*/
|
||||
sp.IsInTransit = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -805,7 +805,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
return !userdata.IsUnknownUser;
|
||||
}
|
||||
|
||||
public virtual void AddUser(UUID uuid, string first, string last)
|
||||
public virtual void AddUser(UUID uuid, string first, string last, bool isNPC = false)
|
||||
{
|
||||
lock(m_UserCache)
|
||||
{
|
||||
@@ -816,7 +816,7 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement
|
||||
user.FirstName = first;
|
||||
user.LastName = last;
|
||||
user.IsUnknownUser = false;
|
||||
user.HasGridUserTried = false;
|
||||
user.HasGridUserTried = isNPC;
|
||||
m_UserCache.Add(uuid, user);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user