Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/ScenePresence.csavinationmerge
commit
1cc685e820
|
@ -250,6 +250,8 @@ namespace OpenSim
|
||||||
+ "If level <= 0 then no extra http logging is done.\n",
|
+ "If level <= 0 then no extra http logging is done.\n",
|
||||||
Debug);
|
Debug);
|
||||||
|
|
||||||
|
m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "debug scene",
|
m_console.Commands.AddCommand("region", false, "debug scene",
|
||||||
"debug scene <cripting> <collisions> <physics>",
|
"debug scene <cripting> <collisions> <physics>",
|
||||||
"Turn on scene debugging", Debug);
|
"Turn on scene debugging", Debug);
|
||||||
|
@ -948,6 +950,21 @@ namespace OpenSim
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "teleport":
|
||||||
|
foreach(Scene s in m_sceneManager.Scenes)
|
||||||
|
{
|
||||||
|
if (s.DEBUG)
|
||||||
|
{
|
||||||
|
s.DEBUG = false;
|
||||||
|
MainConsole.Instance.Output("Teleport debugging is disabled!");
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
s.DEBUG = true;
|
||||||
|
MainConsole.Instance.Output("Teleport debugging is enabled!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
MainConsole.Instance.Output("Unknown debug command");
|
MainConsole.Instance.Output("Unknown debug command");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -496,13 +496,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
||||||
string agentFriendService = string.Empty;
|
string agentFriendService = string.Empty;
|
||||||
string friendFriendService = string.Empty;
|
string friendFriendService = string.Empty;
|
||||||
|
|
||||||
if (agentIsLocal)
|
if (agentClient != null)
|
||||||
{
|
{
|
||||||
agentClientCircuit = ((Scene)(agentClient.Scene)).AuthenticateHandler.GetAgentCircuitData(agentClient.CircuitCode);
|
agentClientCircuit = ((Scene)(agentClient.Scene)).AuthenticateHandler.GetAgentCircuitData(agentClient.CircuitCode);
|
||||||
agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit);
|
agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit);
|
||||||
agentFriendService = agentClientCircuit.ServiceURLs["FriendsServerURI"].ToString();
|
agentFriendService = agentClientCircuit.ServiceURLs["FriendsServerURI"].ToString();
|
||||||
}
|
}
|
||||||
if (friendIsLocal)
|
if (friendClient != null)
|
||||||
{
|
{
|
||||||
friendClientCircuit = ((Scene)(friendClient.Scene)).AuthenticateHandler.GetAgentCircuitData(friendClient.CircuitCode);
|
friendClientCircuit = ((Scene)(friendClient.Scene)).AuthenticateHandler.GetAgentCircuitData(friendClient.CircuitCode);
|
||||||
friendUUI = Util.ProduceUserUniversalIdentifier(friendClientCircuit);
|
friendUUI = Util.ProduceUserUniversalIdentifier(friendClientCircuit);
|
||||||
|
|
|
@ -65,6 +65,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
#region Fields
|
#region Fields
|
||||||
|
|
||||||
public bool EmergencyMonitoring = false;
|
public bool EmergencyMonitoring = false;
|
||||||
|
public bool DEBUG = false;
|
||||||
|
|
||||||
public SynchronizeSceneHandler SynchronizeScene;
|
public SynchronizeSceneHandler SynchronizeScene;
|
||||||
public SimStatsReporter StatsReporter;
|
public SimStatsReporter StatsReporter;
|
||||||
|
@ -2652,7 +2653,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type);
|
sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type);
|
||||||
m_eventManager.TriggerOnNewPresence(sp);
|
m_eventManager.TriggerOnNewPresence(sp);
|
||||||
|
|
||||||
sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags;
|
sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags;
|
||||||
|
|
||||||
// The first agent upon login is a root agent by design.
|
// The first agent upon login is a root agent by design.
|
||||||
// For this agent we will have to rez the attachments.
|
// For this agent we will have to rez the attachments.
|
||||||
|
@ -3478,7 +3479,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
// Let the SP know how we got here. This has a lot of interesting
|
// Let the SP know how we got here. This has a lot of interesting
|
||||||
// uses down the line.
|
// uses down the line.
|
||||||
sp.TeleportFlags = (TeleportFlags)teleportFlags;
|
sp.TeleportFlags = (TPFlags)teleportFlags;
|
||||||
|
|
||||||
if (sp.IsChildAgent)
|
if (sp.IsChildAgent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,6 +40,7 @@ using OpenSim.Region.Framework.Scenes.Types;
|
||||||
using OpenSim.Region.Physics.Manager;
|
using OpenSim.Region.Physics.Manager;
|
||||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||||
using OpenSim.Services.Interfaces;
|
using OpenSim.Services.Interfaces;
|
||||||
|
using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Scenes
|
namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
|
@ -3845,27 +3846,13 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
|
||||||
private void CheckAndAdjustLandingPoint(ref Vector3 pos)
|
private void CheckAndAdjustLandingPoint(ref Vector3 pos)
|
||||||
{
|
{
|
||||||
// // Some temporary debugging help to show all the TeleportFlags we have...
|
|
||||||
// bool HG = false;
|
|
||||||
// if((m_teleportFlags & (TeleportFlags)Constants.TeleportFlags.ViaHGLogin) == (TeleportFlags)Constants.TeleportFlags.ViaHGLogin)
|
|
||||||
// HG = true;
|
|
||||||
//
|
|
||||||
// m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
|
|
||||||
//
|
|
||||||
// for (uint i = 0; i <= 30 ; i++)
|
|
||||||
// {
|
|
||||||
// if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i)
|
|
||||||
// if (HG == false)
|
|
||||||
// m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString());
|
|
||||||
// else
|
|
||||||
// m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString());
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
|
|
||||||
|
|
||||||
ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
|
ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
|
||||||
if (land != null)
|
if (land != null)
|
||||||
{
|
{
|
||||||
|
if (Scene.DEBUG)
|
||||||
|
TeleportFlagsDebug();
|
||||||
|
|
||||||
// If we come in via login, landmark or map, we want to
|
// If we come in via login, landmark or map, we want to
|
||||||
// honor landing points. If we come in via Lure, we want
|
// honor landing points. If we come in via Lure, we want
|
||||||
// to ignore them.
|
// to ignore them.
|
||||||
|
@ -4054,5 +4041,30 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TeleportFlagsDebug() {
|
||||||
|
|
||||||
|
// Some temporary debugging help to show all the TeleportFlags we have...
|
||||||
|
bool HG = false;
|
||||||
|
if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin)
|
||||||
|
HG = true;
|
||||||
|
|
||||||
|
m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
|
||||||
|
|
||||||
|
uint i = 0u;
|
||||||
|
for (int x = 0; x <= 30 ; x++, i = 1u << x)
|
||||||
|
{
|
||||||
|
i = 1u << x;
|
||||||
|
|
||||||
|
if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i)
|
||||||
|
if (HG == false)
|
||||||
|
m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString());
|
||||||
|
else
|
||||||
|
m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
@ -124,6 +125,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
+ "\nIf the viewer has not yet sent the server any texture ids then nothing will happen"
|
+ "\nIf the viewer has not yet sent the server any texture ids then nothing will happen"
|
||||||
+ "\nsince requests can only be made for ids that the client has already sent us",
|
+ "\nsince requests can only be made for ids that the client has already sent us",
|
||||||
HandleRebakeAppearanceCommand);
|
HandleRebakeAppearanceCommand);
|
||||||
|
|
||||||
|
scene.AddCommand(
|
||||||
|
this, "appearance find",
|
||||||
|
"appearance find <uuid-or-start-of-uuid>",
|
||||||
|
"Find out which avatar uses the given asset as a baked texture, if any.",
|
||||||
|
"You can specify just the beginning of the uuid, e.g. 2008a8d. A longer UUID must be in dashed format.",
|
||||||
|
HandleFindAppearanceCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleSendAppearanceCommand(string module, string[] cmd)
|
private void HandleSendAppearanceCommand(string module, string[] cmd)
|
||||||
|
@ -254,5 +262,47 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void HandleFindAppearanceCommand(string module, string[] cmd)
|
||||||
|
{
|
||||||
|
if (cmd.Length != 3)
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat("Usage: appearance find <uuid-or-start-of-uuid>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string rawUuid = cmd[2];
|
||||||
|
|
||||||
|
HashSet<ScenePresence> matchedAvatars = new HashSet<ScenePresence>();
|
||||||
|
|
||||||
|
lock (m_scenes)
|
||||||
|
{
|
||||||
|
foreach (Scene scene in m_scenes.Values)
|
||||||
|
{
|
||||||
|
scene.ForEachRootScenePresence(
|
||||||
|
sp =>
|
||||||
|
{
|
||||||
|
Dictionary<BakeType, Primitive.TextureEntryFace> bakedFaces = scene.AvatarFactory.GetBakedTextureFaces(sp.UUID);
|
||||||
|
foreach (Primitive.TextureEntryFace face in bakedFaces.Values)
|
||||||
|
{
|
||||||
|
if (face != null && face.TextureID.ToString().StartsWith(rawUuid))
|
||||||
|
matchedAvatars.Add(sp);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (matchedAvatars.Count == 0)
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat("{0} did not match any baked avatar textures in use", rawUuid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MainConsole.Instance.OutputFormat(
|
||||||
|
"{0} matched {1}",
|
||||||
|
rawUuid,
|
||||||
|
string.Join(", ", matchedAvatars.ToList().ConvertAll<string>(sp => sp.Name).ToArray()));
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -36,6 +36,12 @@
|
||||||
|
|
||||||
|
|
||||||
[Startup]
|
[Startup]
|
||||||
|
|
||||||
|
;# {DEBUG} {} {Turn on debugging methods. Temporary for debugging teleport routing. We can remove it when that is done, or leave it if it would prove to be useful for other things.} {true false} false
|
||||||
|
;; Turn on debugging methods where available.
|
||||||
|
;; from the selected region_info_source.
|
||||||
|
; DEBUG = false
|
||||||
|
|
||||||
;# {ConsolePrompt} {} {ConsolePrompt} {} "Region (\R) "
|
;# {ConsolePrompt} {} {ConsolePrompt} {} "Region (\R) "
|
||||||
;; Console prompt
|
;; Console prompt
|
||||||
;; Certain special characters can be used to customize the prompt
|
;; Certain special characters can be used to customize the prompt
|
||||||
|
|
Loading…
Reference in New Issue