diff options
author | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-03 21:44:39 +1000 |
commit | 134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch) | |
tree | 216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/CoreModules/World/Objects | |
parent | More changing to production grid. Double oops. (diff) | |
download | opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2 opensim-SC-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz |
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Objects')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/BuySell/BuySellModule.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/World/Objects/Commands/ObjectCommandsModule.cs | 32 |
2 files changed, 31 insertions, 22 deletions
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; | |||
38 | using OpenSim.Region.Framework.Interfaces; | 38 | using OpenSim.Region.Framework.Interfaces; |
39 | using OpenSim.Region.Framework.Scenes; | 39 | using OpenSim.Region.Framework.Scenes; |
40 | using OpenSim.Region.Framework.Scenes.Serialization; | 40 | using OpenSim.Region.Framework.Scenes.Serialization; |
41 | using PermissionMask = OpenSim.Framework.PermissionMask; | ||
41 | 42 | ||
42 | namespace OpenSim.Region.CoreModules.World.Objects.BuySell | 43 | namespace OpenSim.Region.CoreModules.World.Objects.BuySell |
43 | { | 44 | { |
@@ -140,6 +141,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
140 | 141 | ||
141 | part.ObjectSaleType = 0; | 142 | part.ObjectSaleType = 0; |
142 | part.SalePrice = 10; | 143 | part.SalePrice = 10; |
144 | part.ClickAction = Convert.ToByte(0); | ||
143 | 145 | ||
144 | group.HasGroupChanged = true; | 146 | group.HasGroupChanged = true; |
145 | part.SendPropertiesToClient(remoteClient); | 147 | part.SendPropertiesToClient(remoteClient); |
@@ -150,14 +152,9 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
150 | break; | 152 | break; |
151 | 153 | ||
152 | case 2: // Sell a copy | 154 | case 2: // Sell a copy |
153 | Vector3 inventoryStoredPosition = new Vector3 | 155 | Vector3 inventoryStoredPosition = new Vector3( |
154 | (((group.AbsolutePosition.X > (int)Constants.RegionSize) | 156 | Math.Min(group.AbsolutePosition.X, m_scene.RegionInfo.RegionSizeX - 6), |
155 | ? 250 | 157 | Math.Min(group.AbsolutePosition.Y, m_scene.RegionInfo.RegionSizeY - 6), |
156 | : group.AbsolutePosition.X) | ||
157 | , | ||
158 | (group.AbsolutePosition.X > (int)Constants.RegionSize) | ||
159 | ? 250 | ||
160 | : group.AbsolutePosition.X, | ||
161 | group.AbsolutePosition.Z); | 158 | group.AbsolutePosition.Z); |
162 | 159 | ||
163 | Vector3 originalPosition = group.AbsolutePosition; | 160 | Vector3 originalPosition = group.AbsolutePosition; |
@@ -197,13 +194,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.BuySell | |||
197 | item.InvType = (int)InventoryType.Object; | 194 | item.InvType = (int)InventoryType.Object; |
198 | item.Folder = categoryID; | 195 | item.Folder = categoryID; |
199 | 196 | ||
200 | uint nextPerms=(perms & 7) << 13; | 197 | PermissionsUtil.ApplyFoldedPermissions(perms, ref perms); |
201 | if ((nextPerms & (uint)PermissionMask.Copy) == 0) | ||
202 | perms &= ~(uint)PermissionMask.Copy; | ||
203 | if ((nextPerms & (uint)PermissionMask.Transfer) == 0) | ||
204 | perms &= ~(uint)PermissionMask.Transfer; | ||
205 | if ((nextPerms & (uint)PermissionMask.Modify) == 0) | ||
206 | perms &= ~(uint)PermissionMask.Modify; | ||
207 | 198 | ||
208 | item.BasePermissions = perms & part.NextOwnerMask; | 199 | item.BasePermissions = perms & part.NextOwnerMask; |
209 | item.CurrentPermissions = perms & part.NextOwnerMask; | 200 | 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 | |||
416 | 416 | ||
417 | if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) | 417 | if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) |
418 | { | 418 | { |
419 | m_console.OutputFormat("Error: Start vector {0} does not have a valid format", rawConsoleStartVector); | 419 | m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector); |
420 | return; | 420 | return; |
421 | } | 421 | } |
422 | 422 | ||
@@ -425,7 +425,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
425 | 425 | ||
426 | if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) | 426 | if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) |
427 | { | 427 | { |
428 | m_console.OutputFormat("Error: End vector {0} does not have a valid format", rawConsoleEndVector); | 428 | m_console.OutputFormat("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector); |
429 | return; | 429 | return; |
430 | } | 430 | } |
431 | 431 | ||
@@ -546,7 +546,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
546 | { | 546 | { |
547 | ConsoleDisplayList cdl = new ConsoleDisplayList(); | 547 | ConsoleDisplayList cdl = new ConsoleDisplayList(); |
548 | cdl.AddRow("Name", so.Name); | 548 | cdl.AddRow("Name", so.Name); |
549 | cdl.AddRow("Descrition", so.Description); | 549 | cdl.AddRow("Description", so.Description); |
550 | cdl.AddRow("Local ID", so.LocalId); | 550 | cdl.AddRow("Local ID", so.LocalId); |
551 | cdl.AddRow("UUID", so.UUID); | 551 | cdl.AddRow("UUID", so.UUID); |
552 | cdl.AddRow("Location", string.Format("{0} @ {1}", so.AbsolutePosition, so.Scene.Name)); | 552 | cdl.AddRow("Location", string.Format("{0} @ {1}", so.AbsolutePosition, so.Scene.Name)); |
@@ -597,6 +597,7 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
597 | cdl.AddRow("LightFalloff", s.LightFalloff); | 597 | cdl.AddRow("LightFalloff", s.LightFalloff); |
598 | cdl.AddRow("LightIntensity", s.LightIntensity); | 598 | cdl.AddRow("LightIntensity", s.LightIntensity); |
599 | cdl.AddRow("LightRadius", s.LightRadius); | 599 | cdl.AddRow("LightRadius", s.LightRadius); |
600 | cdl.AddRow("Location (relative)", sop.RelativePosition); | ||
600 | cdl.AddRow("Media", string.Format("{0} entries", s.Media != null ? s.Media.Count.ToString() : "n/a")); | 601 | cdl.AddRow("Media", string.Format("{0} entries", s.Media != null ? s.Media.Count.ToString() : "n/a")); |
601 | cdl.AddRow("PathBegin", s.PathBegin); | 602 | cdl.AddRow("PathBegin", s.PathBegin); |
602 | cdl.AddRow("PathEnd", s.PathEnd); | 603 | cdl.AddRow("PathEnd", s.PathEnd); |
@@ -619,6 +620,8 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
619 | cdl.AddRow("ProjectionFocus", s.ProjectionFocus); | 620 | cdl.AddRow("ProjectionFocus", s.ProjectionFocus); |
620 | cdl.AddRow("ProjectionFOV", s.ProjectionFOV); | 621 | cdl.AddRow("ProjectionFOV", s.ProjectionFOV); |
621 | cdl.AddRow("ProjectionTextureUUID", s.ProjectionTextureUUID); | 622 | cdl.AddRow("ProjectionTextureUUID", s.ProjectionTextureUUID); |
623 | cdl.AddRow("Rotation (Relative)", sop.RotationOffset); | ||
624 | cdl.AddRow("Rotation (World)", sop.GetWorldRotation()); | ||
622 | cdl.AddRow("Scale", s.Scale); | 625 | cdl.AddRow("Scale", s.Scale); |
623 | cdl.AddRow( | 626 | cdl.AddRow( |
624 | "SculptData", | 627 | "SculptData", |
@@ -628,7 +631,22 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
628 | cdl.AddRow("SculptType", s.SculptType); | 631 | cdl.AddRow("SculptType", s.SculptType); |
629 | cdl.AddRow("State", s.State); | 632 | cdl.AddRow("State", s.State); |
630 | 633 | ||
631 | // TODO, unpack and display texture entries | 634 | // TODO, need to display more information about textures but in a compact format |
635 | // to stop output becoming huge. | ||
636 | for (int i = 0; i < sop.GetNumberOfSides(); i++) | ||
637 | { | ||
638 | Primitive.TextureEntryFace teFace = s.Textures.FaceTextures[i]; | ||
639 | |||
640 | UUID textureID; | ||
641 | |||
642 | if (teFace != null) | ||
643 | textureID = teFace.TextureID; | ||
644 | else | ||
645 | textureID = s.Textures.DefaultTexture.TextureID; | ||
646 | |||
647 | cdl.AddRow(string.Format("Face {0} texture ID", i), textureID); | ||
648 | } | ||
649 | |||
632 | //cdl.AddRow("Textures", string.Format("{0} entries", s.Textures. | 650 | //cdl.AddRow("Textures", string.Format("{0} entries", s.Textures. |
633 | } | 651 | } |
634 | 652 | ||
@@ -896,17 +914,17 @@ namespace OpenSim.Region.CoreModules.World.Objects.Commands | |||
896 | 914 | ||
897 | if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) | 915 | if (!ConsoleUtil.TryParseConsoleMinVector(rawConsoleStartVector, out startVector)) |
898 | { | 916 | { |
899 | m_console.OutputFormat("Error: Start vector {0} does not have a valid format", rawConsoleStartVector); | 917 | m_console.OutputFormat("Error: Start vector '{0}' does not have a valid format", rawConsoleStartVector); |
900 | endVector = Vector3.Zero; | 918 | endVector = Vector3.Zero; |
901 | 919 | ||
902 | return false; | 920 | return false; |
903 | } | 921 | } |
904 | 922 | ||
905 | string rawConsoleEndVector = rawComponents.Skip(1).Take(1).Single(); | 923 | string rawConsoleEndVector = rawComponents.Skip(2).Take(1).Single(); |
906 | 924 | ||
907 | if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) | 925 | if (!ConsoleUtil.TryParseConsoleMaxVector(rawConsoleEndVector, out endVector)) |
908 | { | 926 | { |
909 | m_console.OutputFormat("Error: End vector {0} does not have a valid format", rawConsoleEndVector); | 927 | m_console.OutputFormat("Error: End vector '{0}' does not have a valid format", rawConsoleEndVector); |
910 | return false; | 928 | return false; |
911 | } | 929 | } |
912 | 930 | ||