mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
reduce unnecessary saves of attachments a bit
This commit is contained in:
@@ -1008,6 +1008,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
/// <param name="saveAllScripted"></param>
|
||||
private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp, string scriptedState)
|
||||
{
|
||||
if (sp.IsNPC)
|
||||
return;
|
||||
|
||||
if (m_invAccessModule is null)
|
||||
return;
|
||||
|
||||
if(!grp.HasGroupChanged)
|
||||
{
|
||||
if (DebugLevel > 0)
|
||||
@@ -1020,20 +1026,12 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
|
||||
grp.HasGroupChanged = false;
|
||||
|
||||
if (m_invAccessModule is null)
|
||||
return;
|
||||
|
||||
if (grp.FromItemID.IsZero())
|
||||
{
|
||||
// We can't save temp attachments
|
||||
return;
|
||||
}
|
||||
|
||||
if (sp.IsNPC)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_log.Debug($"[ATTACHMENTS MODULE]: Updating asset for attachment {grp.UUID}, attachpoint {grp.AttachmentPoint}");
|
||||
|
||||
InventoryItemBase item = m_scene.InventoryService.GetItem(sp.UUID, grp.FromItemID);
|
||||
@@ -1153,6 +1151,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
||||
so.IsSelected = false; // fudge....
|
||||
|
||||
so.ScheduleGroupForUpdate(PrimUpdateFlags.FullUpdatewithAnimMatOvr);
|
||||
so.HasGroupChanged = false;
|
||||
}
|
||||
|
||||
// In case it is later dropped again, don't let
|
||||
|
||||
Reference in New Issue
Block a user