don't wear vegetables
parent
3d019323e8
commit
7771cc00c4
|
@ -1235,7 +1235,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||||
if (objatt == null)
|
if (objatt == null)
|
||||||
{
|
{
|
||||||
m_log.WarnFormat(
|
m_log.WarnFormat(
|
||||||
"[ATTACHMENTS MODULE]: Could not retrieve item {0} for attaching to avatar {1} at point {2}",
|
"[ATTACHMENTS MODULE]: did not attached item {0} to avatar {1} at point {2}",
|
||||||
itemID, sp.Name, attachmentPt);
|
itemID, sp.Name, attachmentPt);
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -556,10 +556,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* this is already done under m_Scene.AddInventoryItem(item) that triggers TriggerOnNewInventoryItemUploadComplete calling HG
|
||||||
// This is a hook to do some per-asset post-processing for subclasses that need that
|
// This is a hook to do some per-asset post-processing for subclasses that need that
|
||||||
if (remoteClient != null && action != DeRezAction.Delete)
|
if (remoteClient != null && action != DeRezAction.Delete)
|
||||||
ExportAsset(remoteClient.AgentId, asset.FullID);
|
ExportAsset(remoteClient.AgentId, asset.FullID);
|
||||||
|
*/
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -918,8 +919,29 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
|
||||||
}
|
}
|
||||||
|
|
||||||
int primcount = 0;
|
int primcount = 0;
|
||||||
foreach (SceneObjectGroup g in objlist)
|
if(attachment)
|
||||||
primcount += g.PrimCount;
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!m_Scene.Permissions.CanRezObject(
|
if (!m_Scene.Permissions.CanRezObject(
|
||||||
primcount, remoteClient.AgentId, pos)
|
primcount, remoteClient.AgentId, pos)
|
||||||
|
|
Loading…
Reference in New Issue