aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-01-10 18:33:32 +0000
committerMelanie2012-01-10 18:33:32 +0000
commit1cc685e820b0b2979098f3a63d8e7dd532fc7c6f (patch)
tree9d80fe3f7b9cf23aed9c97fdef37a706940d1f2c /OpenSim
parentMerge branch 'master' into careminster (diff)
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-1cc685e820b0b2979098f3a63d8e7dd532fc7c6f.zip
opensim-SC_OLD-1cc685e820b0b2979098f3a63d8e7dd532fc7c6f.tar.gz
opensim-SC_OLD-1cc685e820b0b2979098f3a63d8e7dd532fc7c6f.tar.bz2
opensim-SC_OLD-1cc685e820b0b2979098f3a63d8e7dd532fc7c6f.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/ScenePresence.cs
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs17
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs46
-rw-r--r--OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs50
5 files changed, 101 insertions, 21 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index a1bdfb9..adf653a 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -250,6 +250,8 @@ namespace OpenSim
250 + "If level <= 0 then no extra http logging is done.\n", 250 + "If level <= 0 then no extra http logging is done.\n",
251 Debug); 251 Debug);
252 252
253 m_console.Commands.AddCommand("region", false, "debug teleport", "debug teleport", "Toggle teleport route debugging", Debug);
254
253 m_console.Commands.AddCommand("region", false, "debug scene", 255 m_console.Commands.AddCommand("region", false, "debug scene",
254 "debug scene <cripting> <collisions> <physics>", 256 "debug scene <cripting> <collisions> <physics>",
255 "Turn on scene debugging", Debug); 257 "Turn on scene debugging", Debug);
@@ -948,6 +950,21 @@ namespace OpenSim
948 950
949 break; 951 break;
950 952
953 case "teleport":
954 foreach(Scene s in m_sceneManager.Scenes)
955 {
956 if (s.DEBUG)
957 {
958 s.DEBUG = false;
959 MainConsole.Instance.Output("Teleport debugging is disabled!");
960 }
961 else{
962 s.DEBUG = true;
963 MainConsole.Instance.Output("Teleport debugging is enabled!");
964 }
965 }
966 break;
967
951 default: 968 default:
952 MainConsole.Instance.Output("Unknown debug command"); 969 MainConsole.Instance.Output("Unknown debug command");
953 break; 970 break;
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
index a77646c..9c53fc4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/HGFriendsModule.cs
@@ -496,13 +496,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
496 string agentFriendService = string.Empty; 496 string agentFriendService = string.Empty;
497 string friendFriendService = string.Empty; 497 string friendFriendService = string.Empty;
498 498
499 if (agentIsLocal) 499 if (agentClient != null)
500 { 500 {
501 agentClientCircuit = ((Scene)(agentClient.Scene)).AuthenticateHandler.GetAgentCircuitData(agentClient.CircuitCode); 501 agentClientCircuit = ((Scene)(agentClient.Scene)).AuthenticateHandler.GetAgentCircuitData(agentClient.CircuitCode);
502 agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit); 502 agentUUI = Util.ProduceUserUniversalIdentifier(agentClientCircuit);
503 agentFriendService = agentClientCircuit.ServiceURLs["FriendsServerURI"].ToString(); 503 agentFriendService = agentClientCircuit.ServiceURLs["FriendsServerURI"].ToString();
504 } 504 }
505 if (friendIsLocal) 505 if (friendClient != null)
506 { 506 {
507 friendClientCircuit = ((Scene)(friendClient.Scene)).AuthenticateHandler.GetAgentCircuitData(friendClient.CircuitCode); 507 friendClientCircuit = ((Scene)(friendClient.Scene)).AuthenticateHandler.GetAgentCircuitData(friendClient.CircuitCode);
508 friendUUI = Util.ProduceUserUniversalIdentifier(friendClientCircuit); 508 friendUUI = Util.ProduceUserUniversalIdentifier(friendClientCircuit);
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 4de494f..fc1e85a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -65,6 +65,7 @@ namespace OpenSim.Region.Framework.Scenes
65 #region Fields 65 #region Fields
66 66
67 public bool EmergencyMonitoring = false; 67 public bool EmergencyMonitoring = false;
68 public bool DEBUG = false;
68 69
69 public SynchronizeSceneHandler SynchronizeScene; 70 public SynchronizeSceneHandler SynchronizeScene;
70 public SimStatsReporter StatsReporter; 71 public SimStatsReporter StatsReporter;
@@ -2652,7 +2653,7 @@ namespace OpenSim.Region.Framework.Scenes
2652 sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type); 2653 sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance, type);
2653 m_eventManager.TriggerOnNewPresence(sp); 2654 m_eventManager.TriggerOnNewPresence(sp);
2654 2655
2655 sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags; 2656 sp.TeleportFlags = (TPFlags)aCircuit.teleportFlags;
2656 2657
2657 // The first agent upon login is a root agent by design. 2658 // The first agent upon login is a root agent by design.
2658 // For this agent we will have to rez the attachments. 2659 // For this agent we will have to rez the attachments.
@@ -3478,7 +3479,7 @@ namespace OpenSim.Region.Framework.Scenes
3478 { 3479 {
3479 // Let the SP know how we got here. This has a lot of interesting 3480 // Let the SP know how we got here. This has a lot of interesting
3480 // uses down the line. 3481 // uses down the line.
3481 sp.TeleportFlags = (TeleportFlags)teleportFlags; 3482 sp.TeleportFlags = (TPFlags)teleportFlags;
3482 3483
3483 if (sp.IsChildAgent) 3484 if (sp.IsChildAgent)
3484 { 3485 {
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 635bca7..9f9536a 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -40,6 +40,7 @@ using OpenSim.Region.Framework.Scenes.Types;
40using OpenSim.Region.Physics.Manager; 40using OpenSim.Region.Physics.Manager;
41using GridRegion = OpenSim.Services.Interfaces.GridRegion; 41using GridRegion = OpenSim.Services.Interfaces.GridRegion;
42using OpenSim.Services.Interfaces; 42using OpenSim.Services.Interfaces;
43using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
43 44
44namespace OpenSim.Region.Framework.Scenes 45namespace OpenSim.Region.Framework.Scenes
45{ 46{
@@ -3845,27 +3846,13 @@ namespace OpenSim.Region.Framework.Scenes
3845 3846
3846 private void CheckAndAdjustLandingPoint(ref Vector3 pos) 3847 private void CheckAndAdjustLandingPoint(ref Vector3 pos)
3847 { 3848 {
3848// // Some temporary debugging help to show all the TeleportFlags we have...
3849// bool HG = false;
3850// if((m_teleportFlags & (TeleportFlags)Constants.TeleportFlags.ViaHGLogin) == (TeleportFlags)Constants.TeleportFlags.ViaHGLogin)
3851// HG = true;
3852//
3853// m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
3854//
3855// for (uint i = 0; i <= 30 ; i++)
3856// {
3857// if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i)
3858// if (HG == false)
3859// m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString());
3860// else
3861// m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString());
3862// }
3863//
3864// m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
3865 3849
3866 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); 3850 ILandObject land = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
3867 if (land != null) 3851 if (land != null)
3868 { 3852 {
3853 if (Scene.DEBUG)
3854 TeleportFlagsDebug();
3855
3869 // If we come in via login, landmark or map, we want to 3856 // If we come in via login, landmark or map, we want to
3870 // honor landing points. If we come in via Lure, we want 3857 // honor landing points. If we come in via Lure, we want
3871 // to ignore them. 3858 // to ignore them.
@@ -4054,5 +4041,30 @@ namespace OpenSim.Region.Framework.Scenes
4054 } 4041 }
4055 }); 4042 });
4056 } 4043 }
4044
4045 private void TeleportFlagsDebug() {
4046
4047 // Some temporary debugging help to show all the TeleportFlags we have...
4048 bool HG = false;
4049 if((m_teleportFlags & TeleportFlags.ViaHGLogin) == TeleportFlags.ViaHGLogin)
4050 HG = true;
4051
4052 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
4053
4054 uint i = 0u;
4055 for (int x = 0; x <= 30 ; x++, i = 1u << x)
4056 {
4057 i = 1u << x;
4058
4059 if((m_teleportFlags & (TeleportFlags)i) == (TeleportFlags)i)
4060 if (HG == false)
4061 m_log.InfoFormat("[SCENE PRESENCE]: Teleport Flags include {0}", ((TeleportFlags) i).ToString());
4062 else
4063 m_log.InfoFormat("[SCENE PRESENCE]: HG Teleport Flags include {0}", ((TeleportFlags)i).ToString());
4064 }
4065
4066 m_log.InfoFormat("[SCENE PRESENCE]: TELEPORT ******************");
4067
4068 }
4057 } 4069 }
4058} 4070}
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
index 39cd4c9..2369d94 100644
--- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
+++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Linq;
30using System.Reflection; 31using System.Reflection;
31using System.Text; 32using System.Text;
32using log4net; 33using log4net;
@@ -124,6 +125,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
124 + "\nIf the viewer has not yet sent the server any texture ids then nothing will happen" 125 + "\nIf the viewer has not yet sent the server any texture ids then nothing will happen"
125 + "\nsince requests can only be made for ids that the client has already sent us", 126 + "\nsince requests can only be made for ids that the client has already sent us",
126 HandleRebakeAppearanceCommand); 127 HandleRebakeAppearanceCommand);
128
129 scene.AddCommand(
130 this, "appearance find",
131 "appearance find <uuid-or-start-of-uuid>",
132 "Find out which avatar uses the given asset as a baked texture, if any.",
133 "You can specify just the beginning of the uuid, e.g. 2008a8d. A longer UUID must be in dashed format.",
134 HandleFindAppearanceCommand);
127 } 135 }
128 136
129 private void HandleSendAppearanceCommand(string module, string[] cmd) 137 private void HandleSendAppearanceCommand(string module, string[] cmd)
@@ -254,5 +262,47 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance
254 } 262 }
255 } 263 }
256 } 264 }
265
266 protected void HandleFindAppearanceCommand(string module, string[] cmd)
267 {
268 if (cmd.Length != 3)
269 {
270 MainConsole.Instance.OutputFormat("Usage: appearance find <uuid-or-start-of-uuid>");
271 return;
272 }
273
274 string rawUuid = cmd[2];
275
276 HashSet<ScenePresence> matchedAvatars = new HashSet<ScenePresence>();
277
278 lock (m_scenes)
279 {
280 foreach (Scene scene in m_scenes.Values)
281 {
282 scene.ForEachRootScenePresence(
283 sp =>
284 {
285 Dictionary<BakeType, Primitive.TextureEntryFace> bakedFaces = scene.AvatarFactory.GetBakedTextureFaces(sp.UUID);
286 foreach (Primitive.TextureEntryFace face in bakedFaces.Values)
287 {
288 if (face != null && face.TextureID.ToString().StartsWith(rawUuid))
289 matchedAvatars.Add(sp);
290 }
291 });
292 }
293 }
294
295 if (matchedAvatars.Count == 0)
296 {
297 MainConsole.Instance.OutputFormat("{0} did not match any baked avatar textures in use", rawUuid);
298 }
299 else
300 {
301 MainConsole.Instance.OutputFormat(
302 "{0} matched {1}",
303 rawUuid,
304 string.Join(", ", matchedAvatars.ToList().ConvertAll<string>(sp => sp.Name).ToArray()));
305 }
306 }
257 } 307 }
258} \ No newline at end of file 308} \ No newline at end of file