From 134f86e8d5c414409631b25b8c6f0ee45fbd8631 Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Thu, 3 Nov 2016 21:44:39 +1000 Subject: Initial update to OpenSim 0.8.2.1 source code. --- .../World/Objects/BuySell/BuySellModule.cs | 21 ++++---------- .../World/Objects/Commands/ObjectCommandsModule.cs | 32 +++++++++++++++++----- 2 files changed, 31 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region/CoreModules/World/Objects') diff --git a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs index 1e4f0a4..2abc910 100644 --- a/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs @@ -38,6 +38,7 @@ using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes.Serialization; +using PermissionMask = OpenSim.Framework.PermissionMask; namespace OpenSim.Region.CoreModules.World.Objects.BuySell { @@ -140,6 +141,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell part.ObjectSaleType = 0; part.SalePrice = 10; + part.ClickAction = Convert.ToByte(0); group.HasGroupChanged = true; part.SendPropertiesToClient(remoteClient); @@ -150,14 +152,9 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell break; case 2: // Sell a copy - Vector3 inventoryStoredPosition = new Vector3 - (((group.AbsolutePosition.X > (int)Constants.RegionSize) - ? 250 - : group.AbsolutePosition.X) - , - (group.AbsolutePosition.X > (int)Constants.RegionSize) - ? 250 - : group.AbsolutePosition.X, + Vector3 inventoryStoredPosition = new Vector3( + Math.Min(group.AbsolutePosition.X, m_scene.RegionInfo.RegionSizeX - 6), + Math.Min(group.AbsolutePosition.Y, m_scene.RegionInfo.RegionSizeY - 6), group.AbsolutePosition.Z); Vector3 originalPosition = group.AbsolutePosition; @@ -197,13 +194,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell item.InvType = (int)InventoryType.Object; item.Folder = categoryID; - uint nextPerms=(perms & 7) << 13; - if ((nextPerms & (uint)PermissionMask.Copy) == 0) - perms &= ~(uint)PermissionMask.Copy; - if ((nextPerms & (uint)PermissionMask.Transfer) == 0) - perms &= ~(uint)PermissionMask.Transfer; - if ((nextPerms & (uint)PermissionMask.Modify) == 0) - perms &= ~(uint)PermissionMask.Modify; + PermissionsUtil.ApplyFoldedPermissions(perms, ref perms); item.BasePermissions = perms & part.NextOwnerMask; item.CurrentPermissions = perms & part.NextOwnerMask; diff --git a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs index 9fc2daf..e77f0aa 100644 --- a/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs +++ b/OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs @@ -416,7 +416,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) { - m_console.OutputFormat("Error: Start vector {0} does not have a valid format", rawConsoleStartVector); + m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector); return; } @@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) { - m_console.OutputFormat("Error: End vector {0} does not have a valid format", rawConsoleEndVector); + m_console.OutputFormat("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector); return; } @@ -546,7 +546,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands { ConsoleDisplayList cdl = new ConsoleDisplayList(); cdl.AddRow("Name", so.Name); - cdl.AddRow("Descrition", so.Description); + cdl.AddRow("Description", so.Description); cdl.AddRow("Local ID", so.LocalId); cdl.AddRow("UUID", so.UUID); cdl.AddRow("Location", string.Format("{0} @ {1}", so.AbsolutePosition, so.Scene.Name)); @@ -597,6 +597,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands cdl.AddRow("LightFalloff", s.LightFalloff); cdl.AddRow("LightIntensity", s.LightIntensity); cdl.AddRow("LightRadius", s.LightRadius); + cdl.AddRow("Location (relative)", sop.RelativePosition); cdl.AddRow("Media", string.Format("{0} entries", s.Media != null ? s.Media.Count.ToString() : "n/a")); cdl.AddRow("PathBegin", s.PathBegin); cdl.AddRow("PathEnd", s.PathEnd); @@ -619,6 +620,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands cdl.AddRow("ProjectionFocus", s.ProjectionFocus); cdl.AddRow("ProjectionFOV", s.ProjectionFOV); cdl.AddRow("ProjectionTextureUUID", s.ProjectionTextureUUID); + cdl.AddRow("Rotation (Relative)", sop.RotationOffset); + cdl.AddRow("Rotation (World)", sop.GetWorldRotation()); cdl.AddRow("Scale", s.Scale); cdl.AddRow( "SculptData", @@ -628,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. } @@ -896,17 +914,17 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) { - m_console.OutputFormat("Error: Start vector {0} does not have a valid format", rawConsoleStartVector); + m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector); endVector = Vector3.Zero; return false; } - string rawConsoleEndVector = rawComponents.Skip(1).Take(1).Single(); + string rawConsoleEndVector = rawComponents.Skip(2).Take(1).Single(); if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) { - m_console.OutputFormat("Error: End vector {0} does not have a valid format", rawConsoleEndVector); + m_console.OutputFormat("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector); return false; } -- cgit v1.1