From e5c367442132d7edc846b28f36ddac9e82b66cda Mon Sep 17 00:00:00 2001 From: onefang Date: Wed, 9 Sep 2020 06:15:12 +1000 Subject: Remove various limits. Silly 4096 sim TP check for a client bug that was fixed long ago, seems they removed it themselves. Upgrade sim height. Allow menu items longer than 24 characters once more. Allow sitting on attachments, and attaching things with people sitting on them. Revert don't wear vegetables. Remove some script distance limits. Gods can do anything they want, including bypassing OhSilly threat levels. Low Y regions are no longer reserved for HG links. Varregions don't have to be square. Both now report a warning, but continue anyway. Cool VL Viewer handles non square regions, Singularity crashes. Not tested on others. --- .../Region/ClientStack/Linden/UDP/LLClientView.cs | 2 +- .../Avatar/Attachments/AttachmentsModule.cs | 18 ++++++++-------- .../InventoryAccess/InventoryAccessModule.cs | 25 ++-------------------- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 16 +++++++------- .../Shared/Api/Implementation/LSL_Api.cs | 13 +++-------- .../Shared/Api/Implementation/OSSL_Api.cs | 21 +++++++++++++++++- 6 files changed, 43 insertions(+), 52 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index d0902ff..51eeff7 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3112,7 +3112,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP for (int i = 0; i < buttonlabels.Length; i++) { buttons[i] = new ScriptDialogPacket.ButtonsBlock(); - buttons[i].ButtonLabel = Util.StringToBytes(buttonlabels[i],24); + buttons[i].ButtonLabel = Util.StringToBytes256(buttonlabels[i]); } dialog.Buttons = buttons; diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index e82dc7f..64bfb4f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -550,15 +550,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments // group.Name, group.LocalId, sp.Name, attachmentPt, silent); - if (group.GetSittingAvatarsCount() != 0) - { - if (DebugLevel > 0) - m_log.WarnFormat( - "[ATTACHMENTS MODULE]: Ignoring request to attach {0} {1} to {2} on {3} since {4} avatars are still sitting on it", - group.Name, group.LocalId, sp.Name, attachmentPt, group.GetSittingAvatarsCount()); - - return false; - } +//// if (group.GetSittingAvatarsCount() != 0) +//// { +//// if (DebugLevel > 0) +//// m_log.WarnFormat( +//// "[ATTACHMENTS MODULE]: Ignoring request to attach {0} {1} to {2} on {3} since {4} avatars are still sitting on it", +//// group.Name, group.LocalId, sp.Name, attachmentPt, group.GetSittingAvatarsCount()); +//// +//// return false; +//// } Vector3 attachPos = group.AbsolutePosition; diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index facb7a0..0d6fa17 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs @@ -919,29 +919,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess } int primcount = 0; - if(attachment) - { - foreach (SceneObjectGroup g in objlist) - { - if(g.RootPart.Shape != null) - { - PCode code = (PCode)g.RootPart.Shape.PCode; - if(code == PCode.Grass || code == PCode.NewTree || code == PCode.Tree) - { - // dont wear vegetables - remoteClient.SendAgentAlertMessage("You cannot wear system plants. They could grow roots inside your avatar", false); - return null; - } - } - primcount += g.PrimCount; - } - } - else - { - foreach (SceneObjectGroup g in objlist) - primcount += g.PrimCount; - } - + foreach (SceneObjectGroup g in objlist) + primcount += g.PrimCount; if (!m_Scene.Permissions.CanRezObject( primcount, remoteClient.AgentId, pos) diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index c80fba2..0d8f286 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3595,14 +3595,14 @@ namespace OpenSim.Region.Framework.Scenes if (part != null) { - if (part.ParentGroup.IsAttachment) - { - m_log.WarnFormat( - "[SCENE PRESENCE]: Avatar {0} tried to sit on part {1} from object {2} in {3} but this is an attachment for avatar id {4}", - Name, part.Name, part.ParentGroup.Name, Scene.Name, part.ParentGroup.AttachedAvatar); - - return; - } +//// if (part.ParentGroup.IsAttachment) +//// { +//// m_log.WarnFormat( +//// "[SCENE PRESENCE]: Avatar {0} tried to sit on part {1} from object {2} in {3} but this is an attachment for avatar id {4}", +//// Name, part.Name, part.ParentGroup.Name, Scene.Name, part.ParentGroup.AttachedAvatar); +//// +//// return; +//// } if (part.SitTargetAvatar == UUID) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 8815a28..41d1342 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -2709,8 +2709,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region. pos.x > (World.RegionInfo.RegionSizeX + 10) || // return FALSE if more than 10 meters into a east-adjacent region. pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region. - pos.y > (World.RegionInfo.RegionSizeY + 10) || // return FALSE if more than 10 meters into a north-adjacent region. - pos.z > Constants.RegionHeight // return FALSE if altitude than 4096m + pos.y > (World.RegionInfo.RegionSizeY + 10) // return FALSE if more than 10 meters into a north-adjacent region. ) ) { @@ -3609,9 +3608,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api float dist = (float)llVecDist(llGetPos(), pos); - if (dist > m_ScriptDistanceFactor * 10.0f) - return; - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory); if (item == null) @@ -8182,16 +8178,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (buttons.Data[i].ToString() == String.Empty) { - Error("llDialog", "Button label cannot be blank"); + Error("llDialog", "Button label cannot be blank."); return; } -/* if (buttons.Data[i].ToString().Length > 24) { - Error("llDialog", "Button label cannot be longer than 24 characters"); - return; + Error("llDialog", "Button label should not be longer than 24 characters."); } -*/ buts[i] = buttons.Data[i].ToString(); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index eb7049e..53bfa66 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -336,6 +336,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private string CheckThreatLevelTest(ThreatLevel level, string function) { FunctionPerms perms; + + // This test is coz the test system manages to call scripts without having them in items. + //// TODO - fix up the test system. + if ((null != m_item) && (null != m_item.OwnerID)) + { + // Grid gods can do anything they damn well please. + if (World.Permissions.IsGridGod(m_item.OwnerID)) + { + return String.Empty; + } + else + { + // So can active gods. + ScenePresence sp = World.GetScenePresence(m_item.OwnerID); + if (sp != null && !sp.IsDeleted && sp.IsGod) + return String.Empty; + } + } + if (!m_FunctionPerms.TryGetValue(function, out perms)) { perms = new FunctionPerms(); @@ -5675,4 +5694,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return 0; } } -} \ No newline at end of file +} -- cgit v1.1