aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authoronefang2020-09-09 06:15:12 +1000
committeronefang2020-09-09 06:15:12 +1000
commite5c367442132d7edc846b28f36ddac9e82b66cda (patch)
treea31fc2f4c558e306822128ad38a99f1529a70af2
parentOpenSim changed the way FSAssets directory structure works by default, sort t... (diff)
downloadopensim-SC-e5c367442132d7edc846b28f36ddac9e82b66cda.zip
opensim-SC-e5c367442132d7edc846b28f36ddac9e82b66cda.tar.gz
opensim-SC-e5c367442132d7edc846b28f36ddac9e82b66cda.tar.bz2
opensim-SC-e5c367442132d7edc846b28f36ddac9e82b66cda.tar.xz
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.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/Constants.cs2
-rw-r--r--OpenSim/Framework/RegionInfo.cs8
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs2
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs18
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs25
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs16
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs13
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs21
-rw-r--r--OpenSim/Services/GridService/GridService.cs3
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs62
10 files changed, 50 insertions, 120 deletions
diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs
index 64912b4..ea89db3 100644
--- a/OpenSim/Framework/Constants.cs
+++ b/OpenSim/Framework/Constants.cs
@@ -37,7 +37,7 @@ namespace OpenSim.Framework
37 // DO NOT USE THIS FOR ANY NEW CODE. Use Scene.RegionInfo.RegionSize[XYZ] as a region might not 37 // DO NOT USE THIS FOR ANY NEW CODE. Use Scene.RegionInfo.RegionSize[XYZ] as a region might not
38 // be the legacy region size. 38 // be the legacy region size.
39 public const uint RegionSize = 256; 39 public const uint RegionSize = 256;
40 public const uint RegionHeight = 4096; 40 public const uint RegionHeight = 16384;
41 41
42 public const uint MaximumRegionSize = 4096; 42 public const uint MaximumRegionSize = 4096;
43 43
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs
index b88d31f..df0b8da 100644
--- a/OpenSim/Framework/RegionInfo.cs
+++ b/OpenSim/Framework/RegionInfo.cs
@@ -846,10 +846,10 @@ namespace OpenSim.Framework
846 if (RegionSizeX != RegionSizeY) 846 if (RegionSizeX != RegionSizeY)
847 { 847 {
848 uint minSize = Math.Min(RegionSizeX, RegionSizeY); 848 uint minSize = Math.Min(RegionSizeX, RegionSizeY);
849 RegionSizeX = minSize; 849//// RegionSizeX = minSize;
850 RegionSizeY = minSize; 850//// RegionSizeY = minSize;
851 m_log.ErrorFormat("{0} Regions must be square until viewers are updated. Forcing region {1} size to <{2},{3}>", 851 m_log.WarnFormat("{0} Regions must be square until viewers are updated. NOT Forcing region {1} size to <{2},{3}>",
852 LogHeader, m_regionName, RegionSizeX, RegionSizeY); 852 LogHeader, m_regionName, minSize, minSize);
853 } 853 }
854 854
855 // There is a practical limit to region size. 855 // There is a practical limit to region size.
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
3112 for (int i = 0; i < buttonlabels.Length; i++) 3112 for (int i = 0; i < buttonlabels.Length; i++)
3113 { 3113 {
3114 buttons[i] = new ScriptDialogPacket.ButtonsBlock(); 3114 buttons[i] = new ScriptDialogPacket.ButtonsBlock();
3115 buttons[i].ButtonLabel = Util.StringToBytes(buttonlabels[i],24); 3115 buttons[i].ButtonLabel = Util.StringToBytes256(buttonlabels[i]);
3116 } 3116 }
3117 dialog.Buttons = buttons; 3117 dialog.Buttons = buttons;
3118 3118
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
550// group.Name, group.LocalId, sp.Name, attachmentPt, silent); 550// group.Name, group.LocalId, sp.Name, attachmentPt, silent);
551 551
552 552
553 if (group.GetSittingAvatarsCount() != 0) 553//// if (group.GetSittingAvatarsCount() != 0)
554 { 554//// {
555 if (DebugLevel > 0) 555//// if (DebugLevel > 0)
556 m_log.WarnFormat( 556//// m_log.WarnFormat(
557 "[ATTACHMENTS MODULE]: Ignoring request to attach {0} {1} to {2} on {3} since {4} avatars are still sitting on it", 557//// "[ATTACHMENTS MODULE]: Ignoring request to attach {0} {1} to {2} on {3} since {4} avatars are still sitting on it",
558 group.Name, group.LocalId, sp.Name, attachmentPt, group.GetSittingAvatarsCount()); 558//// group.Name, group.LocalId, sp.Name, attachmentPt, group.GetSittingAvatarsCount());
559 559////
560 return false; 560//// return false;
561 } 561//// }
562 562
563 Vector3 attachPos = group.AbsolutePosition; 563 Vector3 attachPos = group.AbsolutePosition;
564 564
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
919 } 919 }
920 920
921 int primcount = 0; 921 int primcount = 0;
922 if(attachment) 922 foreach (SceneObjectGroup g in objlist)
923 { 923 primcount += g.PrimCount;
924 foreach (SceneObjectGroup g in objlist)
925 {
926 if(g.RootPart.Shape != null)
927 {
928 PCode code = (PCode)g.RootPart.Shape.PCode;
929 if(code == PCode.Grass || code == PCode.NewTree || code == PCode.Tree)
930 {
931 // dont wear vegetables
932 remoteClient.SendAgentAlertMessage("You cannot wear system plants. They could grow roots inside your avatar", false);
933 return null;
934 }
935 }
936 primcount += g.PrimCount;
937 }
938 }
939 else
940 {
941 foreach (SceneObjectGroup g in objlist)
942 primcount += g.PrimCount;
943 }
944
945 924
946 if (!m_Scene.Permissions.CanRezObject( 925 if (!m_Scene.Permissions.CanRezObject(
947 primcount, remoteClient.AgentId, pos) 926 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
3595 3595
3596 if (part != null) 3596 if (part != null)
3597 { 3597 {
3598 if (part.ParentGroup.IsAttachment) 3598//// if (part.ParentGroup.IsAttachment)
3599 { 3599//// {
3600 m_log.WarnFormat( 3600//// m_log.WarnFormat(
3601 "[SCENE PRESENCE]: Avatar {0} tried to sit on part {1} from object {2} in {3} but this is an attachment for avatar id {4}", 3601//// "[SCENE PRESENCE]: Avatar {0} tried to sit on part {1} from object {2} in {3} but this is an attachment for avatar id {4}",
3602 Name, part.Name, part.ParentGroup.Name, Scene.Name, part.ParentGroup.AttachedAvatar); 3602//// Name, part.Name, part.ParentGroup.Name, Scene.Name, part.ParentGroup.AttachedAvatar);
3603 3603////
3604 return; 3604//// return;
3605 } 3605//// }
3606 3606
3607 if (part.SitTargetAvatar == UUID) 3607 if (part.SitTargetAvatar == UUID)
3608 { 3608 {
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
2709 pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region. 2709 pos.x < -10.0 || // return FALSE if more than 10 meters into a west-adjacent region.
2710 pos.x > (World.RegionInfo.RegionSizeX + 10) || // return FALSE if more than 10 meters into a east-adjacent region. 2710 pos.x > (World.RegionInfo.RegionSizeX + 10) || // return FALSE if more than 10 meters into a east-adjacent region.
2711 pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region. 2711 pos.y < -10.0 || // return FALSE if more than 10 meters into a south-adjacent region.
2712 pos.y > (World.RegionInfo.RegionSizeY + 10) || // return FALSE if more than 10 meters into a north-adjacent region. 2712 pos.y > (World.RegionInfo.RegionSizeY + 10) // return FALSE if more than 10 meters into a north-adjacent region.
2713 pos.z > Constants.RegionHeight // return FALSE if altitude than 4096m
2714 ) 2713 )
2715 ) 2714 )
2716 { 2715 {
@@ -3609,9 +3608,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3609 3608
3610 float dist = (float)llVecDist(llGetPos(), pos); 3609 float dist = (float)llVecDist(llGetPos(), pos);
3611 3610
3612 if (dist > m_ScriptDistanceFactor * 10.0f)
3613 return;
3614
3615 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory); 3611 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(inventory);
3616 3612
3617 if (item == null) 3613 if (item == null)
@@ -8182,16 +8178,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8182 { 8178 {
8183 if (buttons.Data[i].ToString() == String.Empty) 8179 if (buttons.Data[i].ToString() == String.Empty)
8184 { 8180 {
8185 Error("llDialog", "Button label cannot be blank"); 8181 Error("llDialog", "Button label cannot be blank.");
8186 return; 8182 return;
8187 } 8183 }
8188/*
8189 if (buttons.Data[i].ToString().Length > 24) 8184 if (buttons.Data[i].ToString().Length > 24)
8190 { 8185 {
8191 Error("llDialog", "Button label cannot be longer than 24 characters"); 8186 Error("llDialog", "Button label should not be longer than 24 characters.");
8192 return;
8193 } 8187 }
8194*/
8195 buts[i] = buttons.Data[i].ToString(); 8188 buts[i] = buttons.Data[i].ToString();
8196 } 8189 }
8197 8190
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
336 private string CheckThreatLevelTest(ThreatLevel level, string function) 336 private string CheckThreatLevelTest(ThreatLevel level, string function)
337 { 337 {
338 FunctionPerms perms; 338 FunctionPerms perms;
339
340 // This test is coz the test system manages to call scripts without having them in items.
341 //// TODO - fix up the test system.
342 if ((null != m_item) && (null != m_item.OwnerID))
343 {
344 // Grid gods can do anything they damn well please.
345 if (World.Permissions.IsGridGod(m_item.OwnerID))
346 {
347 return String.Empty;
348 }
349 else
350 {
351 // So can active gods.
352 ScenePresence sp = World.GetScenePresence(m_item.OwnerID);
353 if (sp != null && !sp.IsDeleted && sp.IsGod)
354 return String.Empty;
355 }
356 }
357
339 if (!m_FunctionPerms.TryGetValue(function, out perms)) 358 if (!m_FunctionPerms.TryGetValue(function, out perms))
340 { 359 {
341 perms = new FunctionPerms(); 360 perms = new FunctionPerms();
@@ -5675,4 +5694,4 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5675 return 0; 5694 return 0;
5676 } 5695 }
5677 } 5696 }
5678} \ No newline at end of file 5697}
diff --git a/OpenSim/Services/GridService/GridService.cs b/OpenSim/Services/GridService/GridService.cs
index b42cfb1..18fcd9b 100644
--- a/OpenSim/Services/GridService/GridService.cs
+++ b/OpenSim/Services/GridService/GridService.cs
@@ -198,7 +198,8 @@ namespace OpenSim.Services.GridService
198 return "Invalid RegionID - cannot be zero UUID"; 198 return "Invalid RegionID - cannot be zero UUID";
199 199
200 if (regionInfos.RegionLocY <= Constants.MaximumRegionSize) 200 if (regionInfos.RegionLocY <= Constants.MaximumRegionSize)
201 return "Region location reserved for HG links coord Y must be higher than " + (Constants.MaximumRegionSize/256).ToString(); 201 m_log.WarnFormat("{0} Region location reserved for HG links coord Y should be higher than {1}.", LogHeader, (Constants.MaximumRegionSize/256).ToString());
202//// return "Region location reserved for HG links coord Y must be higher than " + (Constants.MaximumRegionSize/256).ToString();
202 203
203 String reason = "Region overlaps another region"; 204 String reason = "Region overlaps another region";
204 205
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 4f5fe59..3c7295a 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -63,7 +63,6 @@ namespace OpenSim.Services.GridService
63 protected GatekeeperServiceConnector m_GatekeeperConnector; 63 protected GatekeeperServiceConnector m_GatekeeperConnector;
64 64
65 protected UUID m_ScopeID = UUID.Zero; 65 protected UUID m_ScopeID = UUID.Zero;
66// protected bool m_Check4096 = true;
67 protected string m_MapTileDirectory = string.Empty; 66 protected string m_MapTileDirectory = string.Empty;
68 protected string m_ThisGatekeeperURI = string.Empty; 67 protected string m_ThisGatekeeperURI = string.Empty;
69 protected string m_ThisGatekeeperHost = string.Empty; 68 protected string m_ThisGatekeeperHost = string.Empty;
@@ -93,8 +92,6 @@ namespace OpenSim.Services.GridService
93 if (scope != string.Empty) 92 if (scope != string.Empty)
94 UUID.TryParse(scope, out m_ScopeID); 93 UUID.TryParse(scope, out m_ScopeID);
95 94
96// m_Check4096 = gridConfig.GetBoolean("Check4096", true);
97
98//// TODO OpenSim is crazy, this is called from Robust and OpenSim, Robust needs the ../caches bit, OpenSim somehow adds a path already. I can't tell why. So strip the path. 95//// TODO OpenSim is crazy, this is called from Robust and OpenSim, Robust needs the ../caches bit, OpenSim somehow adds a path already. I can't tell why. So strip the path.
99 m_MapTileDirectory = Path.Combine(Util.cacheDir(), Path.GetFileName(gridConfig.GetString("MapTileDirectory", "maptiles"))); 96 m_MapTileDirectory = Path.Combine(Util.cacheDir(), Path.GetFileName(gridConfig.GetString("MapTileDirectory", "maptiles")));
100 97
@@ -305,19 +302,6 @@ namespace OpenSim.Services.GridService
305 return true; 302 return true;
306 } 303 }
307 304
308 // We are now performing this check for each individual teleport in the EntityTransferModule instead. This
309 // allows us to give better feedback when teleports fail because of the distance reason (which can't be
310 // done here) and it also hypergrid teleports that are within range (possibly because the source grid
311 // itself has regions that are very far apart).
312// uint x, y;
313// if (m_Check4096 && !Check4096(handle, out x, out y))
314// {
315// //RemoveHyperlinkRegion(regInfo.RegionID);
316// reason = "Region is too far (" + x + ", " + y + ")";
317// m_log.Info("[HYPERGRID LINKER]: Unable to link, region is too far (" + x + ", " + y + ")");
318// //return false;
319// }
320
321 regInfo.RegionID = regionID; 305 regInfo.RegionID = regionID;
322 regInfo.RegionSizeX = sizeX; 306 regInfo.RegionSizeX = sizeX;
323 regInfo.RegionSizeY = sizeY; 307 regInfo.RegionSizeY = sizeY;
@@ -370,52 +354,6 @@ namespace OpenSim.Services.GridService
370 } 354 }
371 } 355 }
372 356
373// Not currently used
374// /// <summary>
375// /// Cope with this viewer limitation.
376// /// </summary>
377// /// <param name="regInfo"></param>
378// /// <returns></returns>
379// public bool Check4096(ulong realHandle, out uint x, out uint y)
380// {
381// uint ux = 0, uy = 0;
382// Utils.LongToUInts(realHandle, out ux, out uy);
383// x = Util.WorldToRegionLoc(ux);
384// y = Util.WorldToRegionLoc(uy);
385//
386// const uint limit = Util.RegionToWorldLoc(4096 - 1);
387// uint xmin = ux - limit;
388// uint xmax = ux + limit;
389// uint ymin = uy - limit;
390// uint ymax = uy + limit;
391// // World map boundary checks
392// if (xmin < 0 || xmin > ux)
393// xmin = 0;
394// if (xmax > int.MaxValue || xmax < ux)
395// xmax = int.MaxValue;
396// if (ymin < 0 || ymin > uy)
397// ymin = 0;
398// if (ymax > int.MaxValue || ymax < uy)
399// ymax = int.MaxValue;
400//
401// // Check for any regions that are within the possible teleport range to the linked region
402// List<GridRegion> regions = m_GridService.GetRegionRange(m_ScopeID, (int)xmin, (int)xmax, (int)ymin, (int)ymax);
403// if (regions.Count == 0)
404// {
405// return false;
406// }
407// else
408// {
409// // Check for regions which are not linked regions
410// List<GridRegion> hyperlinks = m_GridService.GetHyperlinks(m_ScopeID);
411// IEnumerable<GridRegion> availableRegions = regions.Except(hyperlinks);
412// if (availableRegions.Count() == 0)
413// return false;
414// }
415//
416// return true;
417// }
418
419 private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle) 357 private void AddHyperlinkRegion(GridRegion regionInfo, ulong regionHandle)
420 { 358 {
421 RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo); 359 RegionData rdata = m_GridService.RegionInfo2RegionData(regionInfo);