diff options
author | Kitto Flora | 2010-03-19 13:27:12 -0400 |
---|---|---|
committer | Kitto Flora | 2010-03-19 13:27:12 -0400 |
commit | 0e36994fe7b41bb79b195130fbd9f97ace3c611f (patch) | |
tree | 2caae61161a0abaa79f0e63640b8607cc60c371a /OpenSim/Region | |
parent | Fix sit with autopilot. (diff) | |
parent | Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff) | |
download | opensim-SC_OLD-0e36994fe7b41bb79b195130fbd9f97ace3c611f.zip opensim-SC_OLD-0e36994fe7b41bb79b195130fbd9f97ace3c611f.tar.gz opensim-SC_OLD-0e36994fe7b41bb79b195130fbd9f97ace3c611f.tar.bz2 opensim-SC_OLD-0e36994fe7b41bb79b195130fbd9f97ace3c611f.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Diffstat (limited to '')
8 files changed, 220 insertions, 295 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 1c65965..b8c35f7 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -915,7 +915,7 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
915 | 915 | ||
916 | foreach (List<SceneObjectGroup> ol in returns.Values) | 916 | foreach (List<SceneObjectGroup> ol in returns.Values) |
917 | { | 917 | { |
918 | if (m_scene.Permissions.CanUseObjectReturn(this, type, remote_client, ol)) | 918 | if (m_scene.Permissions.CanReturnObjects(this, remote_client.AgentId, ol)) |
919 | m_scene.returnObjects(ol.ToArray(), remote_client.AgentId); | 919 | m_scene.returnObjects(ol.ToArray(), remote_client.AgentId); |
920 | } | 920 | } |
921 | } | 921 | } |
diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 1533462..7159dc6 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs | |||
@@ -200,7 +200,7 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
200 | m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; //FULLY IMPLEMENTED | 200 | m_scene.Permissions.OnIssueEstateCommand += CanIssueEstateCommand; //FULLY IMPLEMENTED |
201 | m_scene.Permissions.OnMoveObject += CanMoveObject; //MAYBE FULLY IMPLEMENTED | 201 | m_scene.Permissions.OnMoveObject += CanMoveObject; //MAYBE FULLY IMPLEMENTED |
202 | m_scene.Permissions.OnObjectEntry += CanObjectEntry; | 202 | m_scene.Permissions.OnObjectEntry += CanObjectEntry; |
203 | m_scene.Permissions.OnReturnObject += CanReturnObject; //NOT YET IMPLEMENTED | 203 | m_scene.Permissions.OnReturnObjects += CanReturnObjects; //NOT YET IMPLEMENTED |
204 | m_scene.Permissions.OnRezObject += CanRezObject; //MAYBE FULLY IMPLEMENTED | 204 | m_scene.Permissions.OnRezObject += CanRezObject; //MAYBE FULLY IMPLEMENTED |
205 | m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand; | 205 | m_scene.Permissions.OnRunConsoleCommand += CanRunConsoleCommand; |
206 | m_scene.Permissions.OnRunScript += CanRunScript; //NOT YET IMPLEMENTED | 206 | m_scene.Permissions.OnRunScript += CanRunScript; //NOT YET IMPLEMENTED |
@@ -230,7 +230,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
230 | m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; //NOT YET IMPLEMENTED | 230 | m_scene.Permissions.OnDeleteUserInventory += CanDeleteUserInventory; //NOT YET IMPLEMENTED |
231 | 231 | ||
232 | m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED | 232 | m_scene.Permissions.OnTeleport += CanTeleport; //NOT YET IMPLEMENTED |
233 | m_scene.Permissions.OnUseObjectReturn += CanUseObjectReturn; //NOT YET IMPLEMENTED | ||
234 | 233 | ||
235 | m_scene.AddCommand(this, "bypass permissions", | 234 | m_scene.AddCommand(this, "bypass permissions", |
236 | "bypass permissions <true / false>", | 235 | "bypass permissions <true / false>", |
@@ -1258,12 +1257,15 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1258 | return false; | 1257 | return false; |
1259 | } | 1258 | } |
1260 | 1259 | ||
1261 | private bool CanReturnObject(UUID objectID, UUID returnerID, Scene scene) | 1260 | private bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects, Scene scene) |
1262 | { | 1261 | { |
1262 | if (objects.Count == 0) | ||
1263 | return false; | ||
1264 | |||
1263 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | 1265 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); |
1264 | if (m_bypassPermissions) return m_bypassPermissionsValue; | 1266 | if (m_bypassPermissions) return m_bypassPermissionsValue; |
1265 | 1267 | ||
1266 | return GenericObjectPermission(returnerID, objectID, false); | 1268 | return GenericObjectPermission(user, objects[0].UUID, false); |
1267 | } | 1269 | } |
1268 | 1270 | ||
1269 | private bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition, Scene scene) | 1271 | private bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition, Scene scene) |
@@ -1730,67 +1732,6 @@ namespace OpenSim.Region.CoreModules.World.Permissions | |||
1730 | return GenericObjectPermission(agentID, prim, false); | 1732 | return GenericObjectPermission(agentID, prim, false); |
1731 | } | 1733 | } |
1732 | 1734 | ||
1733 | private bool CanUseObjectReturn(ILandObject parcel, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene) | ||
1734 | { | ||
1735 | DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); | ||
1736 | if (m_bypassPermissions) return m_bypassPermissionsValue; | ||
1737 | |||
1738 | long powers = 0; | ||
1739 | if (parcel.LandData.GroupID != UUID.Zero) | ||
1740 | client.GetGroupPowers(parcel.LandData.GroupID); | ||
1741 | |||
1742 | switch (type) | ||
1743 | { | ||
1744 | case (uint)ObjectReturnType.Owner: | ||
1745 | // Don't let group members return owner's objects, ever | ||
1746 | // | ||
1747 | if (parcel.LandData.IsGroupOwned) | ||
1748 | { | ||
1749 | if ((powers & (long)GroupPowers.ReturnGroupOwned) != 0) | ||
1750 | return true; | ||
1751 | } | ||
1752 | else | ||
1753 | { | ||
1754 | if (parcel.LandData.OwnerID != client.AgentId) | ||
1755 | return false; | ||
1756 | } | ||
1757 | return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupOwned); | ||
1758 | case (uint)ObjectReturnType.Group: | ||
1759 | if (parcel.LandData.OwnerID != client.AgentId) | ||
1760 | { | ||
1761 | // If permissionis granted through a group... | ||
1762 | // | ||
1763 | if ((powers & (long)GroupPowers.ReturnGroupSet) != 0) | ||
1764 | { | ||
1765 | foreach (SceneObjectGroup g in new List<SceneObjectGroup>(retlist)) | ||
1766 | { | ||
1767 | // check for and remove group owned objects unless | ||
1768 | // the user also has permissions to return those | ||
1769 | // | ||
1770 | if (g.OwnerID == g.GroupID && | ||
1771 | ((powers & (long)GroupPowers.ReturnGroupOwned) == 0)) | ||
1772 | { | ||
1773 | retlist.Remove(g); | ||
1774 | } | ||
1775 | } | ||
1776 | // And allow the operation | ||
1777 | // | ||
1778 | return true; | ||
1779 | } | ||
1780 | } | ||
1781 | return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnGroupSet); | ||
1782 | case (uint)ObjectReturnType.Other: | ||
1783 | if ((powers & (long)GroupPowers.ReturnNonGroup) != 0) | ||
1784 | return true; | ||
1785 | return GenericParcelOwnerPermission(client.AgentId, parcel, (ulong)GroupPowers.ReturnNonGroup); | ||
1786 | case (uint)ObjectReturnType.List: | ||
1787 | break; | ||
1788 | } | ||
1789 | |||
1790 | return GenericParcelOwnerPermission(client.AgentId, parcel, 0); | ||
1791 | // Is it correct to be less restrictive for lists of objects to be returned? | ||
1792 | } | ||
1793 | |||
1794 | private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) { | 1735 | private bool CanCompileScript(UUID ownerUUID, int scriptType, Scene scene) { |
1795 | //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); | 1736 | //m_log.DebugFormat("check if {0} is allowed to compile {1}", ownerUUID, scriptType); |
1796 | switch (scriptType) { | 1737 | switch (scriptType) { |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index b2b061e..ffbf745 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -1581,9 +1581,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1581 | if (remoteClient != null) | 1581 | if (remoteClient != null) |
1582 | { | 1582 | { |
1583 | permissionToTake = | 1583 | permissionToTake = |
1584 | Permissions.CanReturnObject( | 1584 | Permissions.CanReturnObjects( |
1585 | grp.UUID, | 1585 | null, |
1586 | remoteClient.AgentId); | 1586 | remoteClient.AgentId, |
1587 | new List<SceneObjectGroup>() {grp}); | ||
1587 | permissionToDelete = permissionToTake; | 1588 | permissionToDelete = permissionToTake; |
1588 | 1589 | ||
1589 | if (permissionToDelete) | 1590 | if (permissionToDelete) |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs index d1d6b6a..7dab04f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Permissions.cs | |||
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
48 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene); | 48 | public delegate bool EditObjectInventoryHandler(UUID objectID, UUID editorID, Scene scene); |
49 | public delegate bool MoveObjectHandler(UUID objectID, UUID moverID, Scene scene); | 49 | public delegate bool MoveObjectHandler(UUID objectID, UUID moverID, Scene scene); |
50 | public delegate bool ObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene); | 50 | public delegate bool ObjectEntryHandler(UUID objectID, bool enteringRegion, Vector3 newPoint, Scene scene); |
51 | public delegate bool ReturnObjectHandler(UUID objectID, UUID returnerID, Scene scene); | 51 | public delegate bool ReturnObjectsHandler(ILandObject land, UUID user, List<SceneObjectGroup> objects, Scene scene); |
52 | public delegate bool InstantMessageHandler(UUID user, UUID target, Scene startScene); | 52 | public delegate bool InstantMessageHandler(UUID user, UUID target, Scene startScene); |
53 | public delegate bool InventoryTransferHandler(UUID user, UUID target, Scene startScene); | 53 | public delegate bool InventoryTransferHandler(UUID user, UUID target, Scene startScene); |
54 | public delegate bool ViewScriptHandler(UUID script, UUID objectID, UUID user, Scene scene); | 54 | public delegate bool ViewScriptHandler(UUID script, UUID objectID, UUID user, Scene scene); |
@@ -81,7 +81,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
81 | public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID); | 81 | public delegate bool CopyUserInventoryHandler(UUID itemID, UUID userID); |
82 | public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID); | 82 | public delegate bool DeleteUserInventoryHandler(UUID itemID, UUID userID); |
83 | public delegate bool TeleportHandler(UUID userID, Scene scene); | 83 | public delegate bool TeleportHandler(UUID userID, Scene scene); |
84 | public delegate bool UseObjectReturnHandler(ILandObject landData, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene); | ||
85 | #endregion | 84 | #endregion |
86 | 85 | ||
87 | public class ScenePermissions | 86 | public class ScenePermissions |
@@ -107,7 +106,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
107 | public event EditObjectInventoryHandler OnEditObjectInventory; | 106 | public event EditObjectInventoryHandler OnEditObjectInventory; |
108 | public event MoveObjectHandler OnMoveObject; | 107 | public event MoveObjectHandler OnMoveObject; |
109 | public event ObjectEntryHandler OnObjectEntry; | 108 | public event ObjectEntryHandler OnObjectEntry; |
110 | public event ReturnObjectHandler OnReturnObject; | 109 | public event ReturnObjectsHandler OnReturnObjects; |
111 | public event InstantMessageHandler OnInstantMessage; | 110 | public event InstantMessageHandler OnInstantMessage; |
112 | public event InventoryTransferHandler OnInventoryTransfer; | 111 | public event InventoryTransferHandler OnInventoryTransfer; |
113 | public event ViewScriptHandler OnViewScript; | 112 | public event ViewScriptHandler OnViewScript; |
@@ -140,7 +139,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
140 | public event CopyUserInventoryHandler OnCopyUserInventory; | 139 | public event CopyUserInventoryHandler OnCopyUserInventory; |
141 | public event DeleteUserInventoryHandler OnDeleteUserInventory; | 140 | public event DeleteUserInventoryHandler OnDeleteUserInventory; |
142 | public event TeleportHandler OnTeleport; | 141 | public event TeleportHandler OnTeleport; |
143 | public event UseObjectReturnHandler OnUseObjectReturn; | ||
144 | #endregion | 142 | #endregion |
145 | 143 | ||
146 | #region Object Permission Checks | 144 | #region Object Permission Checks |
@@ -377,15 +375,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
377 | #endregion | 375 | #endregion |
378 | 376 | ||
379 | #region RETURN OBJECT | 377 | #region RETURN OBJECT |
380 | public bool CanReturnObject(UUID objectID, UUID returnerID) | 378 | public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects) |
381 | { | 379 | { |
382 | ReturnObjectHandler handler = OnReturnObject; | 380 | ReturnObjectsHandler handler = OnReturnObjects; |
383 | if (handler != null) | 381 | if (handler != null) |
384 | { | 382 | { |
385 | Delegate[] list = handler.GetInvocationList(); | 383 | Delegate[] list = handler.GetInvocationList(); |
386 | foreach (ReturnObjectHandler h in list) | 384 | foreach (ReturnObjectsHandler h in list) |
387 | { | 385 | { |
388 | if (h(objectID, returnerID, m_scene) == false) | 386 | if (h(land, user, objects, m_scene) == false) |
389 | return false; | 387 | return false; |
390 | } | 388 | } |
391 | } | 389 | } |
@@ -949,20 +947,5 @@ namespace OpenSim.Region.Framework.Scenes | |||
949 | } | 947 | } |
950 | return true; | 948 | return true; |
951 | } | 949 | } |
952 | |||
953 | public bool CanUseObjectReturn(ILandObject landData, uint type , IClientAPI client, List<SceneObjectGroup> retlist) | ||
954 | { | ||
955 | UseObjectReturnHandler handler = OnUseObjectReturn; | ||
956 | if (handler != null) | ||
957 | { | ||
958 | Delegate[] list = handler.GetInvocationList(); | ||
959 | foreach (UseObjectReturnHandler h in list) | ||
960 | { | ||
961 | if (h(landData, type, client, retlist, m_scene) == false) | ||
962 | return false; | ||
963 | } | ||
964 | } | ||
965 | return true; | ||
966 | } | ||
967 | } | 950 | } |
968 | } | 951 | } |
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs index 92f060b..0b8771c 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerModule.cs | |||
@@ -922,7 +922,7 @@ namespace OpenSim.Region.RegionCombinerModule | |||
922 | VirtualRegion.Permissions.OnIssueEstateCommand += BigRegion.PermissionModule.CanIssueEstateCommand; //FULLY IMPLEMENTED | 922 | VirtualRegion.Permissions.OnIssueEstateCommand += BigRegion.PermissionModule.CanIssueEstateCommand; //FULLY IMPLEMENTED |
923 | VirtualRegion.Permissions.OnMoveObject += BigRegion.PermissionModule.CanMoveObject; //MAYBE FULLY IMPLEMENTED | 923 | VirtualRegion.Permissions.OnMoveObject += BigRegion.PermissionModule.CanMoveObject; //MAYBE FULLY IMPLEMENTED |
924 | VirtualRegion.Permissions.OnObjectEntry += BigRegion.PermissionModule.CanObjectEntry; | 924 | VirtualRegion.Permissions.OnObjectEntry += BigRegion.PermissionModule.CanObjectEntry; |
925 | VirtualRegion.Permissions.OnReturnObject += BigRegion.PermissionModule.CanReturnObject; //NOT YET IMPLEMENTED | 925 | VirtualRegion.Permissions.OnReturnObjects += BigRegion.PermissionModule.CanReturnObjects; //NOT YET IMPLEMENTED |
926 | VirtualRegion.Permissions.OnRezObject += BigRegion.PermissionModule.CanRezObject; //MAYBE FULLY IMPLEMENTED | 926 | VirtualRegion.Permissions.OnRezObject += BigRegion.PermissionModule.CanRezObject; //MAYBE FULLY IMPLEMENTED |
927 | VirtualRegion.Permissions.OnRunConsoleCommand += BigRegion.PermissionModule.CanRunConsoleCommand; | 927 | VirtualRegion.Permissions.OnRunConsoleCommand += BigRegion.PermissionModule.CanRunConsoleCommand; |
928 | VirtualRegion.Permissions.OnRunScript += BigRegion.PermissionModule.CanRunScript; //NOT YET IMPLEMENTED | 928 | VirtualRegion.Permissions.OnRunScript += BigRegion.PermissionModule.CanRunScript; //NOT YET IMPLEMENTED |
@@ -948,7 +948,6 @@ namespace OpenSim.Region.RegionCombinerModule | |||
948 | VirtualRegion.Permissions.OnEditUserInventory += BigRegion.PermissionModule.CanEditUserInventory; //NOT YET IMPLEMENTED | 948 | VirtualRegion.Permissions.OnEditUserInventory += BigRegion.PermissionModule.CanEditUserInventory; //NOT YET IMPLEMENTED |
949 | VirtualRegion.Permissions.OnDeleteUserInventory += BigRegion.PermissionModule.CanDeleteUserInventory; //NOT YET IMPLEMENTED | 949 | VirtualRegion.Permissions.OnDeleteUserInventory += BigRegion.PermissionModule.CanDeleteUserInventory; //NOT YET IMPLEMENTED |
950 | VirtualRegion.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED | 950 | VirtualRegion.Permissions.OnTeleport += BigRegion.PermissionModule.CanTeleport; //NOT YET IMPLEMENTED |
951 | VirtualRegion.Permissions.OnUseObjectReturn += BigRegion.PermissionModule.CanUseObjectReturn; //NOT YET IMPLEMENTED | ||
952 | } | 951 | } |
953 | 952 | ||
954 | #region console commands | 953 | #region console commands |
diff --git a/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs b/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs index 4d1af57..393322d 100644 --- a/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs +++ b/OpenSim/Region/RegionCombinerModule/RegionCombinerPermissionModule.cs | |||
@@ -135,9 +135,9 @@ namespace OpenSim.Region.RegionCombinerModule | |||
135 | return m_rootScene.Permissions.CanObjectEntry(objectid, enteringregion, newpoint); | 135 | return m_rootScene.Permissions.CanObjectEntry(objectid, enteringregion, newpoint); |
136 | } | 136 | } |
137 | 137 | ||
138 | public bool CanReturnObject(UUID objectid, UUID returnerid, Scene scene) | 138 | public bool CanReturnObjects(ILandObject land, UUID user, List<SceneObjectGroup> objects, Scene scene) |
139 | { | 139 | { |
140 | return m_rootScene.Permissions.CanReturnObject(objectid, returnerid); | 140 | return m_rootScene.Permissions.CanReturnObjects(land, user, objects); |
141 | } | 141 | } |
142 | 142 | ||
143 | public bool CanRezObject(int objectcount, UUID owner, Vector3 objectposition, Scene scene) | 143 | public bool CanRezObject(int objectcount, UUID owner, Vector3 objectposition, Scene scene) |
@@ -265,11 +265,6 @@ namespace OpenSim.Region.RegionCombinerModule | |||
265 | return m_rootScene.Permissions.CanTeleport(userid); | 265 | return m_rootScene.Permissions.CanTeleport(userid); |
266 | } | 266 | } |
267 | 267 | ||
268 | public bool CanUseObjectReturn(ILandObject landdata, uint type, IClientAPI client, List<SceneObjectGroup> retlist, Scene scene) | ||
269 | { | ||
270 | return m_rootScene.Permissions.CanUseObjectReturn(landdata, type, client, retlist); | ||
271 | } | ||
272 | |||
273 | #endregion | 268 | #endregion |
274 | } | 269 | } |
275 | } \ No newline at end of file | 270 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8e5c203..10ebf67 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -221,8 +221,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
221 | 221 | ||
222 | public List<SceneObjectPart> GetLinkParts(int linkType) | 222 | public List<SceneObjectPart> GetLinkParts(int linkType) |
223 | { | 223 | { |
224 | List<SceneObjectPart> ret = new List<SceneObjectPart>(); | 224 | List<SceneObjectPart> ret = new List<SceneObjectPart>(); |
225 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) | 225 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) |
226 | return ret; | 226 | return ret; |
227 | ret.Add(m_host); | 227 | ret.Add(m_host); |
228 | 228 | ||
@@ -1115,6 +1115,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1115 | return detectedParams.TouchUV; | 1115 | return detectedParams.TouchUV; |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | [DebuggerNonUserCode] | ||
1118 | public virtual void llDie() | 1119 | public virtual void llDie() |
1119 | { | 1120 | { |
1120 | m_host.AddScriptLPS(1); | 1121 | m_host.AddScriptLPS(1); |
@@ -1190,8 +1191,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1190 | } | 1191 | } |
1191 | 1192 | ||
1192 | public void llSetStatus(int status, int value) | 1193 | public void llSetStatus(int status, int value) |
1193 | { | 1194 | { |
1194 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) | 1195 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) |
1195 | return; | 1196 | return; |
1196 | m_host.AddScriptLPS(1); | 1197 | m_host.AddScriptLPS(1); |
1197 | 1198 | ||
@@ -1367,7 +1368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1367 | } | 1368 | } |
1368 | 1369 | ||
1369 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) | 1370 | protected void SetScale(SceneObjectPart part, LSL_Vector scale) |
1370 | { | 1371 | { |
1371 | // TODO: this needs to trigger a persistance save as well | 1372 | // TODO: this needs to trigger a persistance save as well |
1372 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1373 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1373 | return; | 1374 | return; |
@@ -1426,8 +1427,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1426 | } | 1427 | } |
1427 | 1428 | ||
1428 | protected void SetColor(SceneObjectPart part, LSL_Vector color, int face) | 1429 | protected void SetColor(SceneObjectPart part, LSL_Vector color, int face) |
1429 | { | 1430 | { |
1430 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1431 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1431 | return; | 1432 | return; |
1432 | 1433 | ||
1433 | Primitive.TextureEntry tex = part.Shape.Textures; | 1434 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1471,8 +1472,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1471 | } | 1472 | } |
1472 | 1473 | ||
1473 | public void SetTexGen(SceneObjectPart part, int face,int style) | 1474 | public void SetTexGen(SceneObjectPart part, int face,int style) |
1474 | { | 1475 | { |
1475 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1476 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1476 | return; | 1477 | return; |
1477 | 1478 | ||
1478 | Primitive.TextureEntry tex = part.Shape.Textures; | 1479 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1504,8 +1505,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1504 | } | 1505 | } |
1505 | 1506 | ||
1506 | public void SetGlow(SceneObjectPart part, int face, float glow) | 1507 | public void SetGlow(SceneObjectPart part, int face, float glow) |
1507 | { | 1508 | { |
1508 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1509 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1509 | return; | 1510 | return; |
1510 | 1511 | ||
1511 | Primitive.TextureEntry tex = part.Shape.Textures; | 1512 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1532,8 +1533,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1532 | } | 1533 | } |
1533 | 1534 | ||
1534 | public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump) | 1535 | public void SetShiny(SceneObjectPart part, int face, int shiny, Bumpiness bump) |
1535 | { | 1536 | { |
1536 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1537 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1537 | return; | 1538 | return; |
1538 | 1539 | ||
1539 | Shininess sval = new Shininess(); | 1540 | Shininess sval = new Shininess(); |
@@ -1584,8 +1585,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1584 | } | 1585 | } |
1585 | 1586 | ||
1586 | public void SetFullBright(SceneObjectPart part, int face, bool bright) | 1587 | public void SetFullBright(SceneObjectPart part, int face, bool bright) |
1587 | { | 1588 | { |
1588 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1589 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1589 | return; | 1590 | return; |
1590 | 1591 | ||
1591 | Primitive.TextureEntry tex = part.Shape.Textures; | 1592 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1654,8 +1655,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1654 | } | 1655 | } |
1655 | 1656 | ||
1656 | protected void SetAlpha(SceneObjectPart part, double alpha, int face) | 1657 | protected void SetAlpha(SceneObjectPart part, double alpha, int face) |
1657 | { | 1658 | { |
1658 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1659 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1659 | return; | 1660 | return; |
1660 | 1661 | ||
1661 | Primitive.TextureEntry tex = part.Shape.Textures; | 1662 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1702,8 +1703,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1702 | /// <param name="Force"></param> | 1703 | /// <param name="Force"></param> |
1703 | protected void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, | 1704 | protected void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, |
1704 | float wind, float tension, LSL_Vector Force) | 1705 | float wind, float tension, LSL_Vector Force) |
1705 | { | 1706 | { |
1706 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1707 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1707 | return; | 1708 | return; |
1708 | 1709 | ||
1709 | if (flexi) | 1710 | if (flexi) |
@@ -1737,8 +1738,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1737 | /// <param name="radius"></param> | 1738 | /// <param name="radius"></param> |
1738 | /// <param name="falloff"></param> | 1739 | /// <param name="falloff"></param> |
1739 | protected void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff) | 1740 | protected void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff) |
1740 | { | 1741 | { |
1741 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1742 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1742 | return; | 1743 | return; |
1743 | 1744 | ||
1744 | if (light) | 1745 | if (light) |
@@ -1823,8 +1824,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1823 | } | 1824 | } |
1824 | 1825 | ||
1825 | protected void SetTexture(SceneObjectPart part, string texture, int face) | 1826 | protected void SetTexture(SceneObjectPart part, string texture, int face) |
1826 | { | 1827 | { |
1827 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1828 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1828 | return; | 1829 | return; |
1829 | 1830 | ||
1830 | UUID textureID=new UUID(); | 1831 | UUID textureID=new UUID(); |
@@ -1871,8 +1872,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1871 | } | 1872 | } |
1872 | 1873 | ||
1873 | protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) | 1874 | protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) |
1874 | { | 1875 | { |
1875 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1876 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1876 | return; | 1877 | return; |
1877 | 1878 | ||
1878 | Primitive.TextureEntry tex = part.Shape.Textures; | 1879 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1910,8 +1911,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1910 | } | 1911 | } |
1911 | 1912 | ||
1912 | protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) | 1913 | protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) |
1913 | { | 1914 | { |
1914 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1915 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1915 | return; | 1916 | return; |
1916 | 1917 | ||
1917 | Primitive.TextureEntry tex = part.Shape.Textures; | 1918 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -1949,8 +1950,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1949 | } | 1950 | } |
1950 | 1951 | ||
1951 | protected void RotateTexture(SceneObjectPart part, double rotation, int face) | 1952 | protected void RotateTexture(SceneObjectPart part, double rotation, int face) |
1952 | { | 1953 | { |
1953 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 1954 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
1954 | return; | 1955 | return; |
1955 | 1956 | ||
1956 | Primitive.TextureEntry tex = part.Shape.Textures; | 1957 | Primitive.TextureEntry tex = part.Shape.Textures; |
@@ -2022,8 +2023,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2022 | } | 2023 | } |
2023 | 2024 | ||
2024 | protected void SetPos(SceneObjectPart part, LSL_Vector targetPos) | 2025 | protected void SetPos(SceneObjectPart part, LSL_Vector targetPos) |
2025 | { | 2026 | { |
2026 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 2027 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
2027 | return; | 2028 | return; |
2028 | 2029 | ||
2029 | // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) | 2030 | // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) |
@@ -2119,8 +2120,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2119 | } | 2120 | } |
2120 | 2121 | ||
2121 | protected void SetRot(SceneObjectPart part, Quaternion rot) | 2122 | protected void SetRot(SceneObjectPart part, Quaternion rot) |
2122 | { | 2123 | { |
2123 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 2124 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
2124 | return; | 2125 | return; |
2125 | 2126 | ||
2126 | part.UpdateRotation(rot); | 2127 | part.UpdateRotation(rot); |
@@ -4016,7 +4017,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4016 | bucket); | 4017 | bucket); |
4017 | 4018 | ||
4018 | if (m_TransferModule != null) | 4019 | if (m_TransferModule != null) |
4019 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 4020 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
4020 | 4021 | ||
4021 | //This delay should only occur when giving inventory to avatars. | 4022 | //This delay should only occur when giving inventory to avatars. |
4022 | ScriptSleep(3000); | 4023 | ScriptSleep(3000); |
@@ -4192,6 +4193,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4192 | ScenePresence presence = World.GetScenePresence(agentId); | 4193 | ScenePresence presence = World.GetScenePresence(agentId); |
4193 | if (presence != null) | 4194 | if (presence != null) |
4194 | { | 4195 | { |
4196 | // agent must not be a god | ||
4197 | if (presence.GodLevel >= 200) return; | ||
4198 | |||
4195 | // agent must be over the owners land | 4199 | // agent must be over the owners land |
4196 | if (m_host.OwnerID == World.LandChannel.GetLandObject( | 4200 | if (m_host.OwnerID == World.LandChannel.GetLandObject( |
4197 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 4201 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
@@ -6662,9 +6666,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6662 | } | 6666 | } |
6663 | 6667 | ||
6664 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) | 6668 | protected ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist) |
6665 | { | 6669 | { |
6666 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 6670 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
6667 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6671 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6668 | return shapeBlock; | 6672 | return shapeBlock; |
6669 | 6673 | ||
6670 | if (holeshape != (int)ScriptBaseClass.PRIM_HOLE_DEFAULT && | 6674 | if (holeshape != (int)ScriptBaseClass.PRIM_HOLE_DEFAULT && |
@@ -6735,8 +6739,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6735 | } | 6739 | } |
6736 | 6740 | ||
6737 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) | 6741 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge) |
6738 | { | 6742 | { |
6739 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6743 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6740 | return; | 6744 | return; |
6741 | 6745 | ||
6742 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6746 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6787,8 +6791,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6787 | } | 6791 | } |
6788 | 6792 | ||
6789 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) | 6793 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge) |
6790 | { | 6794 | { |
6791 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6795 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6792 | return; | 6796 | return; |
6793 | 6797 | ||
6794 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6798 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6832,8 +6836,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6832 | } | 6836 | } |
6833 | 6837 | ||
6834 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector holesize, LSL_Vector topshear, LSL_Vector profilecut, LSL_Vector taper_a, float revolutions, float radiusoffset, float skew, byte fudge) | 6838 | protected void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector holesize, LSL_Vector topshear, LSL_Vector profilecut, LSL_Vector taper_a, float revolutions, float radiusoffset, float skew, byte fudge) |
6835 | { | 6839 | { |
6836 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6840 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6837 | return; | 6841 | return; |
6838 | 6842 | ||
6839 | ObjectShapePacket.ObjectDataBlock shapeBlock; | 6843 | ObjectShapePacket.ObjectDataBlock shapeBlock; |
@@ -6956,8 +6960,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6956 | } | 6960 | } |
6957 | 6961 | ||
6958 | protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) | 6962 | protected void SetPrimitiveShapeParams(SceneObjectPart part, string map, int type) |
6959 | { | 6963 | { |
6960 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 6964 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
6961 | return; | 6965 | return; |
6962 | 6966 | ||
6963 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); | 6967 | ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); |
@@ -6993,13 +6997,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6993 | } | 6997 | } |
6994 | 6998 | ||
6995 | public void llSetPrimitiveParams(LSL_List rules) | 6999 | public void llSetPrimitiveParams(LSL_List rules) |
6996 | { | 7000 | { |
6997 | m_host.AddScriptLPS(1); | 7001 | m_host.AddScriptLPS(1); |
6998 | SetPrimParams(m_host, rules); | 7002 | SetPrimParams(m_host, rules); |
6999 | } | 7003 | } |
7000 | 7004 | ||
7001 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) | 7005 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) |
7002 | { | 7006 | { |
7003 | m_host.AddScriptLPS(1); | 7007 | m_host.AddScriptLPS(1); |
7004 | 7008 | ||
7005 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 7009 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
@@ -7014,8 +7018,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7014 | } | 7018 | } |
7015 | 7019 | ||
7016 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) | 7020 | protected void SetPrimParams(SceneObjectPart part, LSL_List rules) |
7017 | { | 7021 | { |
7018 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) | 7022 | if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted) |
7019 | return; | 7023 | return; |
7020 | 7024 | ||
7021 | int idx = 0; | 7025 | int idx = 0; |
@@ -7848,96 +7852,96 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7848 | } | 7852 | } |
7849 | break; | 7853 | break; |
7850 | 7854 | ||
7851 | case (int)ScriptBaseClass.PRIM_BUMP_SHINY: | 7855 | case (int)ScriptBaseClass.PRIM_BUMP_SHINY: |
7852 | if (remain < 1) | 7856 | if (remain < 1) |
7853 | return res; | 7857 | return res; |
7854 | face = (int)rules.GetLSLIntegerItem(idx++); | 7858 | face = (int)rules.GetLSLIntegerItem(idx++); |
7855 | 7859 | ||
7856 | tex = part.Shape.Textures; | 7860 | tex = part.Shape.Textures; |
7857 | int shiny; | 7861 | int shiny; |
7858 | if (face == ScriptBaseClass.ALL_SIDES) | 7862 | if (face == ScriptBaseClass.ALL_SIDES) |
7859 | { | 7863 | { |
7860 | for (face = 0; face < GetNumberOfSides(part); face++) | 7864 | for (face = 0; face < GetNumberOfSides(part); face++) |
7861 | { | 7865 | { |
7862 | Shininess shinyness = tex.GetFace((uint)face).Shiny; | 7866 | Shininess shinyness = tex.GetFace((uint)face).Shiny; |
7863 | if (shinyness == Shininess.High) | 7867 | if (shinyness == Shininess.High) |
7864 | { | 7868 | { |
7865 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; | 7869 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; |
7866 | } | 7870 | } |
7867 | else if (shinyness == Shininess.Medium) | 7871 | else if (shinyness == Shininess.Medium) |
7868 | { | 7872 | { |
7869 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; | 7873 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; |
7870 | } | 7874 | } |
7871 | else if (shinyness == Shininess.Low) | 7875 | else if (shinyness == Shininess.Low) |
7872 | { | 7876 | { |
7873 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; | 7877 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; |
7874 | } | 7878 | } |
7875 | else | 7879 | else |
7876 | { | 7880 | { |
7877 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; | 7881 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; |
7878 | } | 7882 | } |
7879 | res.Add(new LSL_Integer(shiny)); | 7883 | res.Add(new LSL_Integer(shiny)); |
7880 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); | 7884 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); |
7881 | } | 7885 | } |
7882 | } | 7886 | } |
7883 | else | 7887 | else |
7884 | { | 7888 | { |
7885 | Shininess shinyness = tex.GetFace((uint)face).Shiny; | 7889 | Shininess shinyness = tex.GetFace((uint)face).Shiny; |
7886 | if (shinyness == Shininess.High) | 7890 | if (shinyness == Shininess.High) |
7887 | { | 7891 | { |
7888 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; | 7892 | shiny = ScriptBaseClass.PRIM_SHINY_HIGH; |
7889 | } | 7893 | } |
7890 | else if (shinyness == Shininess.Medium) | 7894 | else if (shinyness == Shininess.Medium) |
7891 | { | 7895 | { |
7892 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; | 7896 | shiny = ScriptBaseClass.PRIM_SHINY_MEDIUM; |
7893 | } | 7897 | } |
7894 | else if (shinyness == Shininess.Low) | 7898 | else if (shinyness == Shininess.Low) |
7895 | { | 7899 | { |
7896 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; | 7900 | shiny = ScriptBaseClass.PRIM_SHINY_LOW; |
7897 | } | 7901 | } |
7898 | else | 7902 | else |
7899 | { | 7903 | { |
7900 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; | 7904 | shiny = ScriptBaseClass.PRIM_SHINY_NONE; |
7901 | } | 7905 | } |
7902 | res.Add(new LSL_Integer(shiny)); | 7906 | res.Add(new LSL_Integer(shiny)); |
7903 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); | 7907 | res.Add(new LSL_Integer((int)tex.GetFace((uint)face).Bump)); |
7904 | } | 7908 | } |
7905 | break; | 7909 | break; |
7906 | 7910 | ||
7907 | case (int)ScriptBaseClass.PRIM_FULLBRIGHT: | 7911 | case (int)ScriptBaseClass.PRIM_FULLBRIGHT: |
7908 | if (remain < 1) | 7912 | if (remain < 1) |
7909 | return res; | 7913 | return res; |
7910 | face = (int)rules.GetLSLIntegerItem(idx++); | 7914 | face = (int)rules.GetLSLIntegerItem(idx++); |
7911 | 7915 | ||
7912 | tex = part.Shape.Textures; | 7916 | tex = part.Shape.Textures; |
7913 | int fullbright; | 7917 | int fullbright; |
7914 | if (face == ScriptBaseClass.ALL_SIDES) | 7918 | if (face == ScriptBaseClass.ALL_SIDES) |
7915 | { | 7919 | { |
7916 | for (face = 0; face < GetNumberOfSides(part); face++) | 7920 | for (face = 0; face < GetNumberOfSides(part); face++) |
7917 | { | 7921 | { |
7918 | if (tex.GetFace((uint)face).Fullbright == true) | 7922 | if (tex.GetFace((uint)face).Fullbright == true) |
7919 | { | 7923 | { |
7920 | fullbright = ScriptBaseClass.TRUE; | 7924 | fullbright = ScriptBaseClass.TRUE; |
7921 | } | 7925 | } |
7922 | else | 7926 | else |
7923 | { | 7927 | { |
7924 | fullbright = ScriptBaseClass.FALSE; | 7928 | fullbright = ScriptBaseClass.FALSE; |
7925 | } | 7929 | } |
7926 | res.Add(new LSL_Integer(fullbright)); | 7930 | res.Add(new LSL_Integer(fullbright)); |
7927 | } | 7931 | } |
7928 | } | 7932 | } |
7929 | else | 7933 | else |
7930 | { | 7934 | { |
7931 | if (tex.GetFace((uint)face).Fullbright == true) | 7935 | if (tex.GetFace((uint)face).Fullbright == true) |
7932 | { | 7936 | { |
7933 | fullbright = ScriptBaseClass.TRUE; | 7937 | fullbright = ScriptBaseClass.TRUE; |
7934 | } | 7938 | } |
7935 | else | 7939 | else |
7936 | { | 7940 | { |
7937 | fullbright = ScriptBaseClass.FALSE; | 7941 | fullbright = ScriptBaseClass.FALSE; |
7938 | } | 7942 | } |
7939 | res.Add(new LSL_Integer(fullbright)); | 7943 | res.Add(new LSL_Integer(fullbright)); |
7940 | } | 7944 | } |
7941 | break; | 7945 | break; |
7942 | 7946 | ||
7943 | case (int)ScriptBaseClass.PRIM_FLEXIBLE: | 7947 | case (int)ScriptBaseClass.PRIM_FLEXIBLE: |
@@ -7958,37 +7962,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7958 | break; | 7962 | break; |
7959 | 7963 | ||
7960 | case (int)ScriptBaseClass.PRIM_TEXGEN: | 7964 | case (int)ScriptBaseClass.PRIM_TEXGEN: |
7961 | // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) | 7965 | // (PRIM_TEXGEN_DEFAULT, PRIM_TEXGEN_PLANAR) |
7962 | if (remain < 1) | 7966 | if (remain < 1) |
7963 | return res; | 7967 | return res; |
7964 | face = (int)rules.GetLSLIntegerItem(idx++); | 7968 | face = (int)rules.GetLSLIntegerItem(idx++); |
7965 | 7969 | ||
7966 | tex = part.Shape.Textures; | 7970 | tex = part.Shape.Textures; |
7967 | if (face == ScriptBaseClass.ALL_SIDES) | 7971 | if (face == ScriptBaseClass.ALL_SIDES) |
7968 | { | 7972 | { |
7969 | for (face = 0; face < GetNumberOfSides(part); face++) | 7973 | for (face = 0; face < GetNumberOfSides(part); face++) |
7970 | { | 7974 | { |
7971 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) | 7975 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) |
7972 | { | 7976 | { |
7973 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); | 7977 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); |
7974 | } | 7978 | } |
7975 | else | 7979 | else |
7976 | { | 7980 | { |
7977 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); | 7981 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); |
7978 | } | 7982 | } |
7979 | } | 7983 | } |
7980 | } | 7984 | } |
7981 | else | 7985 | else |
7982 | { | 7986 | { |
7983 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) | 7987 | if (tex.GetFace((uint)face).TexMapType == MappingType.Planar) |
7984 | { | 7988 | { |
7985 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); | 7989 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_PLANAR)); |
7986 | } | 7990 | } |
7987 | else | 7991 | else |
7988 | { | 7992 | { |
7989 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); | 7993 | res.Add(new LSL_Integer(ScriptBaseClass.PRIM_TEXGEN_DEFAULT)); |
7990 | } | 7994 | } |
7991 | } | 7995 | } |
7992 | break; | 7996 | break; |
7993 | 7997 | ||
7994 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: | 7998 | case (int)ScriptBaseClass.PRIM_POINT_LIGHT: |
@@ -8006,26 +8010,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8006 | res.Add(new LSL_Float(shape.LightFalloff)); // falloff | 8010 | res.Add(new LSL_Float(shape.LightFalloff)); // falloff |
8007 | break; | 8011 | break; |
8008 | 8012 | ||
8009 | case (int)ScriptBaseClass.PRIM_GLOW: | 8013 | case (int)ScriptBaseClass.PRIM_GLOW: |
8010 | if (remain < 1) | 8014 | if (remain < 1) |
8011 | return res; | 8015 | return res; |
8012 | face = (int)rules.GetLSLIntegerItem(idx++); | 8016 | face = (int)rules.GetLSLIntegerItem(idx++); |
8013 | 8017 | ||
8014 | tex = part.Shape.Textures; | 8018 | tex = part.Shape.Textures; |
8015 | float primglow; | 8019 | float primglow; |
8016 | if (face == ScriptBaseClass.ALL_SIDES) | 8020 | if (face == ScriptBaseClass.ALL_SIDES) |
8017 | { | 8021 | { |
8018 | for (face = 0; face < GetNumberOfSides(part); face++) | 8022 | for (face = 0; face < GetNumberOfSides(part); face++) |
8019 | { | 8023 | { |
8020 | primglow = tex.GetFace((uint)face).Glow; | 8024 | primglow = tex.GetFace((uint)face).Glow; |
8021 | res.Add(new LSL_Float(primglow)); | 8025 | res.Add(new LSL_Float(primglow)); |
8022 | } | 8026 | } |
8023 | } | 8027 | } |
8024 | else | 8028 | else |
8025 | { | 8029 | { |
8026 | primglow = tex.GetFace((uint)face).Glow; | 8030 | primglow = tex.GetFace((uint)face).Glow; |
8027 | res.Add(new LSL_Float(primglow)); | 8031 | res.Add(new LSL_Float(primglow)); |
8028 | } | 8032 | } |
8029 | break; | 8033 | break; |
8030 | case (int)ScriptBaseClass.PRIM_TEXT: | 8034 | case (int)ScriptBaseClass.PRIM_TEXT: |
8031 | Color4 textColor = part.GetTextColor(); | 8035 | Color4 textColor = part.GetTextColor(); |
@@ -9187,7 +9191,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9187 | m_host.AddScriptLPS(1); | 9191 | m_host.AddScriptLPS(1); |
9188 | 9192 | ||
9189 | if (quick_pay_buttons.Data.Length < 4) | 9193 | if (quick_pay_buttons.Data.Length < 4) |
9190 | { | 9194 | { |
9191 | int x; | 9195 | int x; |
9192 | for (x=quick_pay_buttons.Data.Length; x<= 4; x++) | 9196 | for (x=quick_pay_buttons.Data.Length; x<= 4; x++) |
9193 | { | 9197 | { |
@@ -9195,12 +9199,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
9195 | } | 9199 | } |
9196 | } | 9200 | } |
9197 | int[] nPrice = new int[5]; | 9201 | int[] nPrice = new int[5]; |
9198 | nPrice[0]=price; | 9202 | nPrice[0]=price; |
9199 | nPrice[1] = (LSL_Integer)quick_pay_buttons.Data[0]; | 9203 | nPrice[1] = (LSL_Integer)quick_pay_buttons.Data[0]; |
9200 | nPrice[2] = (LSL_Integer)quick_pay_buttons.Data[1]; | 9204 | nPrice[2] = (LSL_Integer)quick_pay_buttons.Data[1]; |
9201 | nPrice[3] = (LSL_Integer)quick_pay_buttons.Data[2]; | 9205 | nPrice[3] = (LSL_Integer)quick_pay_buttons.Data[2]; |
9202 | nPrice[4] = (LSL_Integer)quick_pay_buttons.Data[3]; | 9206 | nPrice[4] = (LSL_Integer)quick_pay_buttons.Data[3]; |
9203 | m_host.ParentGroup.RootPart.PayPrice = nPrice; | 9207 | m_host.ParentGroup.RootPart.PayPrice = nPrice; |
9204 | m_host.ParentGroup.HasGroupChanged = true; | 9208 | m_host.ParentGroup.HasGroupChanged = true; |
9205 | } | 9209 | } |
9206 | 9210 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 3339995..e86d08c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Diagnostics; //for [DebuggerNonUserCode] | ||
29 | using System.Runtime.Remoting.Lifetime; | 30 | using System.Runtime.Remoting.Lifetime; |
30 | using System.Threading; | 31 | using System.Threading; |
31 | using System.Reflection; | 32 | using System.Reflection; |
@@ -309,6 +310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
309 | m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); | 310 | m_LSL_Functions.llDialog(avatar, message, buttons, chat_channel); |
310 | } | 311 | } |
311 | 312 | ||
313 | [DebuggerNonUserCode] | ||
312 | public void llDie() | 314 | public void llDie() |
313 | { | 315 | { |
314 | m_LSL_Functions.llDie(); | 316 | m_LSL_Functions.llDie(); |