From 8fdf70b87e51bdd2035f5ab54a335fbb50d79e80 Mon Sep 17 00:00:00 2001 From: Fernando Oliveira Date: Wed, 16 Oct 2013 20:15:04 -0500 Subject: * Fixes mantis mantis 0006803 [PGSQL] - Simulator crashes - Mono.Security.dll missing. The root of the issue is that the Postgres driver relies on Mono.Security.dll from the mono project. Unfortunately, when using Mono, including the dll in the distribution causes conflicts. This solution puts Mono.Security.dll in bin/lib/NET/ and, if windows .NET is the runtime, informs the assembly loader to load bin/lib/NET/Mono.Security.dll when .NET is scanning for the Mono.Security namespace. On Mono, the included Mono.Security assembly is ignored. --- OpenSim/Data/PGSQL/PGSQLFramework.cs | 23 +++++++++++++++++++++++ OpenSim/Data/PGSQL/PGSQLManager.cs | 24 ++++++++++++++++++++++++ 2 files changed, 47 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Data/PGSQL/PGSQLFramework.cs b/OpenSim/Data/PGSQL/PGSQLFramework.cs index 494b0aa..48f8dd3 100644 --- a/OpenSim/Data/PGSQL/PGSQLFramework.cs +++ b/OpenSim/Data/PGSQL/PGSQLFramework.cs @@ -29,6 +29,7 @@ using System; using System.Collections; using System.Collections.Generic; using System.Data; +using System.Reflection; using OpenMetaverse; using OpenSim.Framework; using Npgsql; @@ -50,8 +51,30 @@ namespace OpenSim.Data.PGSQL protected PGSqlFramework(string connectionString) { m_connectionString = connectionString; + InitializeMonoSecurity(); } + public void InitializeMonoSecurity() + { + if (!Util.IsPlatformMono) + { + AppDomain currentDomain = AppDomain.CurrentDomain; + currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec); + } + } + + private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args) + { + Assembly MyAssembly = null; + + if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security") + { + MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll"); + } + + //Return the loaded assembly. + return MyAssembly; + } ////////////////////////////////////////////////////////////// // // All non queries are funneled through one connection diff --git a/OpenSim/Data/PGSQL/PGSQLManager.cs b/OpenSim/Data/PGSQL/PGSQLManager.cs index 3ddaf38..2084fe9 100644 --- a/OpenSim/Data/PGSQL/PGSQLManager.cs +++ b/OpenSim/Data/PGSQL/PGSQLManager.cs @@ -30,6 +30,7 @@ using System.Collections.Generic; using System.Data; using System.IO; using System.Reflection; +using OpenSim.Framework; using log4net; using OpenMetaverse; using Npgsql; @@ -56,6 +57,29 @@ namespace OpenSim.Data.PGSQL public PGSQLManager(string connection) { connectionString = connection; + InitializeMonoSecurity(); + } + + public void InitializeMonoSecurity() + { + if (!Util.IsPlatformMono) + { + AppDomain currentDomain = AppDomain.CurrentDomain; + currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec); + } + } + + private System.Reflection.Assembly ResolveEventHandlerMonoSec(object sender, ResolveEventArgs args) + { + Assembly MyAssembly = null; + + if (args.Name.Substring(0, args.Name.IndexOf(",")) == "Mono.Security") + { + MyAssembly = Assembly.LoadFrom("lib/NET/Mono.Security.dll"); + } + + //Return the loaded assembly. + return MyAssembly; } /// -- cgit v1.1 From f83343d3022d568f4fdbbfa79fee867ba4d2e9ec Mon Sep 17 00:00:00 2001 From: Fernando Oliveira Date: Wed, 16 Oct 2013 21:20:11 -0500 Subject: * One More thing, add an appdomain data element to ensure that we don't duplicate the assembly resolving. --- OpenSim/Data/PGSQL/PGSQLFramework.cs | 10 ++++++++-- OpenSim/Data/PGSQL/PGSQLManager.cs | 9 +++++++-- 2 files changed, 15 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/PGSQL/PGSQLFramework.cs b/OpenSim/Data/PGSQL/PGSQLFramework.cs index 48f8dd3..1028e4e 100644 --- a/OpenSim/Data/PGSQL/PGSQLFramework.cs +++ b/OpenSim/Data/PGSQL/PGSQLFramework.cs @@ -58,8 +58,14 @@ namespace OpenSim.Data.PGSQL { if (!Util.IsPlatformMono) { - AppDomain currentDomain = AppDomain.CurrentDomain; - currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec); + + if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null) + { + AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true"); + + AppDomain currentDomain = AppDomain.CurrentDomain; + currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec); + } } } diff --git a/OpenSim/Data/PGSQL/PGSQLManager.cs b/OpenSim/Data/PGSQL/PGSQLManager.cs index 2084fe9..97f40b2 100644 --- a/OpenSim/Data/PGSQL/PGSQLManager.cs +++ b/OpenSim/Data/PGSQL/PGSQLManager.cs @@ -64,8 +64,13 @@ namespace OpenSim.Data.PGSQL { if (!Util.IsPlatformMono) { - AppDomain currentDomain = AppDomain.CurrentDomain; - currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec); + if (AppDomain.CurrentDomain.GetData("MonoSecurityPostgresAdded") == null) + { + AppDomain.CurrentDomain.SetData("MonoSecurityPostgresAdded", "true"); + + AppDomain currentDomain = AppDomain.CurrentDomain; + currentDomain.AssemblyResolve += new ResolveEventHandler(ResolveEventHandlerMonoSec); + } } } -- cgit v1.1 From 67ffb64764aa109eee479444318b095730644c6d Mon Sep 17 00:00:00 2001 From: Fernando Oliveira Date: Wed, 16 Oct 2013 23:38:13 -0300 Subject: Corrected estateID to EstateID on getEstates function at PGSQLEstateData.cs --- OpenSim/Data/PGSQL/PGSQLEstateData.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Data/PGSQL/PGSQLEstateData.cs b/OpenSim/Data/PGSQL/PGSQLEstateData.cs index 141b8ed..5ad0eaa 100644 --- a/OpenSim/Data/PGSQL/PGSQLEstateData.cs +++ b/OpenSim/Data/PGSQL/PGSQLEstateData.cs @@ -452,7 +452,7 @@ namespace OpenSim.Data.PGSQL public List GetEstates(string search) { List result = new List(); - string sql = "select \"estateID\" from estate_settings where lower(\"EstateName\") = lower(:EstateName)"; + string sql = "select \"EstateID\" from estate_settings where lower(\"EstateName\") = lower(:EstateName)"; using (NpgsqlConnection conn = new NpgsqlConnection(m_connectionString)) { conn.Open(); -- cgit v1.1 From 0094971186b7ba96df454acdf221f702bc214be5 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Mon, 16 Sep 2013 13:31:48 +0300 Subject: After finishing to edit an attachment, let other avatars see the changes. (The changes weren't visible before because updates to attachments aren't sent while the attachment is selected.) --- OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs | 9 ++------- OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs index 998c19e..cddf818 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.PacketHandlers.cs @@ -244,25 +244,20 @@ namespace OpenSim.Region.Framework.Scenes if (part.ParentGroup.RootPart.LocalId != part.LocalId) return; - bool isAttachment = false; - // This is wrong, wrong, wrong. Selection should not be // handled by group, but by prim. Legacy cruft. // TODO: Make selection flagging per prim! // part.ParentGroup.IsSelected = false; - if (part.ParentGroup.IsAttachment) - isAttachment = true; - else - part.ParentGroup.ScheduleGroupForFullUpdate(); + part.ParentGroup.ScheduleGroupForFullUpdate(); // If it's not an attachment, and we are allowed to move it, // then we might have done so. If we moved across a parcel // boundary, we will need to recount prims on the parcels. // For attachments, that makes no sense. // - if (!isAttachment) + if (!part.ParentGroup.IsAttachment) { if (Permissions.CanEditObject( part.UUID, remoteClient.AgentId) diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b3e6b67..9e6c25d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -2700,7 +2700,8 @@ namespace OpenSim.Region.Framework.Scenes return; // This was pulled from SceneViewer. Attachments always receive full updates. - // I could not verify if this is a requirement but this maintains existing behavior + // This is needed because otherwise if only the root prim changes position, then + // it looks as if the entire object has moved (including the other prims). if (ParentGroup.IsAttachment) { ScheduleFullUpdate(); -- cgit v1.1 From 84a149ecbff485400a4d1032677c8f15946ccb29 Mon Sep 17 00:00:00 2001 From: Kevin Cozens Date: Tue, 15 Oct 2013 21:15:48 -0400 Subject: Call ScriptSleep() instead of llSleep() in routine for llEmail. Signed-off-by: teravus --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b19ed0a..8650b91 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -3325,7 +3325,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } emailModule.SendEmail(m_host.UUID, address, subject, message); - llSleep(EMAIL_PAUSE_TIME); + ScriptSleep(EMAIL_PAUSE_TIME * 1000); } public void llGetNextEmail(string address, string subject) -- cgit v1.1 From 511122834b5cd95839029d28365e479dc25eae9d Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Wed, 23 Oct 2013 16:07:03 -0700 Subject: BulletSim: change collision flags for groundplane to not interact with static objects. Reorder collision flag setting code for terrain to fit pattern used elsewhere. --- OpenSim/Region/Physics/BulletSPlugin/BSParam.cs | 5 +++++ OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs | 5 ++--- OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs | 7 ++++--- OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs | 3 ++- 4 files changed, 13 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs index 43aa63e..834228e 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs @@ -120,6 +120,7 @@ public static class BSParam public static float NumberOfSolverIterations { get; private set; } public static bool UseSingleSidedMeshes { get; private set; } public static float GlobalContactBreakingThreshold { get; private set; } + public static float PhysicsUnmanLoggingFrames { get; private set; } // Avatar parameters public static float AvatarFriction { get; private set; } @@ -671,6 +672,10 @@ public static class BSParam 0f, (s) => { return GlobalContactBreakingThreshold; }, (s,v) => { GlobalContactBreakingThreshold = v; s.UnmanagedParams[0].globalContactBreakingThreshold = v; } ), + new ParameterDefn("PhysicsUnmanLoggingFrames", "If non-zero, frames between output of detailed unmanaged physics statistics", + 0f, + (s) => { return PhysicsUnmanLoggingFrames; }, + (s,v) => { PhysicsUnmanLoggingFrames = v; s.UnmanagedParams[0].physicsLoggingFrames = v; } ), new ParameterDefn("CSHullMaxDepthSplit", "CS impl: max depth to split for hull. 1-10 but > 7 is iffy", 7 ), diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs index c7deb4e..8888d6d 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainHeightmap.cs @@ -112,15 +112,14 @@ public sealed class BSTerrainHeightmap : BSTerrainPhys m_physicsScene.PE.SetRestitution(m_mapInfo.terrainBody, BSParam.TerrainRestitution); m_physicsScene.PE.SetCollisionFlags(m_mapInfo.terrainBody, CollisionFlags.CF_STATIC_OBJECT); + m_mapInfo.terrainBody.collisionType = CollisionType.Terrain; + // Return the new terrain to the world of physical objects m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_mapInfo.terrainBody); // redo its bounding box now that it is in the world m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_mapInfo.terrainBody); - m_mapInfo.terrainBody.collisionType = CollisionType.Terrain; - m_mapInfo.terrainBody.ApplyCollisionMask(m_physicsScene); - // Make it so the terrain will not move or be considered for movement. m_physicsScene.PE.ForceActivationState(m_mapInfo.terrainBody, ActivationState.DISABLE_SIMULATION); diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs index c016eed..441d2d3 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSTerrainManager.cs @@ -138,13 +138,14 @@ public sealed class BSTerrainManager : IDisposable m_groundPlane = m_physicsScene.PE.CreateBodyWithDefaultMotionState(groundPlaneShape, BSScene.GROUNDPLANE_ID, Vector3.Zero, Quaternion.Identity); + // Everything collides with the ground plane. + m_groundPlane.collisionType = CollisionType.Groundplane; + m_physicsScene.PE.AddObjectToWorld(m_physicsScene.World, m_groundPlane); m_physicsScene.PE.UpdateSingleAabb(m_physicsScene.World, m_groundPlane); + // Ground plane does not move m_physicsScene.PE.ForceActivationState(m_groundPlane, ActivationState.DISABLE_SIMULATION); - // Everything collides with the ground plane. - m_groundPlane.collisionType = CollisionType.Groundplane; - m_groundPlane.ApplyCollisionMask(m_physicsScene); BSTerrainPhys initialTerrain = new BSTerrainHeightmap(m_physicsScene, Vector3.Zero, BSScene.TERRAIN_ID, DefaultRegionSize); lock (m_terrains) diff --git a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs index d5060e3..971ff9f 100755 --- a/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BulletSimData.cs @@ -235,7 +235,8 @@ public static Dictionary CollisionTypeM { CollisionType.Groundplane, new CollisionTypeFilterGroup(CollisionType.Groundplane, (uint)CollisionFilterGroups.BGroundPlaneGroup, - (uint)CollisionFilterGroups.BAllGroup) + // (uint)CollisionFilterGroups.BAllGroup) + (uint)(CollisionFilterGroups.BCharacterGroup | CollisionFilterGroups.BSolidGroup)) }, { CollisionType.Terrain, new CollisionTypeFilterGroup(CollisionType.Terrain, -- cgit v1.1 From 5d61c4039dd4f22b20875a0a9dee72179642da9c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 24 Oct 2013 00:33:14 +0100 Subject: Only set the data present event if we actually queued an outoing packet (not if we sent immediately) --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 8d957dc..981f7ef 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -919,6 +919,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (packet.Type == PacketType.CoarseLocationUpdate && allowSplitting) allowSplitting = false; + bool packetQueued = false; + if (allowSplitting && packet.HasVariableBlocks) { byte[][] datas = packet.ToBytesMultiple(); @@ -930,18 +932,21 @@ namespace OpenSim.Region.ClientStack.LindenUDP for (int i = 0; i < packetCount; i++) { byte[] data = datas[i]; - SendPacketData(udpClient, data, packet.Type, category, method); + + if (!SendPacketData(udpClient, data, packet.Type, category, method)) + packetQueued = true; } } else { byte[] data = packet.ToBytes(); - SendPacketData(udpClient, data, packet.Type, category, method); + packetQueued = SendPacketData(udpClient, data, packet.Type, category, method); } PacketPool.Instance.ReturnPacket(packet); - m_dataPresentEvent.Set(); + if (packetQueued) + m_dataPresentEvent.Set(); } /// @@ -955,7 +960,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP /// The method to call if the packet is not acked by the client. If null, then a standard /// resend of the packet is done. /// - public void SendPacketData( + /// true if the data was sent immediately, false if it was queued for sending + public bool SendPacketData( LLUDPClient udpClient, byte[] data, PacketType type, ThrottleOutPacketType category, UnackedPacketMethod method) { int dataLength = data.Length; @@ -1020,7 +1026,14 @@ namespace OpenSim.Region.ClientStack.LindenUDP // packet so that it isn't sent before a queued update packet. bool requestQueue = type == PacketType.KillObject; if (!outgoingPacket.Client.EnqueueOutgoing(outgoingPacket, requestQueue)) + { SendPacketFinal(outgoingPacket); + return true; + } + else + { + return false; + } #endregion Queue or Send } -- cgit v1.1 From cccdfcb59eea7f8a43fe34ca55ff89b3317904f2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 24 Oct 2013 00:37:49 +0100 Subject: Comment out LLUDPServer.BroadcastPacket() to reduce code complexity. Appears to be a never used method. --- .../Region/ClientStack/Linden/UDP/LLUDPServer.cs | 76 +++++++++++----------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 981f7ef..218c2b2 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs @@ -862,44 +862,44 @@ namespace OpenSim.Region.ClientStack.LindenUDP return x == m_location; } - public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting) - { - // CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way - if ((packet.Type == PacketType.CoarseLocationUpdate || packet.Type == PacketType.AvatarGroupsReply) && allowSplitting) - allowSplitting = false; - - if (allowSplitting && packet.HasVariableBlocks) - { - byte[][] datas = packet.ToBytesMultiple(); - int packetCount = datas.Length; - - if (packetCount < 1) - m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length); - - for (int i = 0; i < packetCount; i++) - { - byte[] data = datas[i]; - m_scene.ForEachClient( - delegate(IClientAPI client) - { - if (client is LLClientView) - SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null); - } - ); - } - } - else - { - byte[] data = packet.ToBytes(); - m_scene.ForEachClient( - delegate(IClientAPI client) - { - if (client is LLClientView) - SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null); - } - ); - } - } +// public void BroadcastPacket(Packet packet, ThrottleOutPacketType category, bool sendToPausedAgents, bool allowSplitting) +// { +// // CoarseLocationUpdate and AvatarGroupsReply packets cannot be split in an automated way +// if ((packet.Type == PacketType.CoarseLocationUpdate || packet.Type == PacketType.AvatarGroupsReply) && allowSplitting) +// allowSplitting = false; +// +// if (allowSplitting && packet.HasVariableBlocks) +// { +// byte[][] datas = packet.ToBytesMultiple(); +// int packetCount = datas.Length; +// +// if (packetCount < 1) +// m_log.Error("[LLUDPSERVER]: Failed to split " + packet.Type + " with estimated length " + packet.Length); +// +// for (int i = 0; i < packetCount; i++) +// { +// byte[] data = datas[i]; +// m_scene.ForEachClient( +// delegate(IClientAPI client) +// { +// if (client is LLClientView) +// SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null); +// } +// ); +// } +// } +// else +// { +// byte[] data = packet.ToBytes(); +// m_scene.ForEachClient( +// delegate(IClientAPI client) +// { +// if (client is LLClientView) +// SendPacketData(((LLClientView)client).UDPClient, data, packet.Type, category, null); +// } +// ); +// } +// } /// /// Start the process of sending a packet to the client. -- cgit v1.1 From 31989bd51e5bdabbfab874ed79531df5ca172ec1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 24 Oct 2013 21:29:57 +0100 Subject: Show texture ids for full object/part info console commmds --- .../World/Objects/Commands/ObjectCommandsModule.cs | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index 0e79733..e77f0aa 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs @@ -631,7 +631,22 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands cdl.AddRow("SculptType", s.SculptType); cdl.AddRow("State", s.State); - // TODO, unpack and display texture entries + // TODO, need to display more information about textures but in a compact format + // to stop output becoming huge. + for (int i = 0; i < sop.GetNumberOfSides(); i++) + { + Primitive.TextureEntryFace teFace = s.Textures.FaceTextures[i]; + + UUID textureID; + + if (teFace != null) + textureID = teFace.TextureID; + else + textureID = s.Textures.DefaultTexture.TextureID; + + cdl.AddRow(string.Format("Face {0} texture ID", i), textureID); + } + //cdl.AddRow("Textures", string.Format("{0} entries", s.Textures. } -- cgit v1.1 From df76e5231035c8d45b4e8a28c1f21a18b4974b67 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 24 Oct 2013 23:00:02 +0100 Subject: minor: Add commented out code for apparent passing of texture IDs in ObjectProperties UDP replies to viewer Not yet shown that this is used or resolves a bug where not all textures appear on objects with an "XML with textures" upload from singularity 1.8.3 Proper texture entries are actually present and appear properly on relog, but not on select from viewer until at least one face texture is changed. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 6b58fb7..03cd2b4 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -4546,6 +4546,32 @@ namespace OpenSim.Region.ClientStack.LindenUDP SceneObjectPart root = sop.ParentGroup.RootPart; block.TouchName = Util.StringToBytes256(root.TouchName); + + // SL 3.3.4, at least, appears to read this information as a concatenated byte[] stream of UUIDs but + // it's not yet clear whether this is actually used. If this is done in the future then a pre-cached + // copy is really needed since it's less efficient to be constantly recreating this byte array. +// using (MemoryStream memStream = new MemoryStream()) +// { +// using (BinaryWriter binWriter = new BinaryWriter(memStream)) +// { +// for (int i = 0; i < sop.GetNumberOfSides(); i++) +// { +// Primitive.TextureEntryFace teFace = sop.Shape.Textures.FaceTextures[i]; +// +// UUID textureID; +// +// if (teFace != null) +// textureID = teFace.TextureID; +// else +// textureID = sop.Shape.Textures.DefaultTexture.TextureID; +// +// binWriter.Write(textureID.GetBytes()); +// } +// +// block.TextureID = memStream.ToArray(); +// } +// } + block.TextureID = new byte[0]; // TextureID ??? block.SitName = Util.StringToBytes256(root.SitName); block.OwnerMask = root.OwnerMask; -- cgit v1.1 From 93d5d66fbd44733186439971d819f9409dac4bdd Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sat, 26 Oct 2013 21:20:19 -0700 Subject: BulletSim: update collision flags to make sure they fit in the shorts provided. --- OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs index f7dd158..be6f152 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSApiTemplate.cs @@ -249,7 +249,7 @@ public enum CollisionFlags : uint BS_VEHICLE_COLLISIONS = 1 << 12, // return collisions for vehicle ground checking BS_RETURN_ROOT_COMPOUND_SHAPE = 1 << 13, // return the pos/rot of the root shape in a compound shape BS_NONE = 0, - BS_ALL = 0xFFFFFFFF + BS_ALL = 0x7FFF // collision flags are a signed short }; // Values f collisions groups and masks @@ -265,14 +265,14 @@ public enum CollisionFilterGroups : uint BDebrisGroup = 1 << 3, // 0008 BSensorTrigger = 1 << 4, // 0010 BCharacterGroup = 1 << 5, // 0020 - BAllGroup = 0x000FFFFF, + BAllGroup = 0x0007FFF, // collision flags are a signed short // Filter groups defined by BulletSim - BGroundPlaneGroup = 1 << 10, // 0400 - BTerrainGroup = 1 << 11, // 0800 - BRaycastGroup = 1 << 12, // 1000 - BSolidGroup = 1 << 13, // 2000 + BGroundPlaneGroup = 1 << 8, // 0400 + BTerrainGroup = 1 << 9, // 0800 + BRaycastGroup = 1 << 10, // 1000 + BSolidGroup = 1 << 11, // 2000 // BLinksetGroup = xx // a linkset proper is either static or dynamic - BLinksetChildGroup = 1 << 14, // 4000 + BLinksetChildGroup = 1 << 12, // 4000 }; // CFM controls the 'hardness' of the constraint. 0=fixed, 0..1=violatable. Default=0 -- cgit v1.1