aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorUbitUmarov2019-09-04 13:58:38 +0100
committerUbitUmarov2019-09-04 13:58:38 +0100
commit7771cc00c41147593af8ce692f386889e4a813de (patch)
tree72fc9f08fda05193eea6a6f6127783bd87bd4508 /OpenSim/Region/CoreModules
parentCache assets even in cases where the upload fails. That helps in asset upload... (diff)
downloadopensim-SC-7771cc00c41147593af8ce692f386889e4a813de.zip
opensim-SC-7771cc00c41147593af8ce692f386889e4a813de.tar.gz
opensim-SC-7771cc00c41147593af8ce692f386889e4a813de.tar.bz2
opensim-SC-7771cc00c41147593af8ce692f386889e4a813de.tar.xz
don't wear vegetables
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rwxr-xr-xOpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs2
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs28
2 files changed, 26 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 864fc79..a43db33 100755
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -1235,7 +1235,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
1235 if (objatt == null) 1235 if (objatt == null)
1236 { 1236 {
1237 m_log.WarnFormat( 1237 m_log.WarnFormat(
1238 "[ATTACHMENTS MODULE]: Could not retrieve item {0} for attaching to avatar {1} at point {2}", 1238 "[ATTACHMENTS MODULE]: did not attached item {0} to avatar {1} at point {2}",
1239 itemID, sp.Name, attachmentPt); 1239 itemID, sp.Name, attachmentPt);
1240 1240
1241 return null; 1241 return null;
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 69c1e4e..4c4db3a 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -556,10 +556,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
556 } 556 }
557 } 557 }
558 558
559/* this is already done under m_Scene.AddInventoryItem(item) that triggers TriggerOnNewInventoryItemUploadComplete calling HG
559 // This is a hook to do some per-asset post-processing for subclasses that need that 560 // This is a hook to do some per-asset post-processing for subclasses that need that
560 if (remoteClient != null && action != DeRezAction.Delete) 561 if (remoteClient != null && action != DeRezAction.Delete)
561 ExportAsset(remoteClient.AgentId, asset.FullID); 562 ExportAsset(remoteClient.AgentId, asset.FullID);
562 563*/
563 return item; 564 return item;
564 } 565 }
565 566
@@ -918,8 +919,29 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
918 } 919 }
919 920
920 int primcount = 0; 921 int primcount = 0;
921 foreach (SceneObjectGroup g in objlist) 922 if(attachment)
922 primcount += g.PrimCount; 923 {
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
923 945
924 if (!m_Scene.Permissions.CanRezObject( 946 if (!m_Scene.Permissions.CanRezObject(
925 primcount, remoteClient.AgentId, pos) 947 primcount, remoteClient.AgentId, pos)