mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 02:36:00 +08:00
Stop attempts to rewear already worn items from removing and reattaching.
Viewer 2/3 will sometimes attempt to rewear attachments, even though they have already been attached during the main login process. This change ignores those attempts. This stops script failures during login, as the rewearing was racing with the script startup code. It might also help with attachments being abnormally put into deleted state. Hopefully resolves some more of http://opensimulator.org/mantis/view.php?id=5644
This commit is contained in:
@@ -652,7 +652,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
if (!Entities.Remove(agentID))
|
||||
{
|
||||
m_log.WarnFormat(
|
||||
"[SCENEGRAPH]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list",
|
||||
"[SCENE GRAPH]: Tried to remove non-existent scene presence with agent ID {0} from scene Entities list",
|
||||
agentID);
|
||||
}
|
||||
|
||||
@@ -675,7 +675,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
}
|
||||
else
|
||||
{
|
||||
m_log.WarnFormat("[SCENEGRAPH]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
|
||||
m_log.WarnFormat("[SCENE GRAPH]: Tried to remove non-existent scene presence with agent ID {0} from scene ScenePresences list", agentID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,5 +389,18 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
parts[i].Inventory.ResumeScripts();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if any part in the scene object contains scripts, false otherwise.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool ContainsScripts()
|
||||
{
|
||||
foreach (SceneObjectPart part in Parts)
|
||||
if (part.Inventory.ContainsScripts())
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1035,10 +1035,15 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
item.BasePermissions = perms;
|
||||
}
|
||||
}
|
||||
|
||||
m_inventorySerial++;
|
||||
HasInventoryChanged = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this part inventory contains any scripts. False otherwise.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool ContainsScripts()
|
||||
{
|
||||
lock (m_items)
|
||||
|
||||
Reference in New Issue
Block a user