aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs4
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs2
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneManager.cs9
-rw-r--r--OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs2
5 files changed, 24 insertions, 17 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index c877aad..93d56bc 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -555,11 +555,11 @@ namespace OpenSim
555 int newDebug; 555 int newDebug;
556 if (int.TryParse(args[1], out newDebug)) 556 if (int.TryParse(args[1], out newDebug))
557 { 557 {
558 m_sceneManager.SetDebugPacketOnCurrentScene(newDebug); 558 m_sceneManager.SetDebugPacketLevelOnCurrentScene(newDebug);
559 } 559 }
560 else 560 else
561 { 561 {
562 m_console.Error("packet debug should be 0..2"); 562 m_console.Error("packet debug should be 0..255");
563 } 563 }
564 m_console.Notice("New packet debug: " + newDebug.ToString()); 564 m_console.Notice("New packet debug: " + newDebug.ToString());
565 } 565 }
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index e1c02e9..476b3d5 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -67,7 +67,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
67 private readonly UUID m_sessionId; 67 private readonly UUID m_sessionId;
68 private UUID m_secureSessionId = UUID.Zero; 68 private UUID m_secureSessionId = UUID.Zero;
69 //private AgentAssetUpload UploadAssets; 69 //private AgentAssetUpload UploadAssets;
70 private int m_debug = 0; 70
71 private int m_debugPacketLevel = 0;
72
71 private readonly AssetCache m_assetCache; 73 private readonly AssetCache m_assetCache;
72 // private InventoryCache m_inventoryCache; 74 // private InventoryCache m_inventoryCache;
73 private int m_cachedTextureSerial = 0; 75 private int m_cachedTextureSerial = 0;
@@ -447,9 +449,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
447 ThreadTracker.Add(m_clientThread); 449 ThreadTracker.Add(m_clientThread);
448 } 450 }
449 451
450 public void SetDebug(int newDebug) 452 public void SetDebugPacketLevel(int newDebugPacketLevel)
451 { 453 {
452 m_debug = newDebug; 454 m_debugPacketLevel = newDebugPacketLevel;
453 } 455 }
454 456
455 # region Client Methods 457 # region Client Methods
@@ -632,23 +634,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
632 634
633 protected void DebugPacket(string direction, Packet packet) 635 protected void DebugPacket(string direction, Packet packet)
634 { 636 {
635 if (m_debug > 0) 637 if (m_debugPacketLevel > 0)
636 { 638 {
637 string info = String.Empty; 639 string info = String.Empty;
638 640
639 if (m_debug < 255 && packet.Type == PacketType.AgentUpdate) 641 if (m_debugPacketLevel < 255 && packet.Type == PacketType.AgentUpdate)
640 return; 642 return;
641 if (m_debug < 254 && packet.Type == PacketType.ViewerEffect) 643 if (m_debugPacketLevel < 254 && packet.Type == PacketType.ViewerEffect)
642 return; 644 return;
643 if (m_debug < 253 && ( 645 if (m_debugPacketLevel < 253 && (
644 packet.Type == PacketType.CompletePingCheck || 646 packet.Type == PacketType.CompletePingCheck ||
645 packet.Type == PacketType.StartPingCheck 647 packet.Type == PacketType.StartPingCheck
646 )) 648 ))
647 return; 649 return;
648 if (m_debug < 252 && packet.Type == PacketType.PacketAck) 650 if (m_debugPacketLevel < 252 && packet.Type == PacketType.PacketAck)
649 return; 651 return;
650 652
651 if (m_debug > 1) 653 if (m_debugPacketLevel > 1)
652 { 654 {
653 info = packet.ToString(); 655 info = packet.ToString();
654 } 656 }
@@ -2348,7 +2350,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2348 Vector3 velocity, Quaternion rotation) 2350 Vector3 velocity, Quaternion rotation)
2349 { 2351 {
2350 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0) 2352 if (rotation.X == rotation.Y && rotation.Y == rotation.Z && rotation.Z == rotation.W && rotation.W == 0)
2351 rotation = Quaternion.Identity; 2353 rotation = Quaternion.Identity;
2352 2354
2353 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock = 2355 ImprovedTerseObjectUpdatePacket.ObjectDataBlock terseBlock =
2354 CreateAvatarImprovedBlock(localID, position, velocity, rotation); 2356 CreateAvatarImprovedBlock(localID, position, velocity, rotation);
@@ -2360,8 +2362,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2360 terse.ObjectData[0] = terseBlock; 2362 terse.ObjectData[0] = terseBlock;
2361 2363
2362 terse.Header.Reliable = false; 2364 terse.Header.Reliable = false;
2363
2364 terse.Header.Zerocoded = true; 2365 terse.Header.Zerocoded = true;
2366
2365 OutPacket(terse, ThrottleOutPacketType.Task); 2367 OutPacket(terse, ThrottleOutPacketType.Task);
2366 } 2368 }
2367 2369
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index 35a6c2f..0143f2c 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -758,7 +758,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
758 { 758 {
759 } 759 }
760 760
761 public void SetDebug(int newDebug) 761 public void SetDebugPacketLevel(int newDebug)
762 { 762 {
763 } 763 }
764 764
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs
index 472f446..2af31d6 100644
--- a/OpenSim/Region/Environment/Scenes/SceneManager.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs
@@ -394,7 +394,12 @@ namespace OpenSim.Region.Environment.Scenes
394 return false; 394 return false;
395 } 395 }
396 396
397 public void SetDebugPacketOnCurrentScene(int newDebug) 397 /// <summary>
398 /// Set the debug packet level on the current scene. This level governs which packets are printed out to the
399 /// console.
400 /// </summary>
401 /// <param name="newDebug"></param>
402 public void SetDebugPacketLevelOnCurrentScene(int newDebug)
398 { 403 {
399 ForEachCurrentScene(delegate(Scene scene) 404 ForEachCurrentScene(delegate(Scene scene)
400 { 405 {
@@ -409,7 +414,7 @@ namespace OpenSim.Region.Environment.Scenes
409 scenePresence.Lastname, 414 scenePresence.Lastname,
410 newDebug); 415 newDebug);
411 416
412 scenePresence.ControllingClient.SetDebug(newDebug); 417 scenePresence.ControllingClient.SetDebugPacketLevel(newDebug);
413 } 418 }
414 } 419 }
415 }); 420 });
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
index 88de006..0be726d 100644
--- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
+++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs
@@ -746,7 +746,7 @@ namespace OpenSim.Region.Examples.SimpleModule
746 { 746 {
747 } 747 }
748 748
749 public void SetDebug(int newDebug) 749 public void SetDebugPacketLevel(int newDebug)
750 { 750 {
751 } 751 }
752 752