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",
|
||||
Debug);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
|
||||
|
||||
m_console.Commands.AddCommand("region", false, "debug scene",
|
||||
"debug scene <cripting> <collisions> <physics>",
|
||||
"Turn on scene debugging", Debug);
|
||||
|
@ -948,6 +950,21 @@ namespace OpenSim
|
|||
|
||||
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:
|
||||
MainConsole.Instance.Output("Unknown debug command");
|
||||
break;
|
||||
|
|
|
@ -496,13 +496,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
|
|||
string agentFriendService = string.Empty;
|
||||
string friendFriendService = string.Empty;
|
||||
|
||||
if (agentIsLocal)
|
||||
if (agentClient != null)
|
||||
{
|
||||
agentClientCircuit = ((Scene)(agentClient.Scene)).AuthenticateHandler.GetAgentCircuitData(agentClient.CircuitCode);
|
||||
agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit);
|
||||
agentFriendService = agentClientCircuit.ServiceURLs["FriendsServerURI"].ToString();
|
||||
}
|
||||
if (friendIsLocal)
|
||||
if (friendClient != null)
|
||||
{
|
||||
friendClientCircuit = ((Scene)(friendClient.Scene)).AuthenticateHandler.GetAgentCircuitData(friendClient.CircuitCode);
|
||||
friendUUI = Util.ProduceUserUniversalIdentifier(friendClientCircuit);
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
#region Fields
|
||||
|
||||
public bool EmergencyMonitoring = false;
|
||||
public bool DEBUG = false;
|
||||
|
||||
public SynchronizeSceneHandler SynchronizeScene;
|
||||
public SimStatsReporter StatsReporter;
|
||||
|
@ -2652,7 +2653,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type);
|
||||
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.
|
||||
// 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
|
||||
// uses down the line.
|
||||
sp.TeleportFlags = (TeleportFlags)teleportFlags;
|
||||
sp.TeleportFlags = (TPFlags)teleportFlags;
|
||||
|
||||
if (sp.IsChildAgent)
|
||||
{
|
||||
|
|
|
@ -40,6 +40,7 @@ using OpenSim.Region.Framework.Scenes.Types;
|
|||
using OpenSim.Region.Physics.Manager;
|
||||
using GridRegion = OpenSim.Services.Interfaces.GridRegion;
|
||||
using OpenSim.Services.Interfaces;
|
||||
using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
|
||||
|
||||
namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
|
@ -3845,27 +3846,13 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
|
||||
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);
|
||||
if (land != null)
|
||||
{
|
||||
if (Scene.DEBUG)
|
||||
TeleportFlagsDebug();
|
||||
|
||||
// If we come in via login, landmark or map, we want to
|
||||
// honor landing points. If we come in via Lure, we want
|
||||
// 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.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
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"
|
||||
+ "\nsince requests can only be made for ids that the client has already sent us",
|
||||
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)
|
||||
|
@ -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]
|
||||
|
||||
;# {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) "
|
||||
;; Console prompt
|
||||
;; Certain special characters can be used to customize the prompt
|
||||
|
|
Loading…
Reference in New Issue