mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
Straighten out some attachment mess. Don't save attachment states for HG
visitors at all. On Leaving a sim, save only the changed ones. Don't save all scripted stuff when leaving a sim.
This commit is contained in:
@@ -3104,7 +3104,17 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
m_eventManager.TriggerOnRemovePresence(agentID);
|
||||
|
||||
if (AttachmentsModule != null && !avatar.IsChildAgent && avatar.PresenceType != PresenceType.Npc)
|
||||
AttachmentsModule.SaveChangedAttachments(avatar);
|
||||
{
|
||||
IUserManagement uMan = m_aScene.RequestModuleInterface<IUserManagement>();
|
||||
// Don't save attachments for HG visitors, it
|
||||
// messes up their inventory. When a HG visitor logs
|
||||
// out on a foreign grid, their attachments will be
|
||||
// reloaded in the state they were in when they left
|
||||
// the home grid. This is best anyway as the visited
|
||||
// grid may use an incompatible script engine.
|
||||
if (uMan == null || uMan.IsLocalGridUser(id))
|
||||
AttachmentsModule.SaveChangedAttachments(avatar, false);
|
||||
}
|
||||
|
||||
ForEachClient(
|
||||
delegate(IClientAPI client)
|
||||
|
||||
Reference in New Issue
Block a user