diff options
Diffstat (limited to 'OpenSim/Region')
6 files changed, 43 insertions, 52 deletions
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 | } |