aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MySQL/MySQLGenericTableHandler.cs4
-rw-r--r--OpenSim/Data/MySQL/MySQLInventoryData.cs27
-rw-r--r--OpenSim/Framework/PrimitiveBaseShape.cs2
-rw-r--r--OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs2
-rw-r--r--OpenSim/Framework/Tests/ACLTest.cs29
-rw-r--r--OpenSim/Framework/Tests/CacheTests.cs31
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs783
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs23
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs109
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs8
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs8
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs6
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs8
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs31
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs29
-rw-r--r--OpenSim/Region/CoreModules/World/Land/LandObject.cs2
-rw-r--r--OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs16
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs26
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs55
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs107
-rw-r--r--OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs4
-rw-r--r--OpenSim/Region/Physics/OdePlugin/ODEPrim.cs42
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdePlugin.cs13
-rw-r--r--OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs20
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs24
-rw-r--r--OpenSim/Services/InventoryService/InventoryService.cs1
-rw-r--r--OpenSim/Tests/Common/Mock/MockUserService.cs2
-rw-r--r--OpenSim/Tests/Common/Setup/AssetHelpers.cs2
-rw-r--r--OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs2
47 files changed, 1672 insertions, 170 deletions
diff --git a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
index 4e27e26..2f5937d 100644
--- a/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
+++ b/OpenSim/Data/MySQL/MySQLGenericTableHandler.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Data.MySQL
135 135
136 List<T> result = new List<T>(); 136 List<T> result = new List<T>();
137 137
138 while(reader.Read()) 138 while (reader.Read())
139 { 139 {
140 T row = new T(); 140 T row = new T();
141 141
@@ -146,7 +146,7 @@ namespace OpenSim.Data.MySQL
146 int v = Convert.ToInt32(reader[name]); 146 int v = Convert.ToInt32(reader[name]);
147 m_Fields[name].SetValue(row, v != 0 ? true : false); 147 m_Fields[name].SetValue(row, v != 0 ? true : false);
148 } 148 }
149 else if(m_Fields[name].GetValue(row) is UUID) 149 else if (m_Fields[name].GetValue(row) is UUID)
150 { 150 {
151 UUID uuid = UUID.Zero; 151 UUID uuid = UUID.Zero;
152 152
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs
index 0eecf06..063dd91 100644
--- a/OpenSim/Data/MySQL/MySQLInventoryData.cs
+++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs
@@ -48,6 +48,10 @@ namespace OpenSim.Data.MySQL
48 /// </summary> 48 /// </summary>
49 private MySQLManager database; 49 private MySQLManager database;
50 50
51 private bool rollbackStore = false;
52 private bool opengridmode = false;
53 private string rollbackDir = "";
54
51 public void Initialise() 55 public void Initialise()
52 { 56 {
53 m_log.Info("[MySQLInventoryData]: " + Name + " cannot be default-initialized!"); 57 m_log.Info("[MySQLInventoryData]: " + Name + " cannot be default-initialized!");
@@ -82,6 +86,10 @@ namespace OpenSim.Data.MySQL
82 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling"); 86 string settingPooling = GridDataMySqlFile.ParseFileReadValue("pooling");
83 string settingPort = GridDataMySqlFile.ParseFileReadValue("port"); 87 string settingPort = GridDataMySqlFile.ParseFileReadValue("port");
84 88
89 rollbackDir = GridDataMySqlFile.ParseFileReadValue("rollbackdir");
90 rollbackStore = GridDataMySqlFile.ParseFileReadValue("rollback") == "true";
91 opengridmode = GridDataMySqlFile.ParseFileReadValue("opengridmode") == "true";
92
85 database = 93 database =
86 new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling, 94 new MySQLManager(settingHostname, settingDatabase, settingUsername, settingPassword, settingPooling,
87 settingPort); 95 settingPort);
@@ -851,16 +859,25 @@ namespace OpenSim.Data.MySQL
851 { 859 {
852 List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID); 860 List<InventoryFolderBase> subFolders = getFolderHierarchy(folderID);
853 861
854 //Delete all sub-folders 862 // Dont delete in OGM - makes for easier restores if someone sends a malcious command. (just restore the folder entry)
855 foreach (InventoryFolderBase f in subFolders) 863 if (opengridmode == false)
856 { 864 {
857 deleteOneFolder(f.ID); 865 //Delete all sub-folders
858 deleteItemsInFolder(f.ID); 866 foreach (InventoryFolderBase f in subFolders)
867 {
868 deleteOneFolder(f.ID);
869 deleteItemsInFolder(f.ID);
870 }
859 } 871 }
860 872
861 //Delete the actual row 873 //Delete the actual row
862 deleteOneFolder(folderID); 874 deleteOneFolder(folderID);
863 deleteItemsInFolder(folderID); 875
876 // Just delete the folder context in OGM
877 if (opengridmode == false)
878 {
879 deleteItemsInFolder(folderID);
880 }
864 } 881 }
865 882
866 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID) 883 public List<InventoryItemBase> fetchActiveGestures(UUID avatarID)
diff --git a/OpenSim/Framework/PrimitiveBaseShape.cs b/OpenSim/Framework/PrimitiveBaseShape.cs
index e43d634..fe8f020 100644
--- a/OpenSim/Framework/PrimitiveBaseShape.cs
+++ b/OpenSim/Framework/PrimitiveBaseShape.cs
@@ -1099,8 +1099,6 @@ namespace OpenSim.Framework
1099 prim.Sculpt = new Primitive.SculptData(); 1099 prim.Sculpt = new Primitive.SculptData();
1100 prim.Sculpt.Type = (OpenMetaverse.SculptType)this.SculptType; 1100 prim.Sculpt.Type = (OpenMetaverse.SculptType)this.SculptType;
1101 prim.Sculpt.SculptTexture = this.SculptTexture; 1101 prim.Sculpt.SculptTexture = this.SculptTexture;
1102
1103 return prim;
1104 } 1102 }
1105 1103
1106 prim.PrimData.PathShearX = this.PathShearX < 128 ? (float)this.PathShearX * 0.01f : (float)(this.PathShearX - 256) * 0.01f; 1104 prim.PrimData.PathShearX = this.PathShearX < 128 ? (float)this.PathShearX * 0.01f : (float)(this.PathShearX - 256) * 0.01f;
diff --git a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
index cc8bdb6..1cc19c5 100644
--- a/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
+++ b/OpenSim/Framework/Servers/HttpServer/PollServiceWorkerThread.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Framework.Servers.HttpServer
50 private readonly BaseHttpServer m_server; 50 private readonly BaseHttpServer m_server;
51 private BlockingQueue<PollServiceHttpRequest> m_request; 51 private BlockingQueue<PollServiceHttpRequest> m_request;
52 private bool m_running = true; 52 private bool m_running = true;
53 private int m_timeout = 250; 53 private int m_timeout = 250;
54 54
55 public PollServiceWorkerThread(BaseHttpServer pSrv, int pTimeout) 55 public PollServiceWorkerThread(BaseHttpServer pSrv, int pTimeout)
56 { 56 {
diff --git a/OpenSim/Framework/Tests/ACLTest.cs b/OpenSim/Framework/Tests/ACLTest.cs
index d11f307..06e860e 100644
--- a/OpenSim/Framework/Tests/ACLTest.cs
+++ b/OpenSim/Framework/Tests/ACLTest.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using NUnit.Framework; 29using NUnit.Framework;
3using System.Collections.Generic; 30using System.Collections.Generic;
4 31
diff --git a/OpenSim/Framework/Tests/CacheTests.cs b/OpenSim/Framework/Tests/CacheTests.cs
index 8e97232..e2afd2a 100644
--- a/OpenSim/Framework/Tests/CacheTests.cs
+++ b/OpenSim/Framework/Tests/CacheTests.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using NUnit.Framework; 29using NUnit.Framework;
3using OpenMetaverse; 30using OpenMetaverse;
4 31
@@ -38,7 +65,7 @@ namespace OpenSim.Framework.Tests
38 randomNotIn = UUID.Random(); 65 randomNotIn = UUID.Random();
39 } 66 }
40 object citem = cache.Get(randomNotIn.ToString()); 67 object citem = cache.Get(randomNotIn.ToString());
41 Assert.That(citem == null, "Item should not be in Cache" ); 68 Assert.That(citem == null, "Item should not be in Cache");
42 } 69 }
43 70
44 //NOTE: Test Case disabled until Cache is fixed 71 //NOTE: Test Case disabled until Cache is fixed
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 49b9378..47251b7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -350,7 +350,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
350 350
351 protected IAssetService m_assetService; 351 protected IAssetService m_assetService;
352 private IHyperAssetService m_hyperAssets; 352 private IHyperAssetService m_hyperAssets;
353 353 private const bool m_checkPackets = true;
354 354
355 #endregion Class Members 355 #endregion Class Members
356 356
@@ -1266,10 +1266,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1266 // 1266 //
1267 if (totalItems == 0 && totalFolders == 0) 1267 if (totalItems == 0 && totalFolders == 0)
1268 currentPacket = CreateInventoryDescendentsPacket(ownerID, folderID, version, items.Count + folders.Count, 0, 0); 1268 currentPacket = CreateInventoryDescendentsPacket(ownerID, folderID, version, items.Count + folders.Count, 0, 0);
1269 1269
1270 // To preserve SL compatibility, we will NOT combine folders and items in one packet 1270 // To preserve SL compatibility, we will NOT combine folders and items in one packet
1271 // 1271 //
1272 while(itemsSent < totalItems || foldersSent < totalFolders) 1272 while (itemsSent < totalItems || foldersSent < totalFolders)
1273 { 1273 {
1274 if (currentPacket == null) // Start a new packet 1274 if (currentPacket == null) // Start a new packet
1275 { 1275 {
@@ -1289,7 +1289,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1289 1289
1290 if (foldersToSend-- > 0) 1290 if (foldersToSend-- > 0)
1291 currentPacket.FolderData[foldersSent % MAX_FOLDERS_PER_PACKET] = CreateFolderDataBlock(folders[foldersSent++]); 1291 currentPacket.FolderData[foldersSent % MAX_FOLDERS_PER_PACKET] = CreateFolderDataBlock(folders[foldersSent++]);
1292 else if(itemsToSend-- > 0) 1292 else if (itemsToSend-- > 0)
1293 currentPacket.ItemData[itemsSent % MAX_ITEMS_PER_PACKET] = CreateItemDataBlock(items[itemsSent++]); 1293 currentPacket.ItemData[itemsSent % MAX_ITEMS_PER_PACKET] = CreateItemDataBlock(items[itemsSent++]);
1294 else 1294 else
1295 { 1295 {
@@ -2043,7 +2043,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2043 packet.AgentData.SessionID = SessionId; 2043 packet.AgentData.SessionID = SessionId;
2044 2044
2045 packet.Effect = effectBlocks; 2045 packet.Effect = effectBlocks;
2046 2046
2047 OutPacket(packet, ThrottleOutPacketType.State); 2047 OutPacket(packet, ThrottleOutPacketType.State);
2048 } 2048 }
2049 2049
@@ -2742,7 +2742,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2742 } 2742 }
2743 llsd.Add("GroupData", GroupData); 2743 llsd.Add("GroupData", GroupData);
2744 llsd.Add("NewGroupData", NewGroupData); 2744 llsd.Add("NewGroupData", NewGroupData);
2745 2745
2746 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>(); 2746 IEventQueue eq = this.Scene.RequestModuleInterface<IEventQueue>();
2747 if (eq != null) 2747 if (eq != null)
2748 { 2748 {
@@ -3121,7 +3121,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3121 3121
3122 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1]; 3122 objupdate.ObjectData = new ObjectUpdatePacket.ObjectDataBlock[1];
3123 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data); 3123 objupdate.ObjectData[0] = CreateAvatarUpdateBlock(data);
3124
3125 OutPacket(objupdate, ThrottleOutPacketType.Task); 3124 OutPacket(objupdate, ThrottleOutPacketType.Task);
3126 } 3125 }
3127 3126
@@ -3172,8 +3171,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3172 terse.ObjectData[i] = m_avatarTerseUpdates.Dequeue(); 3171 terse.ObjectData[i] = m_avatarTerseUpdates.Dequeue();
3173 } 3172 }
3174 3173
3175 // HACK: Using the task category until the tiered reprioritization code is in 3174 OutPacket(terse, ThrottleOutPacketType.State);
3176 OutPacket(terse, ThrottleOutPacketType.Task);
3177 } 3175 }
3178 3176
3179 public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations) 3177 public void SendCoarseLocationUpdate(List<UUID> users, List<Vector3> CoarseLocations)
@@ -4045,7 +4043,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4045 4043
4046 if (collisionPlane == Vector4.Zero) 4044 if (collisionPlane == Vector4.Zero)
4047 collisionPlane = Vector4.UnitW; 4045 collisionPlane = Vector4.UnitW;
4048 4046 //m_log.DebugFormat("CollisionPlane: {0}",collisionPlane);
4049 collisionPlane.ToBytes(data, pos); 4047 collisionPlane.ToBytes(data, pos);
4050 pos += 16; 4048 pos += 16;
4051 } 4049 }
@@ -4130,12 +4128,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4130 update.PCode = (byte)PCode.Avatar; 4128 update.PCode = (byte)PCode.Avatar;
4131 update.ProfileCurve = 1; 4129 update.ProfileCurve = 1;
4132 update.PSBlock = Utils.EmptyBytes; 4130 update.PSBlock = Utils.EmptyBytes;
4133 update.Scale = Vector3.One; 4131 update.Scale = new Vector3(0.45f,0.6f,1.9f);
4134 update.Text = Utils.EmptyBytes; 4132 update.Text = Utils.EmptyBytes;
4135 update.TextColor = new byte[4]; 4133 update.TextColor = new byte[4];
4136 update.TextureAnim = Utils.EmptyBytes; 4134 update.TextureAnim = Utils.EmptyBytes;
4137 update.TextureEntry = data.TextureEntry ?? Utils.EmptyBytes; 4135 update.TextureEntry = data.TextureEntry ?? Utils.EmptyBytes;
4138 update.UpdateFlags = 61 + (9 << 8) + (130 << 16) + (16 << 24); // TODO: Replace these numbers with PrimFlags 4136 update.UpdateFlags = (uint)(PrimFlags.Physics | PrimFlags.ObjectModify | PrimFlags.ObjectCopy | PrimFlags.ObjectAnyOwner | PrimFlags.ObjectYouOwner | PrimFlags.ObjectMove | PrimFlags.InventoryEmpty | PrimFlags.ObjectTransfer | PrimFlags.ObjectOwnerModify);//61 + (9 << 8) + (130 << 16) + (16 << 24); // TODO: Replace these numbers with PrimFlags
4139 4137
4140 return update; 4138 return update;
4141 } 4139 }
@@ -4282,6 +4280,38 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4282 AddLocalPacketHandler(PacketType.UUIDGroupNameRequest, HandleUUIDGroupNameRequest); 4280 AddLocalPacketHandler(PacketType.UUIDGroupNameRequest, HandleUUIDGroupNameRequest);
4283 AddLocalPacketHandler(PacketType.ObjectGroup, HandleObjectGroupRequest); 4281 AddLocalPacketHandler(PacketType.ObjectGroup, HandleObjectGroupRequest);
4284 AddLocalPacketHandler(PacketType.GenericMessage, HandleGenericMessage); 4282 AddLocalPacketHandler(PacketType.GenericMessage, HandleGenericMessage);
4283 AddLocalPacketHandler(PacketType.AvatarPropertiesRequest, HandleAvatarPropertiesRequest);
4284 AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer);
4285 AddLocalPacketHandler(PacketType.AvatarPropertiesUpdate, HandlerAvatarPropertiesUpdate);
4286 AddLocalPacketHandler(PacketType.ScriptDialogReply, HandlerScriptDialogReply);
4287 AddLocalPacketHandler(PacketType.ImprovedInstantMessage, HandlerImprovedInstantMessage);
4288 AddLocalPacketHandler(PacketType.AcceptFriendship, HandlerAcceptFriendship);
4289 AddLocalPacketHandler(PacketType.DeclineFriendship, HandlerDeclineFriendship);
4290 AddLocalPacketHandler(PacketType.TerminateFriendship, HandlerTerminateFrendship);
4291 AddLocalPacketHandler(PacketType.RezObject, HandlerRezObject);
4292 AddLocalPacketHandler(PacketType.DeRezObject, HandlerDeRezObject);
4293 AddLocalPacketHandler(PacketType.ModifyLand, HandlerModifyLand);
4294 AddLocalPacketHandler(PacketType.RegionHandshakeReply, HandlerRegionHandshakeReply);
4295 AddLocalPacketHandler(PacketType.AgentWearablesRequest, HandlerAgentWearablesRequest);
4296 AddLocalPacketHandler(PacketType.AgentSetAppearance, HandlerAgentSetAppearance);
4297 AddLocalPacketHandler(PacketType.AgentIsNowWearing, HandlerAgentIsNowWearing);
4298 AddLocalPacketHandler(PacketType.RezSingleAttachmentFromInv, HandlerRezSingleAttachmentFromInv);
4299 AddLocalPacketHandler(PacketType.RezMultipleAttachmentsFromInv, HandleRezMultipleAttachmentsFromInv);
4300 AddLocalPacketHandler(PacketType.DetachAttachmentIntoInv, HandleDetachAttachmentIntoInv);
4301 AddLocalPacketHandler(PacketType.ObjectAttach, HandleObjectAttach);
4302 AddLocalPacketHandler(PacketType.ObjectDetach, HandleObjectDetach);
4303 AddLocalPacketHandler(PacketType.ObjectDrop, HandleObjectDrop);
4304 AddLocalPacketHandler(PacketType.SetAlwaysRun, HandleSetAlwaysRun);
4305 AddLocalPacketHandler(PacketType.CompleteAgentMovement, HandleCompleteAgentMovement);
4306 AddLocalPacketHandler(PacketType.AgentAnimation, HandleAgentAnimation);
4307 AddLocalPacketHandler(PacketType.AgentRequestSit, HandleAgentRequestSit);
4308 AddLocalPacketHandler(PacketType.AgentSit, HandleAgentSit);
4309 AddLocalPacketHandler(PacketType.SoundTrigger, HandleSoundTrigger);
4310 //AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer);
4311 //AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer);
4312 //AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer);
4313 //AddLocalPacketHandler(PacketType.ChatFromViewer, HandleChatFromViewer);
4314
4285 } 4315 }
4286 4316
4287 #region Packet Handlers 4317 #region Packet Handlers
@@ -4497,6 +4527,723 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4497 return true; 4527 return true;
4498 } 4528 }
4499 4529
4530 private bool HandleAvatarPropertiesRequest(IClientAPI sender, Packet Pack)
4531 {
4532 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
4533
4534 #region Packet Session and User Check
4535 if (m_checkPackets)
4536 {
4537 if (avatarProperties.AgentData.SessionID != SessionId ||
4538 avatarProperties.AgentData.AgentID != AgentId)
4539 return true;
4540 }
4541 #endregion
4542
4543 RequestAvatarProperties handlerRequestAvatarProperties = OnRequestAvatarProperties;
4544 if (handlerRequestAvatarProperties != null)
4545 {
4546 handlerRequestAvatarProperties(this, avatarProperties.AgentData.AvatarID);
4547 }
4548 return true;
4549 }
4550
4551 private bool HandleChatFromViewer(IClientAPI sender, Packet Pack)
4552 {
4553 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
4554
4555 #region Packet Session and User Check
4556 if (m_checkPackets)
4557 {
4558 if (inchatpack.AgentData.SessionID != SessionId ||
4559 inchatpack.AgentData.AgentID != AgentId)
4560 return true;
4561 }
4562 #endregion
4563
4564 string fromName = String.Empty; //ClientAvatar.firstname + " " + ClientAvatar.lastname;
4565 byte[] message = inchatpack.ChatData.Message;
4566 byte type = inchatpack.ChatData.Type;
4567 Vector3 fromPos = new Vector3(); // ClientAvatar.Pos;
4568 // UUID fromAgentID = AgentId;
4569
4570 int channel = inchatpack.ChatData.Channel;
4571
4572 if (OnChatFromClient != null)
4573 {
4574 OSChatMessage args = new OSChatMessage();
4575 args.Channel = channel;
4576 args.From = fromName;
4577 args.Message = Utils.BytesToString(message);
4578 args.Type = (ChatTypeEnum)type;
4579 args.Position = fromPos;
4580
4581 args.Scene = Scene;
4582 args.Sender = this;
4583 args.SenderUUID = this.AgentId;
4584
4585 ChatMessage handlerChatFromClient = OnChatFromClient;
4586 if (handlerChatFromClient != null)
4587 handlerChatFromClient(this, args);
4588 }
4589 return true;
4590 }
4591
4592 private bool HandlerAvatarPropertiesUpdate(IClientAPI sender, Packet Pack)
4593 {
4594 AvatarPropertiesUpdatePacket avatarProps = (AvatarPropertiesUpdatePacket)Pack;
4595
4596 #region Packet Session and User Check
4597 if (m_checkPackets)
4598 {
4599 if (avatarProps.AgentData.SessionID != SessionId ||
4600 avatarProps.AgentData.AgentID != AgentId)
4601 return true;
4602 }
4603 #endregion
4604
4605 UpdateAvatarProperties handlerUpdateAvatarProperties = OnUpdateAvatarProperties;
4606 if (handlerUpdateAvatarProperties != null)
4607 {
4608 AvatarPropertiesUpdatePacket.PropertiesDataBlock Properties = avatarProps.PropertiesData;
4609 UserProfileData UserProfile = new UserProfileData();
4610 UserProfile.ID = AgentId;
4611 UserProfile.AboutText = Utils.BytesToString(Properties.AboutText);
4612 UserProfile.FirstLifeAboutText = Utils.BytesToString(Properties.FLAboutText);
4613 UserProfile.FirstLifeImage = Properties.FLImageID;
4614 UserProfile.Image = Properties.ImageID;
4615 UserProfile.ProfileUrl = Utils.BytesToString(Properties.ProfileURL);
4616
4617 handlerUpdateAvatarProperties(this, UserProfile);
4618 }
4619 return true;
4620 }
4621
4622 private bool HandlerScriptDialogReply(IClientAPI sender, Packet Pack)
4623 {
4624 ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack;
4625
4626 #region Packet Session and User Check
4627 if (m_checkPackets)
4628 {
4629 if (rdialog.AgentData.SessionID != SessionId ||
4630 rdialog.AgentData.AgentID != AgentId)
4631 return true;
4632 }
4633 #endregion
4634
4635 int ch = rdialog.Data.ChatChannel;
4636 byte[] msg = rdialog.Data.ButtonLabel;
4637 if (OnChatFromClient != null)
4638 {
4639 OSChatMessage args = new OSChatMessage();
4640 args.Channel = ch;
4641 args.From = String.Empty;
4642 args.Message = Utils.BytesToString(msg);
4643 args.Type = ChatTypeEnum.Shout;
4644 args.Position = new Vector3();
4645 args.Scene = Scene;
4646 args.Sender = this;
4647 ChatMessage handlerChatFromClient2 = OnChatFromClient;
4648 if (handlerChatFromClient2 != null)
4649 handlerChatFromClient2(this, args);
4650 }
4651
4652 return true;
4653 }
4654
4655 private bool HandlerImprovedInstantMessage(IClientAPI sender, Packet Pack)
4656 {
4657 ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack;
4658
4659 #region Packet Session and User Check
4660 if (m_checkPackets)
4661 {
4662 if (msgpack.AgentData.SessionID != SessionId ||
4663 msgpack.AgentData.AgentID != AgentId)
4664 return true;
4665 }
4666 #endregion
4667
4668 string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName);
4669 string IMmessage = Utils.BytesToString(msgpack.MessageBlock.Message);
4670 ImprovedInstantMessage handlerInstantMessage = OnInstantMessage;
4671
4672 if (handlerInstantMessage != null)
4673 {
4674 GridInstantMessage im = new GridInstantMessage(Scene,
4675 msgpack.AgentData.AgentID,
4676 IMfromName,
4677 msgpack.MessageBlock.ToAgentID,
4678 msgpack.MessageBlock.Dialog,
4679 msgpack.MessageBlock.FromGroup,
4680 IMmessage,
4681 msgpack.MessageBlock.ID,
4682 msgpack.MessageBlock.Offline != 0 ? true : false,
4683 msgpack.MessageBlock.Position,
4684 msgpack.MessageBlock.BinaryBucket);
4685
4686 handlerInstantMessage(this, im);
4687 }
4688 return true;
4689
4690 }
4691
4692 private bool HandlerAcceptFriendship(IClientAPI sender, Packet Pack)
4693 {
4694 AcceptFriendshipPacket afriendpack = (AcceptFriendshipPacket)Pack;
4695
4696 #region Packet Session and User Check
4697 if (m_checkPackets)
4698 {
4699 if (afriendpack.AgentData.SessionID != SessionId ||
4700 afriendpack.AgentData.AgentID != AgentId)
4701 return true;
4702 }
4703 #endregion
4704
4705 // My guess is this is the folder to stick the calling card into
4706 List<UUID> callingCardFolders = new List<UUID>();
4707
4708 UUID agentID = afriendpack.AgentData.AgentID;
4709 UUID transactionID = afriendpack.TransactionBlock.TransactionID;
4710
4711 for (int fi = 0; fi < afriendpack.FolderData.Length; fi++)
4712 {
4713 callingCardFolders.Add(afriendpack.FolderData[fi].FolderID);
4714 }
4715
4716 FriendActionDelegate handlerApproveFriendRequest = OnApproveFriendRequest;
4717 if (handlerApproveFriendRequest != null)
4718 {
4719 handlerApproveFriendRequest(this, agentID, transactionID, callingCardFolders);
4720 }
4721 return true;
4722
4723 }
4724
4725 private bool HandlerDeclineFriendship(IClientAPI sender, Packet Pack)
4726 {
4727 DeclineFriendshipPacket dfriendpack = (DeclineFriendshipPacket)Pack;
4728
4729 #region Packet Session and User Check
4730 if (m_checkPackets)
4731 {
4732 if (dfriendpack.AgentData.SessionID != SessionId ||
4733 dfriendpack.AgentData.AgentID != AgentId)
4734 return true;
4735 }
4736 #endregion
4737
4738 if (OnDenyFriendRequest != null)
4739 {
4740 OnDenyFriendRequest(this,
4741 dfriendpack.AgentData.AgentID,
4742 dfriendpack.TransactionBlock.TransactionID,
4743 null);
4744 }
4745 return true;
4746 }
4747
4748 private bool HandlerTerminateFrendship(IClientAPI sender, Packet Pack)
4749 {
4750 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
4751
4752 #region Packet Session and User Check
4753 if (m_checkPackets)
4754 {
4755 if (tfriendpack.AgentData.SessionID != SessionId ||
4756 tfriendpack.AgentData.AgentID != AgentId)
4757 return true;
4758 }
4759 #endregion
4760
4761 UUID listOwnerAgentID = tfriendpack.AgentData.AgentID;
4762 UUID exFriendID = tfriendpack.ExBlock.OtherID;
4763
4764 FriendshipTermination handlerTerminateFriendship = OnTerminateFriendship;
4765 if (handlerTerminateFriendship != null)
4766 {
4767 handlerTerminateFriendship(this, listOwnerAgentID, exFriendID);
4768 }
4769 return true;
4770 }
4771
4772 private bool HandlerRezObject(IClientAPI sender, Packet Pack)
4773 {
4774 RezObjectPacket rezPacket = (RezObjectPacket)Pack;
4775
4776 #region Packet Session and User Check
4777 if (m_checkPackets)
4778 {
4779 if (rezPacket.AgentData.SessionID != SessionId ||
4780 rezPacket.AgentData.AgentID != AgentId)
4781 return true;
4782 }
4783 #endregion
4784
4785 RezObject handlerRezObject = OnRezObject;
4786 if (handlerRezObject != null)
4787 {
4788 handlerRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd,
4789 rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID,
4790 rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection,
4791 rezPacket.RezData.RezSelected, rezPacket.RezData.RemoveItem,
4792 rezPacket.RezData.FromTaskID);
4793 }
4794 return true;
4795 }
4796
4797 private bool HandlerDeRezObject(IClientAPI sender, Packet Pack)
4798 {
4799 DeRezObjectPacket DeRezPacket = (DeRezObjectPacket)Pack;
4800
4801 #region Packet Session and User Check
4802 if (m_checkPackets)
4803 {
4804 if (DeRezPacket.AgentData.SessionID != SessionId ||
4805 DeRezPacket.AgentData.AgentID != AgentId)
4806 return true;
4807 }
4808 #endregion
4809
4810 DeRezObject handlerDeRezObject = OnDeRezObject;
4811 if (handlerDeRezObject != null)
4812 {
4813 List<uint> deRezIDs = new List<uint>();
4814
4815 foreach (DeRezObjectPacket.ObjectDataBlock data in
4816 DeRezPacket.ObjectData)
4817 {
4818 deRezIDs.Add(data.ObjectLocalID);
4819 }
4820 // It just so happens that the values on the DeRezAction enumerator match the Destination
4821 // values given by a Second Life client
4822 handlerDeRezObject(this, deRezIDs,
4823 DeRezPacket.AgentBlock.GroupID,
4824 (DeRezAction)DeRezPacket.AgentBlock.Destination,
4825 DeRezPacket.AgentBlock.DestinationID);
4826
4827 }
4828 return true;
4829 }
4830
4831 private bool HandlerModifyLand(IClientAPI sender, Packet Pack)
4832 {
4833 ModifyLandPacket modify = (ModifyLandPacket)Pack;
4834
4835 #region Packet Session and User Check
4836 if (m_checkPackets)
4837 {
4838 if (modify.AgentData.SessionID != SessionId ||
4839 modify.AgentData.AgentID != AgentId)
4840 return true;
4841 }
4842
4843 #endregion
4844 //m_log.Info("[LAND]: LAND:" + modify.ToString());
4845 if (modify.ParcelData.Length > 0)
4846 {
4847 if (OnModifyTerrain != null)
4848 {
4849 for (int i = 0; i < modify.ParcelData.Length; i++)
4850 {
4851 ModifyTerrain handlerModifyTerrain = OnModifyTerrain;
4852 if (handlerModifyTerrain != null)
4853 {
4854 handlerModifyTerrain(AgentId, modify.ModifyBlock.Height, modify.ModifyBlock.Seconds,
4855 modify.ModifyBlock.BrushSize,
4856 modify.ModifyBlock.Action, modify.ParcelData[i].North,
4857 modify.ParcelData[i].West, modify.ParcelData[i].South,
4858 modify.ParcelData[i].East, AgentId);
4859 }
4860 }
4861 }
4862 }
4863
4864 return true;
4865 }
4866
4867 private bool HandlerRegionHandshakeReply(IClientAPI sender, Packet Pack)
4868 {
4869 Action<IClientAPI> handlerRegionHandShakeReply = OnRegionHandShakeReply;
4870 if (handlerRegionHandShakeReply != null)
4871 {
4872 handlerRegionHandShakeReply(this);
4873 }
4874
4875 return true;
4876 }
4877
4878 private bool HandlerAgentWearablesRequest(IClientAPI sender, Packet Pack)
4879 {
4880 GenericCall2 handlerRequestWearables = OnRequestWearables;
4881
4882 if (handlerRequestWearables != null)
4883 {
4884 handlerRequestWearables();
4885 }
4886
4887 Action<IClientAPI> handlerRequestAvatarsData = OnRequestAvatarsData;
4888
4889 if (handlerRequestAvatarsData != null)
4890 {
4891 handlerRequestAvatarsData(this);
4892 }
4893
4894 return true;
4895 }
4896
4897 private bool HandlerAgentSetAppearance(IClientAPI sender, Packet Pack)
4898 {
4899 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
4900
4901 #region Packet Session and User Check
4902 if (m_checkPackets)
4903 {
4904 if (appear.AgentData.SessionID != SessionId ||
4905 appear.AgentData.AgentID != AgentId)
4906 return true;
4907 }
4908 #endregion
4909
4910 SetAppearance handlerSetAppearance = OnSetAppearance;
4911 if (handlerSetAppearance != null)
4912 {
4913 // Temporarily protect ourselves from the mantis #951 failure.
4914 // However, we could do this for several other handlers where a failure isn't terminal
4915 // for the client session anyway, in order to protect ourselves against bad code in plugins
4916 try
4917 {
4918 byte[] visualparams = new byte[appear.VisualParam.Length];
4919 for (int i = 0; i < appear.VisualParam.Length; i++)
4920 visualparams[i] = appear.VisualParam[i].ParamValue;
4921
4922 Primitive.TextureEntry te = null;
4923 if (appear.ObjectData.TextureEntry.Length > 1)
4924 te = new Primitive.TextureEntry(appear.ObjectData.TextureEntry, 0, appear.ObjectData.TextureEntry.Length);
4925
4926 handlerSetAppearance(te, visualparams);
4927 }
4928 catch (Exception e)
4929 {
4930 m_log.ErrorFormat(
4931 "[CLIENT VIEW]: AgentSetApperance packet handler threw an exception, {0}",
4932 e);
4933 }
4934 }
4935
4936 return true;
4937 }
4938
4939 private bool HandlerAgentIsNowWearing(IClientAPI sender, Packet Pack)
4940 {
4941 if (OnAvatarNowWearing != null)
4942 {
4943 AgentIsNowWearingPacket nowWearing = (AgentIsNowWearingPacket)Pack;
4944
4945 #region Packet Session and User Check
4946 if (m_checkPackets)
4947 {
4948 if (nowWearing.AgentData.SessionID != SessionId ||
4949 nowWearing.AgentData.AgentID != AgentId)
4950 return true;
4951 }
4952 #endregion
4953
4954 AvatarWearingArgs wearingArgs = new AvatarWearingArgs();
4955 for (int i = 0; i < nowWearing.WearableData.Length; i++)
4956 {
4957 AvatarWearingArgs.Wearable wearable =
4958 new AvatarWearingArgs.Wearable(nowWearing.WearableData[i].ItemID,
4959 nowWearing.WearableData[i].WearableType);
4960 wearingArgs.NowWearing.Add(wearable);
4961 }
4962
4963 AvatarNowWearing handlerAvatarNowWearing = OnAvatarNowWearing;
4964 if (handlerAvatarNowWearing != null)
4965 {
4966 handlerAvatarNowWearing(this, wearingArgs);
4967 }
4968 }
4969 return true;
4970 }
4971
4972 private bool HandlerRezSingleAttachmentFromInv(IClientAPI sender, Packet Pack)
4973 {
4974 RezSingleAttachmentFromInv handlerRezSingleAttachment = OnRezSingleAttachmentFromInv;
4975 if (handlerRezSingleAttachment != null)
4976 {
4977 RezSingleAttachmentFromInvPacket rez = (RezSingleAttachmentFromInvPacket)Pack;
4978
4979 #region Packet Session and User Check
4980 if (m_checkPackets)
4981 {
4982 if (rez.AgentData.SessionID != SessionId ||
4983 rez.AgentData.AgentID != AgentId)
4984 return true;
4985 }
4986 #endregion
4987
4988 handlerRezSingleAttachment(this, rez.ObjectData.ItemID,
4989 rez.ObjectData.AttachmentPt);
4990 }
4991
4992 return true;
4993 }
4994
4995 private bool HandleRezMultipleAttachmentsFromInv(IClientAPI sender, Packet Pack)
4996 {
4997 RezMultipleAttachmentsFromInv handlerRezMultipleAttachments = OnRezMultipleAttachmentsFromInv;
4998 if (handlerRezMultipleAttachments != null)
4999 {
5000 RezMultipleAttachmentsFromInvPacket rez = (RezMultipleAttachmentsFromInvPacket)Pack;
5001 handlerRezMultipleAttachments(this, rez.HeaderData,
5002 rez.ObjectData);
5003 }
5004
5005 return true;
5006 }
5007
5008 private bool HandleDetachAttachmentIntoInv(IClientAPI sender, Packet Pack)
5009 {
5010 UUIDNameRequest handlerDetachAttachmentIntoInv = OnDetachAttachmentIntoInv;
5011 if (handlerDetachAttachmentIntoInv != null)
5012 {
5013 DetachAttachmentIntoInvPacket detachtoInv = (DetachAttachmentIntoInvPacket)Pack;
5014
5015 #region Packet Session and User Check
5016 // UNSUPPORTED ON THIS PACKET
5017 #endregion
5018
5019 UUID itemID = detachtoInv.ObjectData.ItemID;
5020 // UUID ATTACH_agentID = detachtoInv.ObjectData.AgentID;
5021
5022 handlerDetachAttachmentIntoInv(itemID, this);
5023 }
5024 return true;
5025 }
5026
5027 private bool HandleObjectAttach(IClientAPI sender, Packet Pack)
5028 {
5029 if (OnObjectAttach != null)
5030 {
5031 ObjectAttachPacket att = (ObjectAttachPacket)Pack;
5032
5033 #region Packet Session and User Check
5034 if (m_checkPackets)
5035 {
5036 if (att.AgentData.SessionID != SessionId ||
5037 att.AgentData.AgentID != AgentId)
5038 return true;
5039 }
5040 #endregion
5041
5042 ObjectAttach handlerObjectAttach = OnObjectAttach;
5043
5044 if (handlerObjectAttach != null)
5045 {
5046 if (att.ObjectData.Length > 0)
5047 {
5048 handlerObjectAttach(this, att.ObjectData[0].ObjectLocalID, att.AgentData.AttachmentPoint, att.ObjectData[0].Rotation, false);
5049 }
5050 }
5051 }
5052 return true;
5053 }
5054
5055 private bool HandleObjectDetach(IClientAPI sender, Packet Pack)
5056 {
5057 ObjectDetachPacket dett = (ObjectDetachPacket)Pack;
5058
5059 #region Packet Session and User Check
5060 if (m_checkPackets)
5061 {
5062 if (dett.AgentData.SessionID != SessionId ||
5063 dett.AgentData.AgentID != AgentId)
5064 return true;
5065 }
5066 #endregion
5067
5068 for (int j = 0; j < dett.ObjectData.Length; j++)
5069 {
5070 uint obj = dett.ObjectData[j].ObjectLocalID;
5071 ObjectDeselect handlerObjectDetach = OnObjectDetach;
5072 if (handlerObjectDetach != null)
5073 {
5074 handlerObjectDetach(obj, this);
5075 }
5076
5077 }
5078 return true;
5079 }
5080
5081 private bool HandleObjectDrop(IClientAPI sender, Packet Pack)
5082 {
5083 ObjectDropPacket dropp = (ObjectDropPacket)Pack;
5084
5085 #region Packet Session and User Check
5086 if (m_checkPackets)
5087 {
5088 if (dropp.AgentData.SessionID != SessionId ||
5089 dropp.AgentData.AgentID != AgentId)
5090 return true;
5091 }
5092 #endregion
5093
5094 for (int j = 0; j < dropp.ObjectData.Length; j++)
5095 {
5096 uint obj = dropp.ObjectData[j].ObjectLocalID;
5097 ObjectDrop handlerObjectDrop = OnObjectDrop;
5098 if (handlerObjectDrop != null)
5099 {
5100 handlerObjectDrop(obj, this);
5101 }
5102 }
5103 return true;
5104 }
5105
5106 private bool HandleSetAlwaysRun(IClientAPI sender, Packet Pack)
5107 {
5108 SetAlwaysRunPacket run = (SetAlwaysRunPacket)Pack;
5109
5110 #region Packet Session and User Check
5111 if (m_checkPackets)
5112 {
5113 if (run.AgentData.SessionID != SessionId ||
5114 run.AgentData.AgentID != AgentId)
5115 return true;
5116 }
5117 #endregion
5118
5119 SetAlwaysRun handlerSetAlwaysRun = OnSetAlwaysRun;
5120 if (handlerSetAlwaysRun != null)
5121 handlerSetAlwaysRun(this, run.AgentData.AlwaysRun);
5122
5123 return true;
5124 }
5125
5126 private bool HandleCompleteAgentMovement(IClientAPI sender, Packet Pack)
5127 {
5128 GenericCall2 handlerCompleteMovementToRegion = OnCompleteMovementToRegion;
5129 if (handlerCompleteMovementToRegion != null)
5130 {
5131 handlerCompleteMovementToRegion();
5132 }
5133 handlerCompleteMovementToRegion = null;
5134
5135 return true;
5136 }
5137
5138 private bool HandleAgentAnimation(IClientAPI sender, Packet Pack)
5139 {
5140 AgentAnimationPacket AgentAni = (AgentAnimationPacket)Pack;
5141
5142 #region Packet Session and User Check
5143 if (m_checkPackets)
5144 {
5145 if (AgentAni.AgentData.SessionID != SessionId ||
5146 AgentAni.AgentData.AgentID != AgentId)
5147 return true;
5148 }
5149 #endregion
5150
5151 StartAnim handlerStartAnim = null;
5152 StopAnim handlerStopAnim = null;
5153
5154 for (int i = 0; i < AgentAni.AnimationList.Length; i++)
5155 {
5156 if (AgentAni.AnimationList[i].StartAnim)
5157 {
5158 handlerStartAnim = OnStartAnim;
5159 if (handlerStartAnim != null)
5160 {
5161 handlerStartAnim(this, AgentAni.AnimationList[i].AnimID);
5162 }
5163 }
5164 else
5165 {
5166 handlerStopAnim = OnStopAnim;
5167 if (handlerStopAnim != null)
5168 {
5169 handlerStopAnim(this, AgentAni.AnimationList[i].AnimID);
5170 }
5171 }
5172 }
5173 return true;
5174 }
5175
5176 private bool HandleAgentRequestSit(IClientAPI sender, Packet Pack)
5177 {
5178 if (OnAgentRequestSit != null)
5179 {
5180 AgentRequestSitPacket agentRequestSit = (AgentRequestSitPacket)Pack;
5181
5182 #region Packet Session and User Check
5183 if (m_checkPackets)
5184 {
5185 if (agentRequestSit.AgentData.SessionID != SessionId ||
5186 agentRequestSit.AgentData.AgentID != AgentId)
5187 return true;
5188 }
5189 #endregion
5190
5191 AgentRequestSit handlerAgentRequestSit = OnAgentRequestSit;
5192 if (handlerAgentRequestSit != null)
5193 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
5194 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
5195 }
5196 return true;
5197 }
5198
5199 private bool HandleAgentSit(IClientAPI sender, Packet Pack)
5200 {
5201 if (OnAgentSit != null)
5202 {
5203 AgentSitPacket agentSit = (AgentSitPacket)Pack;
5204
5205 #region Packet Session and User Check
5206 if (m_checkPackets)
5207 {
5208 if (agentSit.AgentData.SessionID != SessionId ||
5209 agentSit.AgentData.AgentID != AgentId)
5210 return true;
5211 }
5212 #endregion
5213
5214 AgentSit handlerAgentSit = OnAgentSit;
5215 if (handlerAgentSit != null)
5216 {
5217 OnAgentSit(this, agentSit.AgentData.AgentID);
5218 }
5219 }
5220 return true;
5221 }
5222
5223 private bool HandleSoundTrigger(IClientAPI sender, Packet Pack)
5224 {
5225 SoundTriggerPacket soundTriggerPacket = (SoundTriggerPacket)Pack;
5226
5227 #region Packet Session and User Check
5228 if (m_checkPackets)
5229 {
5230 // UNSUPPORTED ON THIS PACKET
5231 }
5232 #endregion
5233
5234 SoundTrigger handlerSoundTrigger = OnSoundTrigger;
5235 if (handlerSoundTrigger != null)
5236 {
5237 handlerSoundTrigger(soundTriggerPacket.SoundData.SoundID, soundTriggerPacket.SoundData.OwnerID,
5238 soundTriggerPacket.SoundData.ObjectID, soundTriggerPacket.SoundData.ParentID,
5239 soundTriggerPacket.SoundData.Gain, soundTriggerPacket.SoundData.Position,
5240 soundTriggerPacket.SoundData.Handle);
5241
5242 }
5243 return true;
5244 }
5245
5246
4500 #endregion Packet Handlers 5247 #endregion Packet Handlers
4501 5248
4502 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) 5249 public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question)
@@ -4988,13 +5735,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4988 return; 5735 return;
4989 } 5736 }
4990 5737
4991 const bool m_checkPackets = true;
4992
4993 // Main packet processing conditional 5738 // Main packet processing conditional
4994 switch (Pack.Type) 5739 switch (Pack.Type)
4995 { 5740 {
4996 #region Scene/Avatar 5741 #region Scene/Avatar
4997 5742 #region CommentedOut
5743 /*
4998 case PacketType.AvatarPropertiesRequest: 5744 case PacketType.AvatarPropertiesRequest:
4999 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack; 5745 AvatarPropertiesRequestPacket avatarProperties = (AvatarPropertiesRequestPacket)Pack;
5000 5746
@@ -5656,7 +6402,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
5656 6402
5657 } 6403 }
5658 break; 6404 break;
5659 6405 */
6406 #endregion
5660 case PacketType.AvatarPickerRequest: 6407 case PacketType.AvatarPickerRequest:
5661 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack; 6408 AvatarPickerRequestPacket avRequestQuery = (AvatarPickerRequestPacket)Pack;
5662 6409
@@ -9713,7 +10460,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9713 Utils.BytesToString(avatarInterestUpdate.PropertiesData.SkillsText), 10460 Utils.BytesToString(avatarInterestUpdate.PropertiesData.SkillsText),
9714 Utils.BytesToString(avatarInterestUpdate.PropertiesData.LanguagesText)); 10461 Utils.BytesToString(avatarInterestUpdate.PropertiesData.LanguagesText));
9715 break; 10462 break;
9716 10463
9717 case PacketType.GrantUserRights: 10464 case PacketType.GrantUserRights:
9718 GrantUserRightsPacket GrantUserRights = 10465 GrantUserRightsPacket GrantUserRights =
9719 (GrantUserRightsPacket)Pack; 10466 (GrantUserRightsPacket)Pack;
@@ -9732,7 +10479,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
9732 GrantUserRights.Rights[0].AgentRelated, 10479 GrantUserRights.Rights[0].AgentRelated,
9733 GrantUserRights.Rights[0].RelatedRights); 10480 GrantUserRights.Rights[0].RelatedRights);
9734 break; 10481 break;
9735 10482
9736 case PacketType.PlacesQuery: 10483 case PacketType.PlacesQuery:
9737 PlacesQueryPacket placesQueryPacket = 10484 PlacesQueryPacket placesQueryPacket =
9738 (PlacesQueryPacket)Pack; 10485 (PlacesQueryPacket)Pack;
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
index 0b05ed9..98bb4f7 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLUDPServer.cs
@@ -571,23 +571,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
571 //Sorry, i know it's not optimal, but until the LL client 571 //Sorry, i know it's not optimal, but until the LL client
572 //manages packets correctly and re-orders them as required, this is necessary. 572 //manages packets correctly and re-orders them as required, this is necessary.
573 573
574 if (outgoingPacket.Type == PacketType.ImprovedTerseObjectUpdate 574
575 || outgoingPacket.Type == PacketType.ChatFromSimulator 575 // Put the UDP payload on the wire
576 || outgoingPacket.Type == PacketType.ObjectUpdate 576 if (outgoingPacket.Type == PacketType.ImprovedTerseObjectUpdate)
577 || outgoingPacket.Type == PacketType.LayerData)
578 { 577 {
579 sendSynchronous = true; 578 SyncBeginPrioritySend(buffer, 2); // highest priority
580 } 579 }
581 580 else if (outgoingPacket.Type == PacketType.ObjectUpdate
582 // Put the UDP payload on the wire 581 || outgoingPacket.Type == PacketType.LayerData)
583 if (sendSynchronous == true)
584 { 582 {
585 SyncBeginSend(buffer); 583 SyncBeginPrioritySend(buffer, 1); // medium priority
586 } 584 }
587 else 585 else
588 { 586 {
589 AsyncBeginSend(buffer); 587 SyncBeginPrioritySend(buffer, 0); // normal priority
590 } 588 }
589
590 //AsyncBeginSend(buffer);
591
591 // Keep track of when this packet was sent out (right now) 592 // Keep track of when this packet was sent out (right now)
592 outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue; 593 outgoingPacket.TickCount = Environment.TickCount & Int32.MaxValue;
593 } 594 }
@@ -862,7 +863,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
862 863
863 Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length); 864 Buffer.BlockCopy(packetData, 0, buffer.Data, 0, length);
864 865
865 AsyncBeginSend(buffer); 866 SyncBeginPrioritySend(buffer, 1); //Setting this to a medium priority should help minimise resends
866 } 867 }
867 868
868 private bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo) 869 private bool IsClientAuthorized(UseCircuitCodePacket useCircuitCode, out AuthenticateResponse sessionInfo)
diff --git a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs b/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs
index 63579ac..de2cd24 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/OpenSimUDPBase.cs
@@ -29,6 +29,7 @@ using System;
29using System.Net; 29using System.Net;
30using System.Net.Sockets; 30using System.Net.Sockets;
31using System.Threading; 31using System.Threading;
32using System.Collections.Generic;
32using log4net; 33using log4net;
33 34
34namespace OpenMetaverse 35namespace OpenMetaverse
@@ -52,12 +53,30 @@ namespace OpenMetaverse
52 /// <summary>Local IP address to bind to in server mode</summary> 53 /// <summary>Local IP address to bind to in server mode</summary>
53 protected IPAddress m_localBindAddress; 54 protected IPAddress m_localBindAddress;
54 55
56 /// <summary>
57 /// Standard queue for our outgoing SyncBeginPrioritySend
58 /// </summary>
59 private List<UDPPacketBuffer> m_standardQueue = new List<UDPPacketBuffer>();
60
61 /// <summary>
62 /// Medium priority queue for our outgoing SyncBeginPrioritySend
63 /// </summary>
64 private List<UDPPacketBuffer> m_mediumPriorityQueue = new List<UDPPacketBuffer>();
65
66 /// <summary>
67 /// Prioritised queue for our outgoing SyncBeginPrioritySend
68 /// </summary>
69 private List<UDPPacketBuffer> m_priorityQueue = new List<UDPPacketBuffer>();
70
55 /// <summary>UDP socket, used in either client or server mode</summary> 71 /// <summary>UDP socket, used in either client or server mode</summary>
56 private Socket m_udpSocket; 72 private Socket m_udpSocket;
57 73
58 /// <summary>Flag to process packets asynchronously or synchronously</summary> 74 /// <summary>Flag to process packets asynchronously or synchronously</summary>
59 private bool m_asyncPacketHandling; 75 private bool m_asyncPacketHandling;
60 76
77 /// <summary>Are we currently sending data asynchronously?</summary>
78 private volatile bool m_sendingData = false;
79
61 /// <summary>The all important shutdown flag</summary> 80 /// <summary>The all important shutdown flag</summary>
62 private volatile bool m_shutdownFlag = true; 81 private volatile bool m_shutdownFlag = true;
63 82
@@ -246,25 +265,51 @@ namespace OpenMetaverse
246 } 265 }
247 } 266 }
248 267
249 public void SyncBeginSend(UDPPacketBuffer buf) 268 public void SyncBeginPrioritySend(UDPPacketBuffer buf, int Priority)
250 { 269 {
251 if (!m_shutdownFlag) 270 if (!m_shutdownFlag)
252 { 271 {
253 try 272 if (!m_sendingData)
254 { 273 {
255 m_udpSocket.SendTo( 274 m_sendingData = true;
256 buf.Data, 275 try
257 0, 276 {
258 buf.DataLength, 277 AsyncBeginSend(buf);
259 SocketFlags.None, 278 }
260 buf.RemoteEndPoint); 279 catch (SocketException) { }
280 catch (ObjectDisposedException) { }
281 }
282 else
283 {
284 if (Priority == 2)
285 {
286 lock (m_priorityQueue)
287 {
288 m_priorityQueue.Add(buf);
289 }
290 }
291 else
292 {
293 if (Priority != 0)
294 {
295 lock (m_mediumPriorityQueue)
296 {
297 m_mediumPriorityQueue.Add(buf);
298 }
299 }
300 else
301 {
302 lock (m_standardQueue)
303 {
304 m_standardQueue.Add(buf);
305 }
306 }
307 }
261 } 308 }
262 catch (SocketException) { }
263 catch (ObjectDisposedException) { }
264 } 309 }
265 } 310 }
266 311
267 public void AsyncBeginSend(UDPPacketBuffer buf) 312 private void AsyncBeginSend(UDPPacketBuffer buf)
268 { 313 {
269 if (!m_shutdownFlag) 314 if (!m_shutdownFlag)
270 { 315 {
@@ -288,8 +333,48 @@ namespace OpenMetaverse
288 { 333 {
289 try 334 try
290 { 335 {
291// UDPPacketBuffer buf = (UDPPacketBuffer)result.AsyncState;
292 m_udpSocket.EndSendTo(result); 336 m_udpSocket.EndSendTo(result);
337
338 if (m_sendingData)
339 {
340 lock (m_priorityQueue)
341 {
342 if (m_priorityQueue.Count > 0)
343 {
344 UDPPacketBuffer buf = m_priorityQueue[0];
345 m_priorityQueue.RemoveAt(0);
346 AsyncBeginSend(buf);
347 }
348 else
349 {
350 lock (m_mediumPriorityQueue)
351 {
352 if (m_mediumPriorityQueue.Count > 0)
353 {
354 UDPPacketBuffer buf = m_mediumPriorityQueue[0];
355 m_mediumPriorityQueue.RemoveAt(0);
356 AsyncBeginSend(buf);
357 }
358 else
359 {
360 lock (m_standardQueue)
361 {
362 if (m_standardQueue.Count > 0)
363 {
364 UDPPacketBuffer buf = m_standardQueue[0];
365 m_standardQueue.RemoveAt(0);
366 AsyncBeginSend(buf);
367 }
368 else
369 {
370 m_sendingData = false;
371 }
372 }
373 }
374 }
375 }
376 }
377 }
293 } 378 }
294 catch (SocketException) { } 379 catch (SocketException) { }
295 catch (ObjectDisposedException) { } 380 catch (ObjectDisposedException) { }
diff --git a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
index bb4e032..d6a82ef 100644
--- a/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Friends/FriendsModule.cs
@@ -395,7 +395,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
395 395
396 // if it leaves, we want to know, too 396 // if it leaves, we want to know, too
397 client.OnLogout += OnLogout; 397 client.OnLogout += OnLogout;
398 client.OnGrantUserRights += GrantUserFriendRights; 398 client.OnGrantUserRights += GrantUserFriendRights;
399 399
400 } 400 }
401 401
@@ -1112,8 +1112,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
1112 } 1112 }
1113 private void GrantUserFriendRights(IClientAPI remoteClient, UUID requester, UUID target, int rights) 1113 private void GrantUserFriendRights(IClientAPI remoteClient, UUID requester, UUID target, int rights)
1114 { 1114 {
1115 ((Scene)remoteClient.Scene).CommsManager.UpdateUserFriendPerms(requester, target, (uint)rights); 1115 ((Scene)remoteClient.Scene).CommsManager.UpdateUserFriendPerms(requester, target, (uint)rights);
1116 } 1116 }
1117 1117
1118 public List<FriendListItem> GetUserFriends(UUID agentID) 1118 public List<FriendListItem> GetUserFriends(UUID agentID)
1119 { 1119 {
@@ -1126,6 +1126,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
1126 1126
1127 return fl; 1127 return fl;
1128 } 1128 }
1129 } 1129 }
1130 #endregion 1130 #endregion
1131} 1131}
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
index aafcfa2..9e76d79 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveReadRequest.cs
@@ -136,7 +136,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
136 successfulAssetRestores); 136 successfulAssetRestores);
137 } 137 }
138 else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH)) 138 else if (filePath.StartsWith(ArchiveConstants.INVENTORY_PATH))
139 { 139 {
140 InventoryFolderBase foundFolder 140 InventoryFolderBase foundFolder
141 = ReplicateArchivePathToUserInventory( 141 = ReplicateArchivePathToUserInventory(
142 filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType, 142 filePath, TarArchiveReader.TarEntryType.TYPE_DIRECTORY == entryType,
@@ -254,7 +254,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
254 254
255 string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex); 255 string newFolderName = rawDirsToCreate[i].Remove(identicalNameIdentifierIndex);
256 256
257 newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName); 257 newFolderName = InventoryArchiveUtils.UnescapeArchivePath(newFolderName);
258 UUID newFolderId = UUID.Random(); 258 UUID newFolderId = UUID.Random();
259 259
260 // Asset type has to be Unknown here rather than Folder, otherwise the created folder can't be 260 // Asset type has to be Unknown here rather than Folder, otherwise the created folder can't be
@@ -352,7 +352,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
352 item.Folder = loadFolder.ID; 352 item.Folder = loadFolder.ID;
353 353
354 //m_userInfo.AddItem(item); 354 //m_userInfo.AddItem(item);
355 m_scene.InventoryService.AddItem(item); 355 m_scene.InventoryService.AddItem(item);
356 356
357 return item; 357 return item;
358 } 358 }
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
index 247cee4..47b18d8 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveUtils.cs
@@ -116,7 +116,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
116 return startFolder; 116 return startFolder;
117 117
118 string[] components = SplitEscapedPath(path); 118 string[] components = SplitEscapedPath(path);
119 components[0] = UnescapePath(components[0]); 119 components[0] = UnescapePath(components[0]);
120 120
121 //string[] components = path.Split(new string[] { PATH_DELIMITER.ToString() }, 2, StringSplitOptions.None); 121 //string[] components = path.Split(new string[] { PATH_DELIMITER.ToString() }, 2, StringSplitOptions.None);
122 122
@@ -306,17 +306,17 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
306 public static string EscapeArchivePath(string path) 306 public static string EscapeArchivePath(string path)
307 { 307 {
308 // Only encode ampersands (for escaping anything) and / (since this is used as general dir separator). 308 // Only encode ampersands (for escaping anything) and / (since this is used as general dir separator).
309 return path.Replace("&", "&amp;").Replace("/", "&#47;"); 309 return path.Replace("&", "&amp;").Replace("/", "&#47;");
310 } 310 }
311 311
312 /// <summary> 312 /// <summary>
313 /// Unescape an archive path. 313 /// Unescape an archive path.
314 /// </summary> 314 /// </summary>
315 /// <param name="path"></param> 315 /// <param name="path"></param>
316 /// <returns></returns> 316 /// <returns></returns>
317 public static string UnescapeArchivePath(string path) 317 public static string UnescapeArchivePath(string path)
318 { 318 {
319 return path.Replace("&#47;", "/").Replace("&amp;", "&"); 319 return path.Replace("&#47;", "/").Replace("&amp;", "&");
320 } 320 }
321 } 321 }
322} \ No newline at end of file 322} \ No newline at end of file
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index bbb49f6..6e11f36 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -270,7 +270,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
270 inventoryFolder.Name, inventoryFolder.ID, m_invPath); 270 inventoryFolder.Name, inventoryFolder.ID, m_invPath);
271 271
272 //recurse through all dirs getting dirs and files 272 //recurse through all dirs getting dirs and files
273 SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar); 273 SaveInvFolder(inventoryFolder, ArchiveConstants.INVENTORY_PATH, !foundStar);
274 } 274 }
275 else if (inventoryItem != null) 275 else if (inventoryItem != null)
276 { 276 {
@@ -278,7 +278,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
278 "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}", 278 "[INVENTORY ARCHIVER]: Found item {0} {1} at {2}",
279 inventoryItem.Name, inventoryItem.ID, m_invPath); 279 inventoryItem.Name, inventoryItem.ID, m_invPath);
280 280
281 SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH); 281 SaveInvItem(inventoryItem, ArchiveConstants.INVENTORY_PATH);
282 } 282 }
283 else 283 else
284 { 284 {
@@ -288,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
288 m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", errorMessage); 288 m_log.ErrorFormat("[INVENTORY ARCHIVER]: {0}", errorMessage);
289 m_module.TriggerInventoryArchiveSaved( 289 m_module.TriggerInventoryArchiveSaved(
290 m_id, false, m_userInfo, m_invPath, m_saveStream, 290 m_id, false, m_userInfo, m_invPath, m_saveStream,
291 new Exception(errorMessage)); 291 new Exception(errorMessage));
292 return; 292 return;
293 } 293 }
294 294
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
index f8a010c..7927352 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/Tests/InventoryArchiverTests.cs
@@ -133,7 +133,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
133 InventoryFolderBase objsFolder 133 InventoryFolderBase objsFolder
134 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects"); 134 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects");
135 item1.Folder = objsFolder.ID; 135 item1.Folder = objsFolder.ID;
136 scene.AddInventoryItem(userId, item1); 136 scene.AddInventoryItem(userId, item1);
137 137
138 MemoryStream archiveWriteStream = new MemoryStream(); 138 MemoryStream archiveWriteStream = new MemoryStream();
139 archiverModule.OnInventoryArchiveSaved += SaveCompleted; 139 archiverModule.OnInventoryArchiveSaved += SaveCompleted;
@@ -348,7 +348,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
348 InventoryFolderBase objsFolder 348 InventoryFolderBase objsFolder
349 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects"); 349 = InventoryArchiveUtils.FindFolderByPath(scene.InventoryService, userId, "Objects");
350 item1.Folder = objsFolder.ID; 350 item1.Folder = objsFolder.ID;
351 scene.AddInventoryItem(userId, item1); 351 scene.AddInventoryItem(userId, item1);
352 352
353 MemoryStream archiveWriteStream = new MemoryStream(); 353 MemoryStream archiveWriteStream = new MemoryStream();
354 archiverModule.OnInventoryArchiveSaved += SaveCompleted; 354 archiverModule.OnInventoryArchiveSaved += SaveCompleted;
@@ -356,7 +356,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
356 mre.Reset(); 356 mre.Reset();
357 archiverModule.ArchiveInventory( 357 archiverModule.ArchiveInventory(
358 Guid.NewGuid(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream); 358 Guid.NewGuid(), userFirstName, userLastName, "Objects", userPassword, archiveWriteStream);
359 mre.WaitOne(60000, false); 359 mre.WaitOne(60000, false);
360 360
361 // LOAD ITEM 361 // LOAD ITEM
362 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray()); 362 MemoryStream archiveReadStream = new MemoryStream(archiveWriteStream.ToArray());
@@ -373,7 +373,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver.Tests
373// "Loaded item non-uuid creator doesn't match that of the loading user"); 373// "Loaded item non-uuid creator doesn't match that of the loading user");
374 Assert.That( 374 Assert.That(
375 foundItem1.Name, Is.EqualTo(itemName), 375 foundItem1.Name, Is.EqualTo(itemName),
376 "Loaded item name doesn't match saved name"); 376 "Loaded item name doesn't match saved name");
377 } 377 }
378 378
379 /// <summary> 379 /// <summary>
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs
index b546ccb..b5b5cea 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Alerts/DeadlockAlert.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.CoreModules.Framework.Monitoring.Monitors;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Alerts 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Alerts
4{ 31{
@@ -22,7 +49,7 @@ namespace OpenSim.Region.CoreModules.Framework.Monitoring.Alerts
22 { 49 {
23 if (m_monitor.GetValue() > 60 * 1000) 50 if (m_monitor.GetValue() > 60 * 1000)
24 { 51 {
25 if(OnTriggerAlert != null) 52 if (OnTriggerAlert != null)
26 { 53 {
27 OnTriggerAlert(typeof (DeadlockAlert), 54 OnTriggerAlert(typeof (DeadlockAlert),
28 (int) (m_monitor.GetValue()/1000) + " second(s) since last frame processed.", true); 55 (int) (m_monitor.GetValue()/1000) + " second(s) since last frame processed.", true);
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs
index b533df9..5ea5a4f 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/IAlert.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring 30namespace OpenSim.Region.CoreModules.Framework.Monitoring
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs
index a51dccd..9f618cc 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/IMonitor.cs
@@ -1,4 +1,31 @@
1namespace OpenSim.Region.CoreModules.Framework.Monitoring 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28namespace OpenSim.Region.CoreModules.Framework.Monitoring
2{ 29{
3 interface IMonitor 30 interface IMonitor
4 { 31 {
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
index 11aca99..d84f4ea 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/MonitorModule.cs
@@ -1,4 +1,31 @@
1using System.Collections; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System.Collections;
2using System.Collections.Generic; 29using System.Collections.Generic;
3using System.Reflection; 30using System.Reflection;
4using log4net; 31using log4net;
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs
index edc6e6b..4a2029e 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/AgentCountMonitor.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.Framework.Scenes; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.Framework.Scenes;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs
index afe6b79..4ab3edd 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ChildAgentCountMonitor.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.Framework.Scenes; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.Framework.Scenes;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs
index dec5a9e..356458d 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/EventFrameMonitor.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.Framework.Scenes; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.Framework.Scenes;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs
index cd67fea..aa2e9c0 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/GCMemoryMonitor.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs
index d883fc7..e1c36de 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LandFrameMonitor.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.Framework.Scenes; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.Framework.Scenes;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs
index 36363f8..f21a3ae 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/LastFrameTimeMonitor.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2using OpenSim.Region.Framework.Scenes; 29using OpenSim.Region.Framework.Scenes;
3 30
4namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 31namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs
index dd9b19d..10804f9 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ObjectCountMonitor.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.Framework.Scenes; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.Framework.Scenes;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs
index 88f2938..5f6190c 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PWSMemoryMonitor.cs
@@ -1,4 +1,31 @@
1using System; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs
index 4d62e4f..7c5bb0a 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsFrameMonitor.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.Framework.Scenes; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.Framework.Scenes;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs
index 91ac282..1894b3b 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/PhysicsUpdateFrameMonitor.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.Framework.Scenes; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.Framework.Scenes;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs
index 9300a93..63ddf07 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/ThreadCountMonitor.cs
@@ -1,4 +1,31 @@
1 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28
2namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 29namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
3{ 30{
4 class ThreadCountMonitor : IMonitor 31 class ThreadCountMonitor : IMonitor
diff --git a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs
index dea1f94..c3942bf 100644
--- a/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs
+++ b/OpenSim/Region/CoreModules/Framework/Monitoring/Monitors/TotalFrameMonitor.cs
@@ -1,4 +1,31 @@
1using OpenSim.Region.Framework.Scenes; 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSimulator Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using OpenSim.Region.Framework.Scenes;
2 29
3namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors 30namespace OpenSim.Region.CoreModules.Framework.Monitoring.Monitors
4{ 31{
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
index 0bd225e..1fa8630 100644
--- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs
+++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs
@@ -318,7 +318,7 @@ namespace OpenSim.Region.CoreModules.World.Land
318 } 318 }
319 319
320 public void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client) 320 public void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client)
321 { 321 {
322 SendLandProperties(0, snap_selection, 0, remote_client); 322 SendLandProperties(0, snap_selection, 0, remote_client);
323 } 323 }
324 324
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
index c790624..013a0ef 100644
--- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs
@@ -486,21 +486,21 @@ namespace OpenSim.Region.CoreModules.World.Permissions
486 } 486 }
487 protected bool IsFriendWithPerms(UUID user,UUID objectOwner) 487 protected bool IsFriendWithPerms(UUID user,UUID objectOwner)
488 { 488 {
489 489
490 if (user == UUID.Zero) 490 if (user == UUID.Zero)
491 return false; 491 return false;
492 492
493 if (m_friendsModule == null) 493 if (m_friendsModule == null)
494 return false; 494 return false;
495 495
496 List<FriendListItem> profile = m_friendsModule.GetUserFriends(user); 496 List<FriendListItem> profile = m_friendsModule.GetUserFriends(user);
497 497
498 foreach (FriendListItem item in profile) 498 foreach (FriendListItem item in profile)
499 { 499 {
500 if(item.Friend == objectOwner && (item.FriendPerms & (uint)FriendRights.CanModifyObjects) != 0) 500 if (item.Friend == objectOwner && (item.FriendPerms & (uint)FriendRights.CanModifyObjects) != 0)
501 return true; 501 return true;
502 } 502 }
503 return false; 503 return false;
504 } 504 }
505 505
506 protected bool IsEstateManager(UUID user) 506 protected bool IsEstateManager(UUID user)
diff --git a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
index cbe4118..30a95ce 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/ScenePresenceAnimator.cs
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
39 /// Handle all animation duties for a scene presence 39 /// Handle all animation duties for a scene presence
40 /// </summary> 40 /// </summary>
41 public class ScenePresenceAnimator 41 public class ScenePresenceAnimator
42 { 42 {
43 public AnimationSet Animations 43 public AnimationSet Animations
44 { 44 {
45 get { return m_animations; } 45 get { return m_animations; }
@@ -53,19 +53,19 @@ namespace OpenSim.Region.Framework.Scenes.Animation
53 { 53 {
54 get { return m_movementAnimation; } 54 get { return m_movementAnimation; }
55 } 55 }
56 protected string m_movementAnimation = "DEFAULT"; 56 protected string m_movementAnimation = "DEFAULT";
57 57
58 private int m_animTickFall; 58 private int m_animTickFall;
59 private int m_animTickJump; 59 private int m_animTickJump;
60 60
61 /// <value> 61 /// <value>
62 /// The scene presence that this animator applies to 62 /// The scene presence that this animator applies to
63 /// </value> 63 /// </value>
64 protected ScenePresence m_scenePresence; 64 protected ScenePresence m_scenePresence;
65 65
66 public ScenePresenceAnimator(ScenePresence sp) 66 public ScenePresenceAnimator(ScenePresence sp)
67 { 67 {
68 m_scenePresence = sp; 68 m_scenePresence = sp;
69 } 69 }
70 70
71 public void AddAnimation(UUID animID, UUID objectID) 71 public void AddAnimation(UUID animID, UUID objectID)
@@ -110,11 +110,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation
110 return; 110 return;
111 111
112 RemoveAnimation(animID); 112 RemoveAnimation(animID);
113 } 113 }
114 114
115 public void ResetAnimations() 115 public void ResetAnimations()
116 { 116 {
117 m_animations.Clear(); 117 m_animations.Clear();
118 } 118 }
119 119
120 /// <summary> 120 /// <summary>
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
131 anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, UUID.Zero)) 131 anim, m_scenePresence.ControllingClient.NextAnimationSequenceNumber, UUID.Zero))
132 { 132 {
133 // 16384 is CHANGED_ANIMATION 133 // 16384 is CHANGED_ANIMATION
134 m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { 16384 }); 134 m_scenePresence.SendScriptEventToAttachments("changed", new Object[] { 16384 });
135 SendAnimPack(); 135 SendAnimPack();
136 } 136 }
137 } 137 }
@@ -156,8 +156,8 @@ namespace OpenSim.Region.Framework.Scenes.Animation
156 Vector3 left = Vector3.Transform(Vector3.UnitY, rotMatrix); 156 Vector3 left = Vector3.Transform(Vector3.UnitY, rotMatrix);
157 157
158 // Check control flags 158 // Check control flags
159 bool heldForward = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_AT_POS; 159 bool heldForward = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_AT_POS || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS);
160 bool heldBack = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG; 160 bool heldBack = ((controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_AT_NEG || (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG);
161 bool heldLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS; 161 bool heldLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_POS;
162 bool heldRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG; 162 bool heldRight = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG) == AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG;
163 //bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT; 163 //bool heldTurnLeft = (controlFlags & AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT) == AgentManager.ControlFlags.AGENT_CONTROL_TURN_LEFT;
@@ -305,7 +305,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
305 #endregion Ground Movement 305 #endregion Ground Movement
306 306
307 return m_movementAnimation; 307 return m_movementAnimation;
308 } 308 }
309 309
310 /// <summary> 310 /// <summary>
311 /// Update the movement animation of this avatar according to its current state 311 /// Update the movement animation of this avatar according to its current state
@@ -391,7 +391,7 @@ namespace OpenSim.Region.Framework.Scenes.Animation
391 m_scenePresence.Scene.AssetService.Store(Animasset); 391 m_scenePresence.Scene.AssetService.Store(Animasset);
392 AddAnimation(Animasset.FullID, m_scenePresence.UUID); 392 AddAnimation(Animasset.FullID, m_scenePresence.UUID);
393 return anim; 393 return anim;
394 } 394 }
395 395
396 /// <summary> 396 /// <summary>
397 /// 397 ///
@@ -443,6 +443,6 @@ namespace OpenSim.Region.Framework.Scenes.Animation
443 m_animations.GetArrays(out animIDs, out sequenceNums, out objectIDs); 443 m_animations.GetArrays(out animIDs, out sequenceNums, out objectIDs);
444 444
445 SendAnimPack(animIDs, sequenceNums, objectIDs); 445 SendAnimPack(animIDs, sequenceNums, objectIDs);
446 } 446 }
447 } 447 }
448} \ No newline at end of file 448} \ No newline at end of file
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 2e15b86..4ffa1a2 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1164,16 +1164,16 @@ namespace OpenSim.Region.Framework.Scenes
1164 // Check if any objects have reached their targets 1164 // Check if any objects have reached their targets
1165 CheckAtTargets(); 1165 CheckAtTargets();
1166 1166
1167 // Update SceneObjectGroups that have scheduled themselves for updates
1168 // Objects queue their updates onto all scene presences
1169 if (m_frame % m_update_objects == 0)
1170 m_sceneGraph.UpdateObjectGroups();
1171
1172 // Run through all ScenePresences looking for updates 1167 // Run through all ScenePresences looking for updates
1173 // Presence updates and queued object updates for each presence are sent to clients 1168 // Presence updates and queued object updates for each presence are sent to clients
1174 if (m_frame % m_update_presences == 0) 1169 if (m_frame % m_update_presences == 0)
1175 m_sceneGraph.UpdatePresences(); 1170 m_sceneGraph.UpdatePresences();
1176 1171
1172 // Update SceneObjectGroups that have scheduled themselves for updates
1173 // Objects queue their updates onto all scene presences
1174 if (m_frame % m_update_objects == 0)
1175 m_sceneGraph.UpdateObjectGroups();
1176
1177 int TempPhysicsMS2 = Environment.TickCount; 1177 int TempPhysicsMS2 = Environment.TickCount;
1178 if ((m_frame % m_update_physics == 0) && m_physics_enabled) 1178 if ((m_frame % m_update_physics == 0) && m_physics_enabled)
1179 m_sceneGraph.UpdatePreparePhysics(); 1179 m_sceneGraph.UpdatePreparePhysics();
@@ -1266,7 +1266,7 @@ namespace OpenSim.Region.Framework.Scenes
1266 // allocations, and there is no more work to be done until someone logs in 1266 // allocations, and there is no more work to be done until someone logs in
1267 GC.Collect(); 1267 GC.Collect();
1268 1268
1269 m_log.DebugFormat("[REGION]: Enabling Logins for {0}", RegionInfo.RegionName); 1269 m_log.DebugFormat("[REGION]: Enabling logins for {0}", RegionInfo.RegionName);
1270 loginsdisabled = false; 1270 loginsdisabled = false;
1271 } 1271 }
1272 } 1272 }
@@ -3470,6 +3470,49 @@ namespace OpenSim.Region.Framework.Scenes
3470 agent.startpos.Y = crossedBorder.BorderLine.Z - 1; 3470 agent.startpos.Y = crossedBorder.BorderLine.Z - 1;
3471 } 3471 }
3472 3472
3473 //Mitigate http://opensimulator.org/mantis/view.php?id=3522
3474 // Check if start position is outside of region
3475 // If it is, check the Z start position also.. if not, leave it alone.
3476 if (BordersLocked)
3477 {
3478 lock (EastBorders)
3479 {
3480 if (agent.startpos.X > EastBorders[0].BorderLine.Z)
3481 {
3482 m_log.Warn("FIX AGENT POSITION");
3483 agent.startpos.X = EastBorders[0].BorderLine.Z * 0.5f;
3484 if (agent.startpos.Z > 720)
3485 agent.startpos.Z = 720;
3486 }
3487 }
3488 lock (NorthBorders)
3489 {
3490 if (agent.startpos.Y > NorthBorders[0].BorderLine.Z)
3491 {
3492 m_log.Warn("FIX Agent POSITION");
3493 agent.startpos.Y = NorthBorders[0].BorderLine.Z * 0.5f;
3494 if (agent.startpos.Z > 720)
3495 agent.startpos.Z = 720;
3496 }
3497 }
3498 }
3499 else
3500 {
3501 if (agent.startpos.X > EastBorders[0].BorderLine.Z)
3502 {
3503 m_log.Warn("FIX AGENT POSITION");
3504 agent.startpos.X = EastBorders[0].BorderLine.Z * 0.5f;
3505 if (agent.startpos.Z > 720)
3506 agent.startpos.Z = 720;
3507 }
3508 if (agent.startpos.Y > NorthBorders[0].BorderLine.Z)
3509 {
3510 m_log.Warn("FIX Agent POSITION");
3511 agent.startpos.Y = NorthBorders[0].BorderLine.Z * 0.5f;
3512 if (agent.startpos.Z > 720)
3513 agent.startpos.Z = 720;
3514 }
3515 }
3473 // Honor parcel landing type and position. 3516 // Honor parcel landing type and position.
3474 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); 3517 ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y);
3475 if (land != null) 3518 if (land != null)
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index bf2f3d3..cdec135 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2075,6 +2075,7 @@ namespace OpenSim.Region.Framework.Scenes
2075 { 2075 {
2076 if (PhysActor != null) 2076 if (PhysActor != null)
2077 { 2077 {
2078
2078 Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0); 2079 Vector3 newpos = new Vector3(PhysActor.Position.GetBytes(), 0);
2079 2080
2080 if (m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.N) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.S) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.E) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.W)) 2081 if (m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.N) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.S) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.E) | m_parentGroup.Scene.TestBorderCross(newpos, Cardinals.W))
@@ -2082,6 +2083,7 @@ namespace OpenSim.Region.Framework.Scenes
2082 m_parentGroup.AbsolutePosition = newpos; 2083 m_parentGroup.AbsolutePosition = newpos;
2083 return; 2084 return;
2084 } 2085 }
2086 //m_parentGroup.RootPart.m_groupPosition = newpos;
2085 } 2087 }
2086 ScheduleTerseUpdate(); 2088 ScheduleTerseUpdate();
2087 2089
@@ -2393,6 +2395,7 @@ namespace OpenSim.Region.Framework.Scenes
2393 if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) || 2395 if (!RotationOffset.ApproxEquals(m_lastRotation, ROTATION_TOLERANCE) ||
2394 !Acceleration.Equals(m_lastAcceleration) || 2396 !Acceleration.Equals(m_lastAcceleration) ||
2395 !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) || 2397 !Velocity.ApproxEquals(m_lastVelocity, VELOCITY_TOLERANCE) ||
2398 Velocity.ApproxEquals(Vector3.Zero, VELOCITY_TOLERANCE) ||
2396 !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) || 2399 !AngularVelocity.ApproxEquals(m_lastAngularVelocity, VELOCITY_TOLERANCE) ||
2397 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) || 2400 !OffsetPosition.ApproxEquals(m_lastPosition, POSITION_TOLERANCE) ||
2398 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE) 2401 Environment.TickCount - m_lastTerseSent > TIME_MS_TOLERANCE)
@@ -2427,6 +2430,7 @@ namespace OpenSim.Region.Framework.Scenes
2427 m_updateFlag = 0; //Same here 2430 m_updateFlag = 0; //Same here
2428 } 2431 }
2429 } 2432 }
2433 m_updateFlag = 0;
2430 } 2434 }
2431 2435
2432 /// <summary> 2436 /// <summary>
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index aa538dc..4e5fee1 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -73,7 +73,7 @@ namespace OpenSim.Region.Framework.Scenes
73// { 73// {
74// m_log.Debug("[ScenePresence] Destructor called"); 74// m_log.Debug("[ScenePresence] Destructor called");
75// } 75// }
76 76
77 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 77 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
78 78
79 private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 }; 79 private static readonly byte[] BAKE_INDICES = new byte[] { 8, 9, 10, 11, 19, 20 };
@@ -146,7 +146,6 @@ namespace OpenSim.Region.Framework.Scenes
146 private int m_perfMonMS; 146 private int m_perfMonMS;
147 147
148 private bool m_setAlwaysRun; 148 private bool m_setAlwaysRun;
149
150 private bool m_forceFly; 149 private bool m_forceFly;
151 private bool m_flyDisabled; 150 private bool m_flyDisabled;
152 151
@@ -154,6 +153,8 @@ namespace OpenSim.Region.Framework.Scenes
154 153
155 private Quaternion m_bodyRot= Quaternion.Identity; 154 private Quaternion m_bodyRot= Quaternion.Identity;
156 155
156 private const int LAND_VELOCITYMAG_MAX = 12;
157
157 public bool IsRestrictedToRegion; 158 public bool IsRestrictedToRegion;
158 159
159 public string JID = String.Empty; 160 public string JID = String.Empty;
@@ -168,7 +169,8 @@ namespace OpenSim.Region.Framework.Scenes
168 protected RegionInfo m_regionInfo; 169 protected RegionInfo m_regionInfo;
169 protected ulong crossingFromRegion; 170 protected ulong crossingFromRegion;
170 171
171 private readonly Vector3[] Dir_Vectors = new Vector3[6]; 172 private readonly Vector3[] Dir_Vectors = new Vector3[9];
173 private bool m_isNudging = false;
172 174
173 // Position of agent's camera in world (region cordinates) 175 // Position of agent's camera in world (region cordinates)
174 protected Vector3 m_CameraCenter; 176 protected Vector3 m_CameraCenter;
@@ -232,6 +234,8 @@ namespace OpenSim.Region.Framework.Scenes
232 DIR_CONTROL_FLAG_RIGHT = AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG, 234 DIR_CONTROL_FLAG_RIGHT = AgentManager.ControlFlags.AGENT_CONTROL_LEFT_NEG,
233 DIR_CONTROL_FLAG_UP = AgentManager.ControlFlags.AGENT_CONTROL_UP_POS, 235 DIR_CONTROL_FLAG_UP = AgentManager.ControlFlags.AGENT_CONTROL_UP_POS,
234 DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG, 236 DIR_CONTROL_FLAG_DOWN = AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG,
237 DIR_CONTROL_FLAG_FORWARD_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_POS,
238 DIR_CONTROL_FLAG_BACK_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_AT_NEG,
235 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG 239 DIR_CONTROL_FLAG_DOWN_NUDGE = AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG
236 } 240 }
237 241
@@ -247,7 +251,7 @@ namespace OpenSim.Region.Framework.Scenes
247 /// <value> 251 /// <value>
248 /// Script engines present in the scene 252 /// Script engines present in the scene
249 /// </value> 253 /// </value>
250 private IScriptModule[] m_scriptEngines; 254 private IScriptModule[] m_scriptEngines;
251 255
252 #region Properties 256 #region Properties
253 257
@@ -674,7 +678,7 @@ namespace OpenSim.Region.Framework.Scenes
674 AvatarWearable[] wearables) 678 AvatarWearable[] wearables)
675 : this(client, world, reginfo) 679 : this(client, world, reginfo)
676 { 680 {
677 m_appearance = new AvatarAppearance(m_uuid, wearables, visualParams); 681 m_appearance = new AvatarAppearance(m_uuid, wearables, visualParams);
678 } 682 }
679 683
680 public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance) 684 public ScenePresence(IClientAPI client, Scene world, RegionInfo reginfo, AvatarAppearance appearance)
@@ -716,21 +720,41 @@ namespace OpenSim.Region.Framework.Scenes
716 Dir_Vectors[3] = -Vector3.UnitY; //RIGHT 720 Dir_Vectors[3] = -Vector3.UnitY; //RIGHT
717 Dir_Vectors[4] = Vector3.UnitZ; //UP 721 Dir_Vectors[4] = Vector3.UnitZ; //UP
718 Dir_Vectors[5] = -Vector3.UnitZ; //DOWN 722 Dir_Vectors[5] = -Vector3.UnitZ; //DOWN
719 Dir_Vectors[5] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge 723 Dir_Vectors[6] = new Vector3(0.5f, 0f, 0f); //FORWARD_NUDGE
724 Dir_Vectors[7] = new Vector3(-0.5f, 0f, 0f); //BACK_NUDGE
725 Dir_Vectors[8] = new Vector3(0f, 0f, -0.5f); //DOWN_Nudge
720 } 726 }
721 727
722 private Vector3[] GetWalkDirectionVectors() 728 private Vector3[] GetWalkDirectionVectors()
723 { 729 {
724 Vector3[] vector = new Vector3[6]; 730 Vector3[] vector = new Vector3[9];
725 vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD 731 vector[0] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD
726 vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK 732 vector[1] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK
727 vector[2] = Vector3.UnitY; //LEFT 733 vector[2] = Vector3.UnitY; //LEFT
728 vector[3] = -Vector3.UnitY; //RIGHT 734 vector[3] = -Vector3.UnitY; //RIGHT
729 vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP 735 vector[4] = new Vector3(m_CameraAtAxis.Z, 0f, m_CameraUpAxis.Z); //UP
730 vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN 736 vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN
731 vector[5] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_Nudge 737 vector[6] = new Vector3(m_CameraUpAxis.Z, 0f, -m_CameraAtAxis.Z); //FORWARD_NUDGE
738 vector[7] = new Vector3(-m_CameraUpAxis.Z, 0f, m_CameraAtAxis.Z); //BACK_NUDGE
739 vector[8] = new Vector3(-m_CameraAtAxis.Z, 0f, -m_CameraUpAxis.Z); //DOWN_Nudge
732 return vector; 740 return vector;
733 } 741 }
742
743 private bool[] GetDirectionIsNudge()
744 {
745 bool[] isNudge = new bool[9];
746 isNudge[0] = false; //FORWARD
747 isNudge[1] = false; //BACK
748 isNudge[2] = false; //LEFT
749 isNudge[3] = false; //RIGHT
750 isNudge[4] = false; //UP
751 isNudge[5] = false; //DOWN
752 isNudge[6] = true; //FORWARD_NUDGE
753 isNudge[7] = true; //BACK_NUDGE
754 isNudge[8] = true; //DOWN_Nudge
755 return isNudge;
756 }
757
734 758
735 #endregion 759 #endregion
736 760
@@ -980,8 +1004,8 @@ namespace OpenSim.Region.Framework.Scenes
980 public void StopFlying() 1004 public void StopFlying()
981 { 1005 {
982 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities 1006 // It turns out to get the agent to stop flying, you have to feed it stop flying velocities
983 // and send a full object update. 1007 // There's no explicit message to send the client to tell it to stop flying.. it relies on the
984 // There's no message to send the client to tell it to stop flying 1008 // velocity, collision plane and avatar height
985 1009
986 // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air 1010 // Add 1/6 the avatar's height to it's position so it doesn't shoot into the air
987 // when the avatar stands up 1011 // when the avatar stands up
@@ -995,8 +1019,8 @@ namespace OpenSim.Region.Framework.Scenes
995 AbsolutePosition = AbsolutePosition + new Vector3(0f, 0f, (1.56f / 6f)); 1019 AbsolutePosition = AbsolutePosition + new Vector3(0f, 0f, (1.56f / 6f));
996 } 1020 }
997 1021
998 Animator.TrySetMovementAnimation("LAND"); 1022 ControllingClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_rootRegionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
999 SendFullUpdateToAllClients(); 1023 AbsolutePosition, Velocity, Vector3.Zero, m_bodyRot, new Vector4(0,0,1,AbsolutePosition.Z - 0.5f), m_uuid, null, GetUpdatePriority(ControllingClient)));
1000 } 1024 }
1001 1025
1002 public void AddNeighbourRegion(ulong regionHandle, string cap) 1026 public void AddNeighbourRegion(ulong regionHandle, string cap)
@@ -1147,7 +1171,6 @@ namespace OpenSim.Region.Framework.Scenes
1147 // // m_log.Debug("DEBUG: HandleAgentUpdate: child agent"); 1171 // // m_log.Debug("DEBUG: HandleAgentUpdate: child agent");
1148 // return; 1172 // return;
1149 //} 1173 //}
1150
1151 m_perfMonMS = Environment.TickCount; 1174 m_perfMonMS = Environment.TickCount;
1152 1175
1153 ++m_movementUpdateCount; 1176 ++m_movementUpdateCount;
@@ -1229,7 +1252,6 @@ namespace OpenSim.Region.Framework.Scenes
1229 m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(m_CameraCenter - posAdjusted), Vector3.Distance(m_CameraCenter, posAdjusted) + 0.3f, RayCastCameraCallback); 1252 m_scene.PhysicsScene.RaycastWorld(m_pos, Vector3.Normalize(m_CameraCenter - posAdjusted), Vector3.Distance(m_CameraCenter, posAdjusted) + 0.3f, RayCastCameraCallback);
1230 } 1253 }
1231 } 1254 }
1232
1233 lock (scriptedcontrols) 1255 lock (scriptedcontrols)
1234 { 1256 {
1235 if (scriptedcontrols.Count > 0) 1257 if (scriptedcontrols.Count > 0)
@@ -1261,7 +1283,6 @@ namespace OpenSim.Region.Framework.Scenes
1261 { 1283 {
1262 return; 1284 return;
1263 } 1285 }
1264
1265 if (m_allowMovement) 1286 if (m_allowMovement)
1266 { 1287 {
1267 int i = 0; 1288 int i = 0;
@@ -1289,6 +1310,11 @@ namespace OpenSim.Region.Framework.Scenes
1289 update_rotation = true; 1310 update_rotation = true;
1290 } 1311 }
1291 1312
1313 //guilty until proven innocent..
1314 bool Nudging = true;
1315 //Basically, if there is at least one non-nudge control then we don't need
1316 //to worry about stopping the avatar
1317
1292 if (m_parentID == 0) 1318 if (m_parentID == 0)
1293 { 1319 {
1294 bool bAllowUpdateMoveToPosition = false; 1320 bool bAllowUpdateMoveToPosition = false;
@@ -1303,6 +1329,12 @@ namespace OpenSim.Region.Framework.Scenes
1303 else 1329 else
1304 dirVectors = Dir_Vectors; 1330 dirVectors = Dir_Vectors;
1305 1331
1332 bool[] isNudge = GetDirectionIsNudge();
1333
1334
1335
1336
1337
1306 foreach (Dir_ControlFlags DCF in DIR_CONTROL_FLAGS) 1338 foreach (Dir_ControlFlags DCF in DIR_CONTROL_FLAGS)
1307 { 1339 {
1308 if (((uint)flags & (uint)DCF) != 0) 1340 if (((uint)flags & (uint)DCF) != 0)
@@ -1312,6 +1344,10 @@ namespace OpenSim.Region.Framework.Scenes
1312 try 1344 try
1313 { 1345 {
1314 agent_control_v3 += dirVectors[i]; 1346 agent_control_v3 += dirVectors[i];
1347 if (isNudge[i] == false)
1348 {
1349 Nudging = false;
1350 }
1315 } 1351 }
1316 catch (IndexOutOfRangeException) 1352 catch (IndexOutOfRangeException)
1317 { 1353 {
@@ -1373,6 +1409,9 @@ namespace OpenSim.Region.Framework.Scenes
1373 // Ignore z component of vector 1409 // Ignore z component of vector
1374 Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f); 1410 Vector3 LocalVectorToTarget2D = new Vector3((float)(LocalVectorToTarget3D.X), (float)(LocalVectorToTarget3D.Y), 0f);
1375 LocalVectorToTarget2D.Normalize(); 1411 LocalVectorToTarget2D.Normalize();
1412
1413 //We're not nudging
1414 Nudging = false;
1376 agent_control_v3 += LocalVectorToTarget2D; 1415 agent_control_v3 += LocalVectorToTarget2D;
1377 1416
1378 // update avatar movement flags. the avatar coordinate system is as follows: 1417 // update avatar movement flags. the avatar coordinate system is as follows:
@@ -1431,6 +1470,8 @@ namespace OpenSim.Region.Framework.Scenes
1431 // Only do this if we're flying 1470 // Only do this if we're flying
1432 if (m_physicsActor != null && m_physicsActor.Flying && !m_forceFly) 1471 if (m_physicsActor != null && m_physicsActor.Flying && !m_forceFly)
1433 { 1472 {
1473 // Landing detection code
1474
1434 // Are the landing controls requirements filled? 1475 // Are the landing controls requirements filled?
1435 bool controlland = (((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || 1476 bool controlland = (((flags & AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) ||
1436 ((flags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); 1477 ((flags & AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0));
@@ -1440,7 +1481,10 @@ namespace OpenSim.Region.Framework.Scenes
1440 1481
1441 if (m_physicsActor.Flying && colliding && controlland) 1482 if (m_physicsActor.Flying && colliding && controlland)
1442 { 1483 {
1443 StopFlying(); 1484 // nesting this check because LengthSquared() is expensive and we don't
1485 // want to do it every step when flying.
1486 if ((Velocity.LengthSquared() <= LAND_VELOCITYMAG_MAX))
1487 StopFlying();
1444 } 1488 }
1445 } 1489 }
1446 1490
@@ -1450,7 +1494,7 @@ namespace OpenSim.Region.Framework.Scenes
1450 // m_log.DebugFormat( 1494 // m_log.DebugFormat(
1451 // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3); 1495 // "In {0} adding velocity to {1} of {2}", m_scene.RegionInfo.RegionName, Name, agent_control_v3);
1452 1496
1453 AddNewMovement(agent_control_v3, q); 1497 AddNewMovement(agent_control_v3, q, Nudging);
1454 1498
1455 if (update_movementflag) 1499 if (update_movementflag)
1456 Animator.UpdateMovementAnimations(); 1500 Animator.UpdateMovementAnimations();
@@ -1923,7 +1967,7 @@ namespace OpenSim.Region.Framework.Scenes
1923 /// </summary> 1967 /// </summary>
1924 /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param> 1968 /// <param name="vec">The vector in which to move. This is relative to the rotation argument</param>
1925 /// <param name="rotation">The direction in which this avatar should now face. 1969 /// <param name="rotation">The direction in which this avatar should now face.
1926 public void AddNewMovement(Vector3 vec, Quaternion rotation) 1970 public void AddNewMovement(Vector3 vec, Quaternion rotation, bool Nudging)
1927 { 1971 {
1928 if (m_isChildAgent) 1972 if (m_isChildAgent)
1929 { 1973 {
@@ -1997,7 +2041,7 @@ namespace OpenSim.Region.Framework.Scenes
1997 2041
1998 // TODO: Add the force instead of only setting it to support multiple forces per frame? 2042 // TODO: Add the force instead of only setting it to support multiple forces per frame?
1999 m_forceToApply = direc; 2043 m_forceToApply = direc;
2000 2044 m_isNudging = Nudging;
2001 m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); 2045 m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS);
2002 } 2046 }
2003 2047
@@ -2012,7 +2056,7 @@ namespace OpenSim.Region.Framework.Scenes
2012 const float POSITION_TOLERANCE = 0.05f; 2056 const float POSITION_TOLERANCE = 0.05f;
2013 //const int TIME_MS_TOLERANCE = 3000; 2057 //const int TIME_MS_TOLERANCE = 3000;
2014 2058
2015 SendPrimUpdates(); 2059
2016 2060
2017 if (m_newCoarseLocations) 2061 if (m_newCoarseLocations)
2018 { 2062 {
@@ -2048,6 +2092,9 @@ namespace OpenSim.Region.Framework.Scenes
2048 CheckForBorderCrossing(); 2092 CheckForBorderCrossing();
2049 CheckForSignificantMovement(); // sends update to the modules. 2093 CheckForSignificantMovement(); // sends update to the modules.
2050 } 2094 }
2095
2096 //Sending prim updates AFTER the avatar terse updates are sent
2097 SendPrimUpdates();
2051 } 2098 }
2052 2099
2053 #endregion 2100 #endregion
@@ -2901,14 +2948,24 @@ namespace OpenSim.Region.Framework.Scenes
2901 { 2948 {
2902 if (m_forceToApply.HasValue) 2949 if (m_forceToApply.HasValue)
2903 { 2950 {
2904 Vector3 force = m_forceToApply.Value;
2905 2951
2952 Vector3 force = m_forceToApply.Value;
2906 m_updateflag = true; 2953 m_updateflag = true;
2907// movementvector = force;
2908 Velocity = force; 2954 Velocity = force;
2909 2955
2910 m_forceToApply = null; 2956 m_forceToApply = null;
2911 } 2957 }
2958 else
2959 {
2960 if (m_isNudging)
2961 {
2962 Vector3 force = Vector3.Zero;
2963
2964 m_updateflag = true;
2965 Velocity = force;
2966 m_isNudging = false;
2967 }
2968 }
2912 } 2969 }
2913 2970
2914 public override void SetText(string text, Vector3 color, double alpha) 2971 public override void SetText(string text, Vector3 color, double alpha)
@@ -3084,7 +3141,7 @@ namespace OpenSim.Region.Framework.Scenes
3084 3141
3085 public ScenePresence() 3142 public ScenePresence()
3086 { 3143 {
3087 m_sendCourseLocationsMethod = SendCoarseLocationsDefault; 3144 m_sendCourseLocationsMethod = SendCoarseLocationsDefault;
3088 CreateSceneViewer(); 3145 CreateSceneViewer();
3089 m_animator = new ScenePresenceAnimator(this); 3146 m_animator = new ScenePresenceAnimator(this);
3090 } 3147 }
@@ -3172,8 +3229,8 @@ namespace OpenSim.Region.Framework.Scenes
3172 } 3229 }
3173 } 3230 }
3174 } 3231 }
3175 } 3232 }
3176 } 3233 }
3177 3234
3178 public bool CrossAttachmentsIntoNewRegion(ulong regionHandle, bool silent) 3235 public bool CrossAttachmentsIntoNewRegion(ulong regionHandle, bool silent)
3179 { 3236 {
diff --git a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
index b68a044..a36c4db 100644
--- a/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
+++ b/OpenSim/Region/Framework/Scenes/Tests/UuidGathererTests.cs
@@ -65,7 +65,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
65 m_uuidGatherer.GatherAssetUuids(corruptAssetUuid, AssetType.Object, foundAssetUuids); 65 m_uuidGatherer.GatherAssetUuids(corruptAssetUuid, AssetType.Object, foundAssetUuids);
66 66
67 // We count the uuid as gathered even if the asset itself is corrupt. 67 // We count the uuid as gathered even if the asset itself is corrupt.
68 Assert.That(foundAssetUuids.Count, Is.EqualTo(1)); 68 Assert.That(foundAssetUuids.Count, Is.EqualTo(1));
69 } 69 }
70 70
71 /// <summary> 71 /// <summary>
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests
76 { 76 {
77 TestHelper.InMethod(); 77 TestHelper.InMethod();
78 78
79 UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666"); 79 UUID missingAssetUuid = UUID.Parse("00000000-0000-0000-0000-000000000666");
80 IDictionary<UUID, int> foundAssetUuids = new Dictionary<UUID, int>(); 80 IDictionary<UUID, int> foundAssetUuids = new Dictionary<UUID, int>();
81 81
82 m_uuidGatherer.GatherAssetUuids(missingAssetUuid, AssetType.Object, foundAssetUuids); 82 m_uuidGatherer.GatherAssetUuids(missingAssetUuid, AssetType.Object, foundAssetUuids);
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
index 2bf96e4..b0e9a91 100644
--- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -2185,9 +2185,30 @@ Console.WriteLine(" JointCreateFixed");
2185 if (IsPhysical) 2185 if (IsPhysical)
2186 { 2186 {
2187 Vector3 iforce = Vector3.Zero; 2187 Vector3 iforce = Vector3.Zero;
2188 for (int i = 0; i < m_forcelist.Count; i++) 2188 int i = 0;
2189 try
2189 { 2190 {
2190 iforce = iforce + (m_forcelist[i] * 100); 2191 for (i = 0; i < m_forcelist.Count; i++)
2192 {
2193
2194 iforce = iforce + (m_forcelist[i] * 100);
2195 }
2196 }
2197 catch (IndexOutOfRangeException)
2198 {
2199 m_forcelist = new List<Vector3>();
2200 m_collisionscore = 0;
2201 m_interpenetrationcount = 0;
2202 m_taintforce = false;
2203 return;
2204 }
2205 catch (ArgumentOutOfRangeException)
2206 {
2207 m_forcelist = new List<Vector3>();
2208 m_collisionscore = 0;
2209 m_interpenetrationcount = 0;
2210 m_taintforce = false;
2211 return;
2191 } 2212 }
2192 d.BodyEnable(Body); 2213 d.BodyEnable(Body);
2193 d.BodyAddForce(Body, iforce.X, iforce.Y, iforce.Z); 2214 d.BodyAddForce(Body, iforce.X, iforce.Y, iforce.Z);
@@ -2416,6 +2437,9 @@ Console.WriteLine(" JointCreateFixed");
2416 { 2437 {
2417 // Averate previous velocity with the new one so 2438 // Averate previous velocity with the new one so
2418 // client object interpolation works a 'little' better 2439 // client object interpolation works a 'little' better
2440 if (_zeroFlag)
2441 return Vector3.Zero;
2442
2419 Vector3 returnVelocity = Vector3.Zero; 2443 Vector3 returnVelocity = Vector3.Zero;
2420 returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2; 2444 returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2;
2421 returnVelocity.Y = (m_lastVelocity.Y + _velocity.Y)/2; 2445 returnVelocity.Y = (m_lastVelocity.Y + _velocity.Y)/2;
@@ -2518,7 +2542,9 @@ Console.WriteLine(" JointCreateFixed");
2518 { 2542 {
2519 if (force.IsFinite()) 2543 if (force.IsFinite())
2520 { 2544 {
2521 m_forcelist.Add(force); 2545 lock (m_forcelist)
2546 m_forcelist.Add(force);
2547
2522 m_taintforce = true; 2548 m_taintforce = true;
2523 } 2549 }
2524 else 2550 else
@@ -2702,7 +2728,7 @@ Console.WriteLine(" JointCreateFixed");
2702 //outofBounds = true; 2728 //outofBounds = true;
2703 } 2729 }
2704 2730
2705// float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation)); 2731 //float Adiff = 1.0f - Math.Abs(Quaternion.Dot(m_lastorientation, l_orientation));
2706//Console.WriteLine("Adiff " + m_primName + " = " + Adiff); 2732//Console.WriteLine("Adiff " + m_primName + " = " + Adiff);
2707 if ((Math.Abs(m_lastposition.X - l_position.X) < 0.02) 2733 if ((Math.Abs(m_lastposition.X - l_position.X) < 0.02)
2708 && (Math.Abs(m_lastposition.Y - l_position.Y) < 0.02) 2734 && (Math.Abs(m_lastposition.Y - l_position.Y) < 0.02)
@@ -2718,6 +2744,8 @@ Console.WriteLine(" JointCreateFixed");
2718 { 2744 {
2719 //m_log.Debug(Math.Abs(m_lastposition.X - l_position.X).ToString()); 2745 //m_log.Debug(Math.Abs(m_lastposition.X - l_position.X).ToString());
2720 _zeroFlag = false; 2746 _zeroFlag = false;
2747 m_lastUpdateSent = false;
2748 //m_throttleUpdates = false;
2721 } 2749 }
2722 2750
2723 if (_zeroFlag) 2751 if (_zeroFlag)
@@ -2744,7 +2772,9 @@ Console.WriteLine(" JointCreateFixed");
2744 m_rotationalVelocity = pv; 2772 m_rotationalVelocity = pv;
2745 2773
2746 if (_parent == null) 2774 if (_parent == null)
2775 {
2747 base.RequestPhysicsterseUpdate(); 2776 base.RequestPhysicsterseUpdate();
2777 }
2748 2778
2749 m_lastUpdateSent = true; 2779 m_lastUpdateSent = true;
2750 } 2780 }
@@ -2754,7 +2784,9 @@ Console.WriteLine(" JointCreateFixed");
2754 if (lastZeroFlag != _zeroFlag) 2784 if (lastZeroFlag != _zeroFlag)
2755 { 2785 {
2756 if (_parent == null) 2786 if (_parent == null)
2787 {
2757 base.RequestPhysicsterseUpdate(); 2788 base.RequestPhysicsterseUpdate();
2789 }
2758 } 2790 }
2759 2791
2760 m_lastVelocity = _velocity; 2792 m_lastVelocity = _velocity;
@@ -2787,7 +2819,9 @@ Console.WriteLine(" JointCreateFixed");
2787 if (!m_throttleUpdates || throttleCounter > _parent_scene.geomUpdatesPerThrottledUpdate) 2819 if (!m_throttleUpdates || throttleCounter > _parent_scene.geomUpdatesPerThrottledUpdate)
2788 { 2820 {
2789 if (_parent == null) 2821 if (_parent == null)
2822 {
2790 base.RequestPhysicsterseUpdate(); 2823 base.RequestPhysicsterseUpdate();
2824 }
2791 } 2825 }
2792 else 2826 else
2793 { 2827 {
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
index 981cf43..e6b31ca 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs
@@ -835,7 +835,18 @@ namespace OpenSim.Region.Physics.OdePlugin
835 // allows us to have different settings 835 // allows us to have different settings
836 836
837 // We only need to test p2 for 'jump crouch purposes' 837 // We only need to test p2 for 'jump crouch purposes'
838 p2.IsColliding = true; 838 if (p2 is OdeCharacter)
839 {
840 // Testing if the collision is at the feet of the avatar
841
842 //m_log.DebugFormat("[PHYSICS]: {0} - {1} - {2} - {3}", curContact.pos.Z, p2.Position.Z, (p2.Position.Z - curContact.pos.Z), (p2.Size.Z * 0.6f));
843 if ((p2.Position.Z - curContact.pos.Z) > (p2.Size.Z * 0.6f))
844 p2.IsColliding = true;
845 }
846 else
847 {
848 p2.IsColliding = true;
849 }
839 850
840 //if ((framecount % m_returncollisions) == 0) 851 //if ((framecount % m_returncollisions) == 0)
841 852
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
index 7ec1d4b..92f060b 100644
--- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
+++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs
@@ -325,7 +325,7 @@ namespace OpenSim.Region.RegionCombinerModule
325 >= (regionConnections.Y * (int)Constants.RegionSize))) 325 >= (regionConnections.Y * (int)Constants.RegionSize)))
326 { 326 {
327 connectedYN = DoWorkForOneRegionOverXPlusY(conn, regionConnections, scene); 327 connectedYN = DoWorkForOneRegionOverXPlusY(conn, regionConnections, scene);
328 break; 328 break;
329 } 329 }
330 330
331 // If we're one region over +x +y 331 // If we're one region over +x +y
@@ -338,7 +338,7 @@ namespace OpenSim.Region.RegionCombinerModule
338 >= (regionConnections.Y * (int)Constants.RegionSize))) 338 >= (regionConnections.Y * (int)Constants.RegionSize)))
339 { 339 {
340 connectedYN = DoWorkForOneRegionOverPlusXPlusY(conn, regionConnections, scene); 340 connectedYN = DoWorkForOneRegionOverPlusXPlusY(conn, regionConnections, scene);
341 break; 341 break;
342 342
343 } 343 }
344 } 344 }
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 5fb2775..50b2fb5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -1271,11 +1271,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1271 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) 1271 if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
1272 return; 1272 return;
1273 if (scale.x < 0.01) 1273 if (scale.x < 0.01)
1274 scale.x = 0.01; 1274 scale.x = 0.01;
1275 if (scale.y < 0.01) 1275 if (scale.y < 0.01)
1276 scale.y = 0.01; 1276 scale.y = 0.01;
1277 if (scale.z < 0.01) 1277 if (scale.z < 0.01)
1278 scale.z = 0.01; 1278 scale.z = 0.01;
1279 1279
1280 if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical) 1280 if (part.ParentGroup.RootPart.PhysActor != null && part.ParentGroup.RootPart.PhysActor.IsPhysical)
1281 { 1281 {
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
index 41ecfd3..e427f50 100644
--- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/CSCodeGenerator.cs
@@ -722,8 +722,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
722 if (fls.kids.Top is IdentExpression && 1 == fls.kids.Count) 722 if (fls.kids.Top is IdentExpression && 1 == fls.kids.Count)
723 return retstr; 723 return retstr;
724 724
725 foreach (SYMBOL s in fls.kids) 725 for (int i = 0; i < fls.kids.Count; i++)
726 { 726 {
727 SYMBOL s = (SYMBOL)fls.kids[i];
728
729 // Statements surrounded by parentheses in for loops
730 //
731 // e.g. for ((i = 0), (j = 7); (i < 10); (++i))
732 //
733 // are legal in LSL but not in C# so we need to discard the parentheses
734 //
735 // The following, however, does not appear to be legal in LLS
736 //
737 // for ((i = 0, j = 7); (i < 10); (++i))
738 //
739 // As of Friday 20th November 2009, the Linden Lab simulators appear simply never to compile or run this
740 // script but with no debug or warnings at all! Therefore, we won't deal with this yet (which looks
741 // like it would be considerably more complicated to handle).
742 while (s is ParenthesisExpression)
743 s = (SYMBOL)s.kids.Pop();
744
727 retstr += GenerateNode(s); 745 retstr += GenerateNode(s);
728 if (0 < comma--) 746 if (0 < comma--)
729 retstr += Generate(", "); 747 retstr += Generate(", ");
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 549c038..41b5d49 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -252,18 +252,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
252 { 252 {
253 m_Apis[api] = am.CreateApi(api); 253 m_Apis[api] = am.CreateApi(api);
254 m_Apis[api].Initialize(engine, part, m_LocalID, itemID); 254 m_Apis[api].Initialize(engine, part, m_LocalID, itemID);
255 } 255 }
256 256
257 try 257 try
258 { 258 {
259 if (dom != System.AppDomain.CurrentDomain) 259 if (dom != System.AppDomain.CurrentDomain)
260 m_Script = (IScript)dom.CreateInstanceAndUnwrap( 260 m_Script = (IScript)dom.CreateInstanceAndUnwrap(
261 Path.GetFileNameWithoutExtension(assembly), 261 Path.GetFileNameWithoutExtension(assembly),
262 "SecondLife.Script"); 262 "SecondLife.Script");
263 else 263 else
264 m_Script = (IScript)Assembly.Load( 264 m_Script = (IScript)Assembly.Load(
265 Path.GetFileNameWithoutExtension(assembly)).CreateInstance( 265 Path.GetFileNameWithoutExtension(assembly)).CreateInstance(
266 "SecondLife.Script"); 266 "SecondLife.Script");
267 267
268 268
269 //ILease lease = (ILease)RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass); 269 //ILease lease = (ILease)RemotingServices.GetLifetimeService(m_Script as ScriptBaseClass);
@@ -903,7 +903,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
903 // If the state is different, update the disk file. 903 // If the state is different, update the disk file.
904 UUID hash = UUID.Parse(Utils.MD5String(xml)); 904 UUID hash = UUID.Parse(Utils.MD5String(xml));
905 905
906 if(hash != m_CurrentStateHash) 906 if (hash != m_CurrentStateHash)
907 { 907 {
908 try 908 try
909 { 909 {
diff --git a/OpenSim/Services/InventoryService/InventoryService.cs b/OpenSim/Services/InventoryService/InventoryService.cs
index 70c55a5..d4da4d3 100644
--- a/OpenSim/Services/InventoryService/InventoryService.cs
+++ b/OpenSim/Services/InventoryService/InventoryService.cs
@@ -439,6 +439,7 @@ namespace OpenSim.Services.InventoryService
439 439
440 public virtual bool DeleteFolders(UUID ownerID, List<UUID> folderIDs) 440 public virtual bool DeleteFolders(UUID ownerID, List<UUID> folderIDs)
441 { 441 {
442 m_log.InfoFormat("[INVENTORY SERVICE]: Deleting {0} folders from user {1}", folderIDs.Count, ownerID);
442 foreach (UUID id in folderIDs) 443 foreach (UUID id in folderIDs)
443 { 444 {
444 InventoryFolderBase folder = new InventoryFolderBase(id, ownerID); 445 InventoryFolderBase folder = new InventoryFolderBase(id, ownerID);
diff --git a/OpenSim/Tests/Common/Mock/MockUserService.cs b/OpenSim/Tests/Common/Mock/MockUserService.cs
index 62c41c7..396ef25 100644
--- a/OpenSim/Tests/Common/Mock/MockUserService.cs
+++ b/OpenSim/Tests/Common/Mock/MockUserService.cs
@@ -34,7 +34,7 @@ using OpenSim.Framework.Communications.Cache;
34using OpenSim.Services.Interfaces; 34using OpenSim.Services.Interfaces;
35 35
36namespace OpenSim.Tests.Common 36namespace OpenSim.Tests.Common
37{ 37{
38 public class MockUserService : IUserService 38 public class MockUserService : IUserService
39 { 39 {
40 public void AddTemporaryUserProfile(UserProfileData userProfile) 40 public void AddTemporaryUserProfile(UserProfileData userProfile)
diff --git a/OpenSim/Tests/Common/Setup/AssetHelpers.cs b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
index df69cd9..1188b62 100644
--- a/OpenSim/Tests/Common/Setup/AssetHelpers.cs
+++ b/OpenSim/Tests/Common/Setup/AssetHelpers.cs
@@ -32,7 +32,7 @@ using OpenSim.Region.Framework.Scenes;
32using OpenSim.Region.Framework.Scenes.Serialization; 32using OpenSim.Region.Framework.Scenes.Serialization;
33 33
34namespace OpenSim.Tests.Common 34namespace OpenSim.Tests.Common
35{ 35{
36 public class AssetHelpers 36 public class AssetHelpers
37 { 37 {
38 /// <summary> 38 /// <summary>
diff --git a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
index 1b06a46..cb76bc1 100644
--- a/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
+++ b/OpenSim/Tests/Common/Setup/UserProfileTestUtils.cs
@@ -113,6 +113,6 @@ namespace OpenSim.Tests.Common.Setup
113 userInfo.FetchInventory(); 113 userInfo.FetchInventory();
114 114
115 return userInfo; 115 return userInfo;
116 } 116 }
117 } 117 }
118} 118}