diff --git a/OpenSim/Framework/Statistics/StatsManager.cs b/OpenSim/Framework/Statistics/StatsManager.cs index 43159ef235..436ce2fa04 100644 --- a/OpenSim/Framework/Statistics/StatsManager.cs +++ b/OpenSim/Framework/Statistics/StatsManager.cs @@ -34,14 +34,12 @@ namespace OpenSim.Framework.Statistics { private static AssetStatsCollector assetStats; private static UserStatsCollector userStats; - private static SimExtraStatsCollector simExtraStats; + private static SimExtraStatsCollector simExtraStats = new SimExtraStatsCollector(); public static AssetStatsCollector AssetStats { get { return assetStats; } } public static UserStatsCollector UserStats { get { return userStats; } } public static SimExtraStatsCollector SimExtraStats { get { return simExtraStats; } } - private StatsManager() {} - /// /// Start collecting statistics related to assets. /// Should only be called once. @@ -63,16 +61,5 @@ namespace OpenSim.Framework.Statistics return userStats; } - - /// - /// Start collecting extra sim statistics apart from those collected for the client. - /// Should only be called once. - /// - public static SimExtraStatsCollector StartCollectingSimExtraStats() - { - simExtraStats = new SimExtraStatsCollector(); - - return simExtraStats; - } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs index caba236a9c..9c38ebedbe 100644 --- a/OpenSim/Region/Application/OpenSim.cs +++ b/OpenSim/Region/Application/OpenSim.cs @@ -486,10 +486,10 @@ namespace OpenSim else presence.ControllingClient.Kick("\nThe OpenSim manager kicked you out.\n"); - // ...and close on our side presence.Scene.IncomingCloseAgent(presence.UUID); } } + MainConsole.Instance.Output(""); } diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index 045e8d2f4a..9a0fa70d35 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -223,8 +223,6 @@ namespace OpenSim base.StartupSpecific(); - m_stats = StatsManager.StartCollectingSimExtraStats(); - // Create a ModuleLoader instance m_moduleLoader = new ModuleLoader(m_config.Source); diff --git a/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs b/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs index 90b3ede57c..1b8535cacb 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/IncomingPacket.cs @@ -39,7 +39,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP public sealed class IncomingPacket { /// Client this packet came from - public LLUDPClient Client; + public LLClientView Client; + /// Packet data that has been received public Packet Packet; @@ -48,7 +49,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// /// Reference to the client this packet came from /// Packet data - public IncomingPacket(LLUDPClient client, Packet packet) + public IncomingPacket(LLClientView client, Packet packet) { Client = client; Packet = packet; diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 4d6081c447..74b9c6d773 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -494,10 +494,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP "[CLIENT]: Close has been called for {0} attached to scene {1}", Name, m_scene.RegionInfo.RegionName); - // Send the STOP packet - DisableSimulatorPacket disable = (DisableSimulatorPacket)PacketPool.Instance.GetPacket(PacketType.DisableSimulator); - OutPacket(disable, ThrottleOutPacketType.Unknown); - IsActive = false; // Shutdown the image manager diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 09bb52c046..7f86491f4c 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -147,11 +147,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP private int m_elapsed500MSOutgoingPacketHandler; /// Flag to signal when clients should check for resends - private bool m_resendUnacked; + protected bool m_resendUnacked; + /// Flag to signal when clients should send ACKs - private bool m_sendAcks; + protected bool m_sendAcks; + /// Flag to signal when clients should send pings - private bool m_sendPing; + protected bool m_sendPing; private int m_defaultRTO = 0; private int m_maxRTO = 0; @@ -537,8 +539,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP SendPacket(udpClient, completePing, ThrottleOutPacketType.Unknown, false, null); } - public void HandleUnacked(LLUDPClient udpClient) + public void HandleUnacked(LLClientView client) { + LLUDPClient udpClient = client.UDPClient; + if (!udpClient.IsConnected) return; @@ -551,12 +555,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (udpClient.IsPaused) timeoutTicks = m_pausedAckTimeout; - if ((Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks) + if (!client.IsLoggingOut && + (Environment.TickCount & Int32.MaxValue) - udpClient.TickLastPacketReceived > timeoutTicks) { m_log.Warn("[LLUDPSERVER]: Ack timeout, disconnecting " + udpClient.AgentID); StatsManager.SimExtraStats.AddAbnormalClientThreadTermination(); + RemoveClient(client); - RemoveClient(udpClient); return; } @@ -879,7 +884,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion Ping Check Handling // Inbox insertion - packetInbox.Enqueue(new IncomingPacket(udpClient, packet)); + packetInbox.Enqueue(new IncomingPacket((LLClientView)client, packet)); } #region BinaryStats @@ -1105,21 +1110,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP return client; } - private void RemoveClient(LLUDPClient udpClient) + private void RemoveClient(IClientAPI client) { - // Remove this client from the scene - IClientAPI client; - if (m_scene.TryGetClient(udpClient.AgentID, out client)) - { - client.IsLoggingOut = true; - client.Close(); - } - else - { - m_log.WarnFormat( - "[LLUDPSERVER]: Tried to remove client with id {0} but not such client in {1}", - udpClient.AgentID, m_scene.RegionInfo.RegionName); - } + // We must set IsLoggingOut synchronously so that we can stop the packet loop reinvoking this method. + client.IsLoggingOut = true; + + // Fire this out on a different thread so that we don't hold up outgoing packet processing for + // everybody else if this is being called due to an ack timeout. + // This is the same as processing as the async process of a logout request. + Util.FireAndForget(o => client.Close()); } private void IncomingPacketHandler() @@ -1244,7 +1243,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP Watchdog.RemoveThread(); } - private void ClientOutgoingPacketHandler(IClientAPI client) + protected void ClientOutgoingPacketHandler(IClientAPI client) { m_currentOutgoingClient = client; @@ -1252,12 +1251,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (client is LLClientView) { - LLUDPClient udpClient = ((LLClientView)client).UDPClient; + LLClientView llClient = (LLClientView)client; + LLUDPClient udpClient = llClient.UDPClient; if (udpClient.IsConnected) { if (m_resendUnacked) - HandleUnacked(udpClient); + HandleUnacked(llClient); if (m_sendAcks) SendAcks(udpClient); @@ -1306,7 +1306,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP { if (client is LLClientView) { - LLUDPClient udpClient = ((LLClientView)client).UDPClient; + LLClientView llClient = (LLClientView)client; + LLUDPClient udpClient = llClient.UDPClient; if (udpClient.IsConnected) { @@ -1315,7 +1316,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP nticksUnack++; watch2.Start(); - HandleUnacked(udpClient); + HandleUnacked(llClient); watch2.Stop(); avgResendUnackedTicks = (nticksUnack - 1)/(float)nticksUnack * avgResendUnackedTicks + (watch2.ElapsedTicks / (float)nticksUnack); @@ -1386,22 +1387,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP #endregion - private void ProcessInPacket(object state) + private void ProcessInPacket(IncomingPacket incomingPacket) { - IncomingPacket incomingPacket = (IncomingPacket)state; Packet packet = incomingPacket.Packet; - LLUDPClient udpClient = incomingPacket.Client; - IClientAPI client; + LLClientView client = incomingPacket.Client; - // Sanity check - if (packet == null || udpClient == null) - { - m_log.WarnFormat("[LLUDPSERVER]: Processing a packet with incomplete state. Packet=\"{0}\", UDPClient=\"{1}\"", - packet, udpClient); - } - - // Make sure this client is still alive - if (m_scene.TryGetClient(udpClient.AgentID, out client)) + if (client.IsActive) { m_currentIncomingClient = client; @@ -1419,8 +1410,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP catch (Exception e) { // Don't let a failure in an individual client thread crash the whole sim. - m_log.ErrorFormat("[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw an exception", udpClient.AgentID, packet.Type); - m_log.Error(e.Message, e); + m_log.Error( + string.Format( + "[LLUDPSERVER]: Client packet handler for {0} for packet {1} threw ", + client.Name, packet.Type), + e); } finally { @@ -1431,15 +1425,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP { m_log.DebugFormat( "[LLUDPSERVER]: Dropped incoming {0} for dead client {1} in {2}", - packet.Type, udpClient.AgentID, m_scene.RegionInfo.RegionName); + packet.Type, client.Name, m_scene.RegionInfo.RegionName); } } protected void LogoutHandler(IClientAPI client) { client.SendLogoutPacket(); - if (client.IsActive) - RemoveClient(((LLClientView)client).UDPClient); + if (!client.IsLoggingOut) + RemoveClient(client); } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs index 1321470c28..109a8e1914 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/BasicCircuitTests.cs @@ -45,6 +45,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests [TestFixture] public class BasicCircuitTests { + private Scene m_scene; + private TestLLUDPServer m_udpServer; + [TestFixtureSetUp] public void FixtureInit() { @@ -61,83 +64,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests Util.FireAndForgetMethod = Util.DefaultFireAndForgetMethod; } -// /// -// /// Add a client for testing -// /// -// /// -// /// -// /// -// /// Agent circuit manager used in setting up the stack -// protected void SetupStack( -// IScene scene, out TestLLUDPServer testLLUDPServer, out TestLLPacketServer testPacketServer, -// out AgentCircuitManager acm) -// { -// IConfigSource configSource = new IniConfigSource(); -// ClientStackUserSettings userSettings = new ClientStackUserSettings(); -// testLLUDPServer = new TestLLUDPServer(); -// acm = new AgentCircuitManager(); -// -// uint port = 666; -// testLLUDPServer.Initialise(null, ref port, 0, false, configSource, acm); -// testPacketServer = new TestLLPacketServer(testLLUDPServer, userSettings); -// testLLUDPServer.LocalScene = scene; -// } - -// /// -// /// Set up a client for tests which aren't concerned with this process itself and where only one client is being -// /// tested -// /// -// /// -// /// -// /// -// /// -// protected void AddClient( -// uint circuitCode, EndPoint epSender, TestLLUDPServer testLLUDPServer, AgentCircuitManager acm) -// { -// UUID myAgentUuid = UUID.Parse("00000000-0000-0000-0000-000000000001"); -// UUID mySessionUuid = UUID.Parse("00000000-0000-0000-0000-000000000002"); -// -// AddClient(circuitCode, epSender, myAgentUuid, mySessionUuid, testLLUDPServer, acm); -// } - -// /// -// /// Set up a client for tests which aren't concerned with this process itself -// /// -// /// -// /// -// /// -// /// -// /// -// /// -// protected void AddClient( -// uint circuitCode, EndPoint epSender, UUID agentId, UUID sessionId, -// TestLLUDPServer testLLUDPServer, AgentCircuitManager acm) -// { -// AgentCircuitData acd = new AgentCircuitData(); -// acd.AgentID = agentId; -// acd.SessionID = sessionId; -// -// UseCircuitCodePacket uccp = new UseCircuitCodePacket(); -// -// UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock -// = new UseCircuitCodePacket.CircuitCodeBlock(); -// uccpCcBlock.Code = circuitCode; -// uccpCcBlock.ID = agentId; -// uccpCcBlock.SessionID = sessionId; -// uccp.CircuitCode = uccpCcBlock; -// -// acm.AddNewCircuit(circuitCode, acd); -// -// testLLUDPServer.LoadReceive(uccp, epSender); -// testLLUDPServer.ReceiveData(null); -// } + [SetUp] + public void SetUp() + { + m_scene = new SceneHelpers().SetupScene(); + } /// /// Build an object name packet for test purposes /// /// /// - protected ObjectNamePacket BuildTestObjectNamePacket(uint objectLocalId, string objectName) + private ObjectNamePacket BuildTestObjectNamePacket(uint objectLocalId, string objectName) { ObjectNamePacket onp = new ObjectNamePacket(); ObjectNamePacket.ObjectDataBlock odb = new ObjectNamePacket.ObjectDataBlock(); @@ -148,29 +86,31 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests return onp; } - - /// - /// Test adding a client to the stack - /// - [Test] - public void TestAddClient() - { - TestHelpers.InMethod(); -// XmlConfigurator.Configure(); - TestScene scene = new SceneHelpers().SetupScene(); - uint myCircuitCode = 123456; + private void AddUdpServer() + { + AddUdpServer(new IniConfigSource()); + } + + private void AddUdpServer(IniConfigSource configSource) + { + uint port = 0; + AgentCircuitManager acm = m_scene.AuthenticateHandler; + + m_udpServer = new TestLLUDPServer(IPAddress.Any, ref port, 0, false, configSource, acm); + m_udpServer.AddScene(m_scene); + } + + /// + /// Used by tests that aren't testing this stage. + /// + private ScenePresence AddClient() + { UUID myAgentUuid = TestHelpers.ParseTail(0x1); UUID mySessionUuid = TestHelpers.ParseTail(0x2); + uint myCircuitCode = 123456; IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); - uint port = 0; - AgentCircuitManager acm = scene.AuthenticateHandler; - - TestLLUDPServer llUdpServer - = new TestLLUDPServer(IPAddress.Any, ref port, 0, false, new IniConfigSource(), acm); - llUdpServer.AddScene(scene); - UseCircuitCodePacket uccp = new UseCircuitCodePacket(); UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock @@ -185,26 +125,67 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests upb.DataLength = uccpBytes.Length; // God knows why this isn't set by the constructor. Buffer.BlockCopy(uccpBytes, 0, upb.Data, 0, uccpBytes.Length); - llUdpServer.PacketReceived(upb); + AgentCircuitData acd = new AgentCircuitData(); + acd.AgentID = myAgentUuid; + acd.SessionID = mySessionUuid; + + m_scene.AuthenticateHandler.AddNewCircuit(myCircuitCode, acd); + + m_udpServer.PacketReceived(upb); + + return m_scene.GetScenePresence(myAgentUuid); + } + + /// + /// Test adding a client to the stack + /// + [Test] + public void TestAddClient() + { + TestHelpers.InMethod(); +// XmlConfigurator.Configure(); + + AddUdpServer(); + + UUID myAgentUuid = TestHelpers.ParseTail(0x1); + UUID mySessionUuid = TestHelpers.ParseTail(0x2); + uint myCircuitCode = 123456; + IPEndPoint testEp = new IPEndPoint(IPAddress.Loopback, 999); + + UseCircuitCodePacket uccp = new UseCircuitCodePacket(); + + UseCircuitCodePacket.CircuitCodeBlock uccpCcBlock + = new UseCircuitCodePacket.CircuitCodeBlock(); + uccpCcBlock.Code = myCircuitCode; + uccpCcBlock.ID = myAgentUuid; + uccpCcBlock.SessionID = mySessionUuid; + uccp.CircuitCode = uccpCcBlock; + + byte[] uccpBytes = uccp.ToBytes(); + UDPPacketBuffer upb = new UDPPacketBuffer(testEp, uccpBytes.Length); + upb.DataLength = uccpBytes.Length; // God knows why this isn't set by the constructor. + Buffer.BlockCopy(uccpBytes, 0, upb.Data, 0, uccpBytes.Length); + + m_udpServer.PacketReceived(upb); // Presence shouldn't exist since the circuit manager doesn't know about this circuit for authentication yet - Assert.That(scene.GetScenePresence(myAgentUuid), Is.Null); + Assert.That(m_scene.GetScenePresence(myAgentUuid), Is.Null); AgentCircuitData acd = new AgentCircuitData(); acd.AgentID = myAgentUuid; acd.SessionID = mySessionUuid; - acm.AddNewCircuit(myCircuitCode, acd); + m_scene.AuthenticateHandler.AddNewCircuit(myCircuitCode, acd); - llUdpServer.PacketReceived(upb); + m_udpServer.PacketReceived(upb); // Should succeed now - ScenePresence sp = scene.GetScenePresence(myAgentUuid); + ScenePresence sp = m_scene.GetScenePresence(myAgentUuid); Assert.That(sp.UUID, Is.EqualTo(myAgentUuid)); - Assert.That(llUdpServer.PacketsSent.Count, Is.EqualTo(1)); + Assert.That(m_udpServer.PacketsSent.Count, Is.EqualTo(1)); - Packet packet = llUdpServer.PacketsSent[0]; + Packet packet = m_udpServer.PacketsSent[0]; Assert.That(packet, Is.InstanceOf(typeof(PacketAckPacket))); PacketAckPacket ackPacket = packet as PacketAckPacket; @@ -212,6 +193,26 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests Assert.That(ackPacket.Packets[0].ID, Is.EqualTo(0)); } + [Test] + public void TestLogoutClientDueToAck() + { + TestHelpers.InMethod(); +// TestHelpers.EnableLogging(); + + IniConfigSource ics = new IniConfigSource(); + IConfig config = ics.AddConfig("ClientStack.LindenUDP"); + config.Set("AckTimeout", -1); + AddUdpServer(ics); + + ScenePresence sp = AddClient(); + m_udpServer.ClientOutgoingPacketHandler(sp.ControllingClient, true, false, false); + + ScenePresence spAfterAckTimeout = m_scene.GetScenePresence(sp.UUID); + Assert.That(spAfterAckTimeout, Is.Null); + +// TestHelpers.DisableLogging(); + } + // /// // /// Test removing a client from the stack // /// diff --git a/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs index 0302385ad2..27b9e5b3f3 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/Tests/TestLLUDPServer.cs @@ -59,6 +59,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP.Tests PacketsSent.Add(packet); } + public void ClientOutgoingPacketHandler(IClientAPI client, bool resendUnacked, bool sendAcks, bool sendPing) + { + m_resendUnacked = resendUnacked; + m_sendAcks = sendAcks; + m_sendPing = sendPing; + + ClientOutgoingPacketHandler(client); + } + //// /// //// /// The chunks of data to pass to the LLUDPServer when it calls EndReceive //// /// diff --git a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs index 874693e8ea..708198923a 100644 --- a/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs +++ b/OpenSim/Region/CoreModules/Agent/AssetTransaction/AssetTransactionModule.cs @@ -42,8 +42,7 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction public class AssetTransactionModule : INonSharedRegionModule, IAgentAssetTransactions { -// private static readonly ILog m_log = LogManager.GetLogger( -// MethodBase.GetCurrentMethod().DeclaringType); + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); protected Scene m_Scene; private bool m_dumpAssetsToFile = false; @@ -209,15 +208,15 @@ namespace OpenSim.Region.CoreModules.Agent.AssetTransaction /// and comes through this method. /// /// + /// /// /// - public void HandleTaskItemUpdateFromTransaction(IClientAPI remoteClient, - SceneObjectPart part, UUID transactionID, - TaskInventoryItem item) + public void HandleTaskItemUpdateFromTransaction( + IClientAPI remoteClient, SceneObjectPart part, UUID transactionID, TaskInventoryItem item) { -// m_log.DebugFormat( -// "[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with item {0}", -// item.Name); + m_log.DebugFormat( + "[TRANSACTIONS MANAGER] Called HandleTaskItemUpdateFromTransaction with item {0} in {1} for {2} in {3}", + item.Name, part.Name, remoteClient.Name, m_Scene.RegionInfo.RegionName); AgentAssetTransactions transactions = GetUserTransactions(remoteClient.AgentId); diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index f2926eaf1f..7d82060835 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -644,7 +644,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer // an agent cannot teleport back to this region if it has teleported away. Thread.Sleep(2000); - sp.Close(); sp.Scene.IncomingCloseAgent(sp.UUID); } else diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 69767c1b99..7d51eedfd9 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -216,7 +216,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } else { - IAgentAssetTransactions agentTransactions = m_Scene.RequestModuleInterface(); + IAgentAssetTransactions agentTransactions = m_Scene.AgentTransactionsModule; if (agentTransactions != null) { agentTransactions.HandleItemCreationFromTransaction( diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 79c9309be8..b59fd05578 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -440,10 +440,9 @@ namespace OpenSim.Region.Framework.Scenes } else { - IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); - if (agentTransactions != null) + if (AgentTransactionsModule != null) { - agentTransactions.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); + AgentTransactionsModule.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); } } } @@ -1532,21 +1531,17 @@ namespace OpenSim.Region.Framework.Scenes // Only look for an uploaded updated asset if we are passed a transaction ID. This is only the // case for updates uploded through UDP. Updates uploaded via a capability (e.g. a script update) // will not pass in a transaction ID in the update message. - if (transactionID != UUID.Zero) + if (transactionID != UUID.Zero && AgentTransactionsModule != null) { - IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); - if (agentTransactions != null) - { - agentTransactions.HandleTaskItemUpdateFromTransaction( - remoteClient, part, transactionID, currentItem); - - if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) - remoteClient.SendAgentAlertMessage("Notecard saved", false); - else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) - remoteClient.SendAgentAlertMessage("Script saved", false); - else - remoteClient.SendAgentAlertMessage("Item saved", false); - } + AgentTransactionsModule.HandleTaskItemUpdateFromTransaction( + remoteClient, part, transactionID, currentItem); + + if ((InventoryType)itemInfo.InvType == InventoryType.Notecard) + remoteClient.SendAgentAlertMessage("Notecard saved", false); + else if ((InventoryType)itemInfo.InvType == InventoryType.LSL) + remoteClient.SendAgentAlertMessage("Script saved", false); + else + remoteClient.SendAgentAlertMessage("Item saved", false); } // Base ALWAYS has move diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ae35cb9e46..7afde38c23 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -499,6 +499,7 @@ namespace OpenSim.Region.Framework.Scenes public IAttachmentsModule AttachmentsModule { get; set; } public IEntityTransferModule EntityTransferModule { get; private set; } + public IAgentAssetTransactions AgentTransactionsModule { get; private set; } public IAvatarFactoryModule AvatarFactory { @@ -939,7 +940,7 @@ namespace OpenSim.Region.Framework.Scenes else { m_log.InfoFormat( - "[INTERGRID]: Got notice about far away Region: {0} at ({1}, {2})", + "[SCENE]: Got notice about far away Region: {0} at ({1}, {2})", otherRegion.RegionName, otherRegion.RegionLocX, otherRegion.RegionLocY); } } @@ -1241,6 +1242,7 @@ namespace OpenSim.Region.Framework.Scenes m_capsModule = RequestModuleInterface(); EntityTransferModule = RequestModuleInterface(); m_groupsModule = RequestModuleInterface(); + AgentTransactionsModule = RequestModuleInterface(); } #endregion @@ -3229,54 +3231,70 @@ namespace OpenSim.Region.Framework.Scenes // CheckHeartbeat(); bool isChildAgent = false; ScenePresence avatar = GetScenePresence(agentID); - if (avatar != null) + + if (avatar == null) + { + m_log.WarnFormat( + "[SCENE]: Called RemoveClient() with agent ID {0} but no such presence is in the scene.", agentID); + + return; + } + + try { isChildAgent = avatar.IsChildAgent; + m_log.DebugFormat( + "[SCENE]: Removing {0} agent {1} {2} from {3}", + (isChildAgent ? "child" : "root"), avatar.Name, agentID, RegionInfo.RegionName); + + // Don't do this to root agents, it's not nice for the viewer + if (closeChildAgents && isChildAgent) + { + // Tell a single agent to disconnect from the region. + IEventQueue eq = RequestModuleInterface(); + if (eq != null) + { + eq.DisableSimulator(RegionInfo.RegionHandle, avatar.UUID); + } + else + { + avatar.ControllingClient.SendShutdownConnectionNotice(); + } + } + + // Only applies to root agents. if (avatar.ParentID != 0) { avatar.StandUp(); } - try + m_sceneGraph.removeUserCount(!isChildAgent); + + // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop + // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI + if (closeChildAgents && CapsModule != null) + CapsModule.RemoveCaps(agentID); + + // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever + // this method is doing is HORRIBLE!!! + avatar.Scene.NeedSceneCacheClear(avatar.UUID); + + if (closeChildAgents && !isChildAgent) { - m_log.DebugFormat( - "[SCENE]: Removing {0} agent {1} {2} from region {3}", - (isChildAgent ? "child" : "root"), avatar.Name, agentID, RegionInfo.RegionName); - - m_sceneGraph.removeUserCount(!isChildAgent); - - // TODO: We shouldn't use closeChildAgents here - it's being used by the NPC module to stop - // unnecessary operations. This should go away once NPCs have no accompanying IClientAPI - if (closeChildAgents && CapsModule != null) - CapsModule.RemoveCaps(agentID); - - // REFACTORING PROBLEM -- well not really a problem, but just to point out that whatever - // this method is doing is HORRIBLE!!! - avatar.Scene.NeedSceneCacheClear(avatar.UUID); - - if (closeChildAgents && !avatar.IsChildAgent) - { - List regions = avatar.KnownRegionHandles; - regions.Remove(RegionInfo.RegionHandle); - m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); - } - - m_eventManager.TriggerClientClosed(agentID, this); - } - catch (NullReferenceException) - { - // We don't know which count to remove it from - // Avatar is already disposed :/ + List regions = avatar.KnownRegionHandles; + regions.Remove(RegionInfo.RegionHandle); + m_sceneGridService.SendCloseChildAgentConnections(agentID, regions); } - try + m_eventManager.TriggerClientClosed(agentID, this); + m_eventManager.TriggerOnRemovePresence(agentID); + + if (!isChildAgent) { - m_eventManager.TriggerOnRemovePresence(agentID); - - if (AttachmentsModule != null && !isChildAgent && avatar.PresenceType != PresenceType.Npc) + if (AttachmentsModule != null && avatar.PresenceType != PresenceType.Npc) { - IUserManagement uMan = RequestModuleInterface(); + IUserManagement uMan = RequestModuleInterface(); // Don't save attachments for HG visitors, it // messes up their inventory. When a HG visitor logs // out on a foreign grid, their attachments will be @@ -3286,7 +3304,7 @@ namespace OpenSim.Region.Framework.Scenes if (uMan == null || uMan.IsLocalGridUser(avatar.UUID)) AttachmentsModule.SaveChangedAttachments(avatar, false); } - + ForEachClient( delegate(IClientAPI client) { @@ -3294,42 +3312,34 @@ namespace OpenSim.Region.Framework.Scenes try { client.SendKillObject(avatar.RegionHandle, new List { avatar.LocalId }); } catch (NullReferenceException) { } }); - - IAgentAssetTransactions agentTransactions = this.RequestModuleInterface(); - if (agentTransactions != null) - { - agentTransactions.RemoveAgentAssetTransactions(agentID); - } - } - finally - { - // Always clean these structures up so that any failure above doesn't cause them to remain in the - // scene with possibly bad effects (e.g. continually timing out on unacked packets and triggering - // the same cleanup exception continually. - // TODO: This should probably extend to the whole method, but we don't want to also catch the NRE - // since this would hide the underlying failure and other associated problems. - m_sceneGraph.RemoveScenePresence(agentID); - m_clientManager.Remove(agentID); } - try - { - avatar.Close(); - } - catch (NullReferenceException) - { - //We can safely ignore null reference exceptions. It means the avatar are dead and cleaned up anyway. - } - catch (Exception e) - { - m_log.ErrorFormat("[SCENE] Scene.cs:RemoveClient exception {0}{1}", e.Message, e.StackTrace); - } + // It's possible for child agents to have transactions if changes are being made cross-border. + if (AgentTransactionsModule != null) + AgentTransactionsModule.RemoveAgentAssetTransactions(agentID); + + avatar.Close(); m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode); -// CleanDroppedAttachments(); - //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); - //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); } + catch (Exception e) + { + m_log.Error( + string.Format("[SCENE]: Exception removing {0} from {1}, ", avatar.Name, RegionInfo.RegionName), e); + } + finally + { + // Always clean these structures up so that any failure above doesn't cause them to remain in the + // scene with possibly bad effects (e.g. continually timing out on unacked packets and triggering + // the same cleanup exception continually. + // TODO: This should probably extend to the whole method, but we don't want to also catch the NRE + // since this would hide the underlying failure and other associated problems. + m_sceneGraph.RemoveScenePresence(agentID); + m_clientManager.Remove(agentID); + } + + //m_log.InfoFormat("[SCENE] Memory pre GC {0}", System.GC.GetTotalMemory(false)); + //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true)); } /// @@ -4020,29 +4030,6 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence presence = m_sceneGraph.GetScenePresence(agentID); if (presence != null) { - // Nothing is removed here, so down count it as such - if (presence.IsChildAgent) - { - m_sceneGraph.removeUserCount(false); - } - else - { - m_sceneGraph.removeUserCount(true); - } - - // Don't do this to root agents on logout, it's not nice for the viewer - if (presence.IsChildAgent) - { - // Tell a single agent to disconnect from the region. - IEventQueue eq = RequestModuleInterface(); - if (eq != null) - { - eq.DisableSimulator(RegionInfo.RegionHandle, agentID); - } - else - presence.ControllingClient.SendShutdownConnectionNotice(); - } - presence.ControllingClient.Close(); return true; } diff --git a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs index b8616e8346..eff635b30f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Framework/Scenes/SceneCommunicationService.cs @@ -84,16 +84,16 @@ namespace OpenSim.Region.Framework.Scenes if (neighbourService != null) neighbour = neighbourService.HelloNeighbour(regionhandle, region); else - m_log.DebugFormat("[SCS]: No neighbour service provided for informing neigbhours of this region"); + m_log.DebugFormat("[SCENE COMMUNICATION SERVICE]: No neighbour service provided for informing neigbhours of this region"); if (neighbour != null) { - m_log.DebugFormat("[INTERGRID]: Successfully informed neighbour {0}-{1} that I'm here", x / Constants.RegionSize, y / Constants.RegionSize); + m_log.DebugFormat("[SCENE COMMUNICATION SERVICE]: Successfully informed neighbour {0}-{1} that I'm here", x / Constants.RegionSize, y / Constants.RegionSize); m_scene.EventManager.TriggerOnRegionUp(neighbour); } else { - m_log.InfoFormat("[INTERGRID]: Failed to inform neighbour {0}-{1} that I'm here.", x / Constants.RegionSize, y / Constants.RegionSize); + m_log.InfoFormat("[SCENE COMMUNICATION SERVICE]: Failed to inform neighbour {0}-{1} that I'm here.", x / Constants.RegionSize, y / Constants.RegionSize); } } @@ -102,7 +102,7 @@ namespace OpenSim.Region.Framework.Scenes //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); List neighbours = m_scene.GridService.GetNeighbours(m_scene.RegionInfo.ScopeID, m_scene.RegionInfo.RegionID); - m_log.DebugFormat("[INTERGRID]: Informing {0} neighbours that this region is up", neighbours.Count); + m_log.DebugFormat("[SCENE COMMUNICATION SERVICE]: Informing {0} neighbours that this region is up", neighbours.Count); foreach (GridRegion n in neighbours) { InformNeighbourThatRegionUpDelegate d = InformNeighboursThatRegionIsUpAsync; @@ -196,8 +196,7 @@ namespace OpenSim.Region.Framework.Scenes GridRegion destination = m_scene.GridService.GetRegionByPosition(m_regionInfo.ScopeID, (int)x, (int)y); m_log.DebugFormat( - "[INTERGRID]: Sending close agent {0} to region at {1}-{2}", - agentID, destination.RegionCoordX, destination.RegionCoordY); + "[SCENE COMMUNICATION SERVICE]: Sending close agent ID {0} to {1}", agentID, destination.RegionName); m_scene.SimulationService.CloseAgent(destination, agentID); } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index ddf1550c0a..a59758f5dc 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -702,12 +702,6 @@ namespace OpenSim.Region.Framework.Scenes public int GetChildAgentCount() { - // some network situations come in where child agents get closed twice. - if (m_numChildAgents < 0) - { - m_numChildAgents = 0; - } - return m_numChildAgents; } diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 3adafc1b74..029e0d7994 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3416,7 +3416,7 @@ namespace OpenSim.Region.Framework.Scenes public void Close() { - if (!IsChildAgent) + if (!IsChildAgent && m_scene.AttachmentsModule != null) m_scene.AttachmentsModule.DeleteAttachmentsFromScene(this, false); // Clear known regions diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs index 1aa48d7520..02c45ef11c 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceAgentTests.cs @@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes.Tests public void TestCloseAgent() { TestHelpers.InMethod(); -// log4net.Config.XmlConfigurator.Configure(); +// TestHelpers.EnableLogging(); TestScene scene = new SceneHelpers().SetupScene(); ScenePresence sp = SceneHelpers.AddScenePresence(scene, TestHelpers.ParseTail(0x1)); @@ -114,6 +114,8 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(scene.GetScenePresence(sp.UUID), Is.Null); Assert.That(scene.AuthenticateHandler.GetAgentCircuitData(sp.UUID), Is.Null); Assert.That(scene.AuthenticateHandler.GetAgentCircuits().Count, Is.EqualTo(0)); + +// TestHelpers.DisableLogging(); } [Test] diff --git a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs index ccfe4ff218..a407f01d63 100644 --- a/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs +++ b/OpenSim/Region/Framework/Scenes/Tests/ScenePresenceTeleportTests.cs @@ -97,6 +97,9 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(sp.AbsolutePosition, Is.EqualTo(teleportPosition)); + Assert.That(scene.GetRootAgentCount(), Is.EqualTo(1)); + Assert.That(scene.GetChildAgentCount(), Is.EqualTo(0)); + // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera // position instead). // Assert.That(sp.Lookat, Is.EqualTo(teleportLookAt)); @@ -158,6 +161,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(sceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName)); Assert.That(sceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition)); + Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0)); + Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0)); + Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(1)); + Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0)); + // TODO: Add assertions to check correct circuit details in both scenes. // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera @@ -235,6 +243,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName)); Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition)); + Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1)); + Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0)); + Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(0)); + Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0)); + // TODO: Add assertions to check correct circuit details in both scenes. // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera @@ -306,6 +319,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(sceneASp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneA.RegionInfo.RegionName)); Assert.That(sceneASp.AbsolutePosition, Is.EqualTo(preTeleportPosition)); + Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(1)); + Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(0)); + Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(0)); + Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0)); + // TODO: Add assertions to check correct circuit details in both scenes. // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera @@ -382,6 +400,11 @@ namespace OpenSim.Region.Framework.Scenes.Tests Assert.That(afterSceneBSp.Scene.RegionInfo.RegionName, Is.EqualTo(sceneB.RegionInfo.RegionName)); Assert.That(afterSceneBSp.AbsolutePosition, Is.EqualTo(teleportPosition)); + Assert.That(sceneA.GetRootAgentCount(), Is.EqualTo(0)); + Assert.That(sceneA.GetChildAgentCount(), Is.EqualTo(1)); + Assert.That(sceneB.GetRootAgentCount(), Is.EqualTo(1)); + Assert.That(sceneB.GetChildAgentCount(), Is.EqualTo(0)); + // TODO: Add assertions to check correct circuit details in both scenes. // Lookat is sent to the client only - sp.Lookat does not yield the same thing (calculation from camera diff --git a/OpenSim/Tools/pCampBot/Bot.cs b/OpenSim/Tools/pCampBot/Bot.cs index b6cd287202..daaa3c0070 100644 --- a/OpenSim/Tools/pCampBot/Bot.cs +++ b/OpenSim/Tools/pCampBot/Bot.cs @@ -480,6 +480,9 @@ namespace pCampBot public void Objects_NewPrim(object sender, PrimEventArgs args) { +// if (Name.EndsWith("4")) +// throw new Exception("Aaargh"); + Primitive prim = args.Prim; if (prim != null) diff --git a/bin/assets/AssetSets.xml b/bin/assets/AssetSets.xml index c13ea422ee..829f845e5d 100644 --- a/bin/assets/AssetSets.xml +++ b/bin/assets/AssetSets.xml @@ -67,6 +67,12 @@ + +
+ +
+ +
diff --git a/bin/assets/CollisionSoundsAssetSet/CollisionSoundsAssetSet.xml b/bin/assets/CollisionSoundsAssetSet/CollisionSoundsAssetSet.xml new file mode 100644 index 0000000000..7498ae0af8 --- /dev/null +++ b/bin/assets/CollisionSoundsAssetSet/CollisionSoundsAssetSet.xml @@ -0,0 +1,341 @@ + + + +
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
+ + + + +
+
diff --git a/bin/assets/CollisionSoundsAssetSet/attribution.txt b/bin/assets/CollisionSoundsAssetSet/attribution.txt new file mode 100644 index 0000000000..876419b0f0 --- /dev/null +++ b/bin/assets/CollisionSoundsAssetSet/attribution.txt @@ -0,0 +1,8 @@ +thanvannispen - http://www.freesound.org/people/thanvannispen/sounds/30012/ +hoobtastic - http://www.freesound.org/people/hoobtastic/sounds/132627/ +kbnevel - http://www.freesound.org/people/kbnevel/sounds/119859/ +adcbicycle - http://www.freesound.org/people/adcbicycle/sounds/13856/ +adcbicycle - http://www.freesound.org/people/adcbicycle/sounds/13855/ +110110010 - http://www.freesound.org/people/110110010/sounds/66397/ +qubodup - http://www.freesound.org/people/qubodup/sounds/50941/ +vibe_crc - http://www.freesound.org/people/vibe_crc/sounds/59317/ \ No newline at end of file diff --git a/bin/assets/CollisionSoundsAssetSet/snd_FleshFlesh.ogg b/bin/assets/CollisionSoundsAssetSet/snd_FleshFlesh.ogg new file mode 100644 index 0000000000..5f3aeb71ec Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_FleshFlesh.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_FleshGlass.ogg b/bin/assets/CollisionSoundsAssetSet/snd_FleshGlass.ogg new file mode 100644 index 0000000000..3a322c63ff Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_FleshGlass.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_FleshMetal.ogg b/bin/assets/CollisionSoundsAssetSet/snd_FleshMetal.ogg new file mode 100644 index 0000000000..edcf17a708 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_FleshMetal.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_FleshPlastic.ogg b/bin/assets/CollisionSoundsAssetSet/snd_FleshPlastic.ogg new file mode 100644 index 0000000000..acf53e54de Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_FleshPlastic.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_FleshRubber.ogg b/bin/assets/CollisionSoundsAssetSet/snd_FleshRubber.ogg new file mode 100644 index 0000000000..6373610569 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_FleshRubber.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_FleshStone.ogg b/bin/assets/CollisionSoundsAssetSet/snd_FleshStone.ogg new file mode 100644 index 0000000000..eccbbb84f4 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_FleshStone.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_FleshWood.ogg b/bin/assets/CollisionSoundsAssetSet/snd_FleshWood.ogg new file mode 100644 index 0000000000..67133809ae Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_FleshWood.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_GlassFlesh.ogg b/bin/assets/CollisionSoundsAssetSet/snd_GlassFlesh.ogg new file mode 100644 index 0000000000..6951d444eb Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_GlassFlesh.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_GlassGlass.ogg b/bin/assets/CollisionSoundsAssetSet/snd_GlassGlass.ogg new file mode 100644 index 0000000000..1806a55479 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_GlassGlass.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_GlassMetal.ogg b/bin/assets/CollisionSoundsAssetSet/snd_GlassMetal.ogg new file mode 100644 index 0000000000..f1470244aa Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_GlassMetal.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_GlassPlastic.ogg b/bin/assets/CollisionSoundsAssetSet/snd_GlassPlastic.ogg new file mode 100644 index 0000000000..204a4c668f Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_GlassPlastic.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_GlassRubber.ogg b/bin/assets/CollisionSoundsAssetSet/snd_GlassRubber.ogg new file mode 100644 index 0000000000..243f185a9e Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_GlassRubber.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_GlassStone.ogg b/bin/assets/CollisionSoundsAssetSet/snd_GlassStone.ogg new file mode 100644 index 0000000000..085213548a Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_GlassStone.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_GlassWood.ogg b/bin/assets/CollisionSoundsAssetSet/snd_GlassWood.ogg new file mode 100644 index 0000000000..2c13690ad1 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_GlassWood.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_MetalFlesh.ogg b/bin/assets/CollisionSoundsAssetSet/snd_MetalFlesh.ogg new file mode 100644 index 0000000000..c11d19f59b Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_MetalFlesh.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_MetalGlass.ogg b/bin/assets/CollisionSoundsAssetSet/snd_MetalGlass.ogg new file mode 100644 index 0000000000..36348e146b Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_MetalGlass.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_MetalMetal.ogg b/bin/assets/CollisionSoundsAssetSet/snd_MetalMetal.ogg new file mode 100644 index 0000000000..957b3c2da7 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_MetalMetal.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_MetalPlastic.ogg b/bin/assets/CollisionSoundsAssetSet/snd_MetalPlastic.ogg new file mode 100644 index 0000000000..5674907f99 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_MetalPlastic.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_MetalRubber.ogg b/bin/assets/CollisionSoundsAssetSet/snd_MetalRubber.ogg new file mode 100644 index 0000000000..0f9ba2e9bd Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_MetalRubber.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_MetalStone.ogg b/bin/assets/CollisionSoundsAssetSet/snd_MetalStone.ogg new file mode 100644 index 0000000000..dc489d8bad Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_MetalStone.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_MetalWood.ogg b/bin/assets/CollisionSoundsAssetSet/snd_MetalWood.ogg new file mode 100644 index 0000000000..de04317eaa Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_MetalWood.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_PlasticFlesh.ogg b/bin/assets/CollisionSoundsAssetSet/snd_PlasticFlesh.ogg new file mode 100644 index 0000000000..a9d698310c Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_PlasticFlesh.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_PlasticGlass.ogg b/bin/assets/CollisionSoundsAssetSet/snd_PlasticGlass.ogg new file mode 100644 index 0000000000..c7dcdf1476 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_PlasticGlass.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_PlasticMetal.ogg b/bin/assets/CollisionSoundsAssetSet/snd_PlasticMetal.ogg new file mode 100644 index 0000000000..4dd270f3a7 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_PlasticMetal.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_PlasticPlastic.ogg b/bin/assets/CollisionSoundsAssetSet/snd_PlasticPlastic.ogg new file mode 100644 index 0000000000..9994745da3 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_PlasticPlastic.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_PlasticRubber.ogg b/bin/assets/CollisionSoundsAssetSet/snd_PlasticRubber.ogg new file mode 100644 index 0000000000..e5c408fb77 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_PlasticRubber.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_PlasticStone.ogg b/bin/assets/CollisionSoundsAssetSet/snd_PlasticStone.ogg new file mode 100644 index 0000000000..9865c6e68d Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_PlasticStone.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_PlasticWood.ogg b/bin/assets/CollisionSoundsAssetSet/snd_PlasticWood.ogg new file mode 100644 index 0000000000..9f921b98cc Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_PlasticWood.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_RubberFlesh.ogg b/bin/assets/CollisionSoundsAssetSet/snd_RubberFlesh.ogg new file mode 100644 index 0000000000..b56f7dc773 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_RubberFlesh.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_RubberGlass.ogg b/bin/assets/CollisionSoundsAssetSet/snd_RubberGlass.ogg new file mode 100644 index 0000000000..9f44fcac50 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_RubberGlass.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_RubberMetal.ogg b/bin/assets/CollisionSoundsAssetSet/snd_RubberMetal.ogg new file mode 100644 index 0000000000..9ff064acea Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_RubberMetal.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_RubberPlastic.ogg b/bin/assets/CollisionSoundsAssetSet/snd_RubberPlastic.ogg new file mode 100644 index 0000000000..8e601b1b46 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_RubberPlastic.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_RubberRubber.ogg b/bin/assets/CollisionSoundsAssetSet/snd_RubberRubber.ogg new file mode 100644 index 0000000000..c84f8e5083 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_RubberRubber.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_RubberStone.ogg b/bin/assets/CollisionSoundsAssetSet/snd_RubberStone.ogg new file mode 100644 index 0000000000..d398f6fee8 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_RubberStone.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_RubberWood.ogg b/bin/assets/CollisionSoundsAssetSet/snd_RubberWood.ogg new file mode 100644 index 0000000000..ebb24e34f7 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_RubberWood.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_StoneFlesh.ogg b/bin/assets/CollisionSoundsAssetSet/snd_StoneFlesh.ogg new file mode 100644 index 0000000000..90275adbf2 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_StoneFlesh.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_StoneGlass.ogg b/bin/assets/CollisionSoundsAssetSet/snd_StoneGlass.ogg new file mode 100644 index 0000000000..b2b33cfc07 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_StoneGlass.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_StoneMetal.ogg b/bin/assets/CollisionSoundsAssetSet/snd_StoneMetal.ogg new file mode 100644 index 0000000000..accdfdffda Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_StoneMetal.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_StonePlastic.ogg b/bin/assets/CollisionSoundsAssetSet/snd_StonePlastic.ogg new file mode 100644 index 0000000000..15f93b6098 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_StonePlastic.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_StoneRubber.ogg b/bin/assets/CollisionSoundsAssetSet/snd_StoneRubber.ogg new file mode 100644 index 0000000000..4b756ffac0 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_StoneRubber.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_StoneStone.ogg b/bin/assets/CollisionSoundsAssetSet/snd_StoneStone.ogg new file mode 100644 index 0000000000..88b80336d0 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_StoneStone.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_StoneWood.ogg b/bin/assets/CollisionSoundsAssetSet/snd_StoneWood.ogg new file mode 100644 index 0000000000..4a5b7f36fb Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_StoneWood.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_TerrainFlesh.ogg b/bin/assets/CollisionSoundsAssetSet/snd_TerrainFlesh.ogg new file mode 100644 index 0000000000..1d3038a3d4 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_TerrainFlesh.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_TerrainGlass.ogg b/bin/assets/CollisionSoundsAssetSet/snd_TerrainGlass.ogg new file mode 100644 index 0000000000..637fa161d6 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_TerrainGlass.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_TerrainMetal.ogg b/bin/assets/CollisionSoundsAssetSet/snd_TerrainMetal.ogg new file mode 100644 index 0000000000..919c59be38 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_TerrainMetal.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_TerrainPlastic.ogg b/bin/assets/CollisionSoundsAssetSet/snd_TerrainPlastic.ogg new file mode 100644 index 0000000000..23fa329355 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_TerrainPlastic.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_TerrainRubber.ogg b/bin/assets/CollisionSoundsAssetSet/snd_TerrainRubber.ogg new file mode 100644 index 0000000000..c18d242816 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_TerrainRubber.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_TerrainStone.ogg b/bin/assets/CollisionSoundsAssetSet/snd_TerrainStone.ogg new file mode 100644 index 0000000000..6bd9e09448 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_TerrainStone.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_TerrainWood.ogg b/bin/assets/CollisionSoundsAssetSet/snd_TerrainWood.ogg new file mode 100644 index 0000000000..f405517e94 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_TerrainWood.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_WoodFlesh.ogg b/bin/assets/CollisionSoundsAssetSet/snd_WoodFlesh.ogg new file mode 100644 index 0000000000..02621c2520 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_WoodFlesh.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_WoodGlass.ogg b/bin/assets/CollisionSoundsAssetSet/snd_WoodGlass.ogg new file mode 100644 index 0000000000..03b7fb501f Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_WoodGlass.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_WoodMetal.ogg b/bin/assets/CollisionSoundsAssetSet/snd_WoodMetal.ogg new file mode 100644 index 0000000000..e26afae646 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_WoodMetal.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_WoodPlastic.ogg b/bin/assets/CollisionSoundsAssetSet/snd_WoodPlastic.ogg new file mode 100644 index 0000000000..abe419b5fd Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_WoodPlastic.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_WoodRubber.ogg b/bin/assets/CollisionSoundsAssetSet/snd_WoodRubber.ogg new file mode 100644 index 0000000000..30ccc32435 Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_WoodRubber.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_WoodStone.ogg b/bin/assets/CollisionSoundsAssetSet/snd_WoodStone.ogg new file mode 100644 index 0000000000..ad9681846b Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_WoodStone.ogg differ diff --git a/bin/assets/CollisionSoundsAssetSet/snd_WoodWood.ogg b/bin/assets/CollisionSoundsAssetSet/snd_WoodWood.ogg new file mode 100644 index 0000000000..76ae52c7cf Binary files /dev/null and b/bin/assets/CollisionSoundsAssetSet/snd_WoodWood.ogg differ