Don't send kill object messages to clients when a child agent is closed.
parent
cc27a6cb84
commit
3a27f656b3
|
@ -3254,26 +3254,29 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
{
|
{
|
||||||
m_eventManager.TriggerOnRemovePresence(agentID);
|
m_eventManager.TriggerOnRemovePresence(agentID);
|
||||||
|
|
||||||
if (AttachmentsModule != null && !isChildAgent && avatar.PresenceType != PresenceType.Npc)
|
if (!isChildAgent)
|
||||||
{
|
{
|
||||||
IUserManagement uMan = RequestModuleInterface<IUserManagement>();
|
if (AttachmentsModule != null && avatar.PresenceType != PresenceType.Npc)
|
||||||
// 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(avatar.UUID))
|
|
||||||
AttachmentsModule.SaveChangedAttachments(avatar, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
ForEachClient(
|
|
||||||
delegate(IClientAPI client)
|
|
||||||
{
|
{
|
||||||
//We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway
|
IUserManagement uMan = RequestModuleInterface<IUserManagement>();
|
||||||
try { client.SendKillObject(avatar.RegionHandle, new List<uint> { avatar.LocalId }); }
|
// Don't save attachments for HG visitors, it
|
||||||
catch (NullReferenceException) { }
|
// 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(avatar.UUID))
|
||||||
|
AttachmentsModule.SaveChangedAttachments(avatar, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
ForEachClient(
|
||||||
|
delegate(IClientAPI client)
|
||||||
|
{
|
||||||
|
//We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway
|
||||||
|
try { client.SendKillObject(avatar.RegionHandle, new List<uint> { avatar.LocalId }); }
|
||||||
|
catch (NullReferenceException) { }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>();
|
||||||
if (agentTransactions != null)
|
if (agentTransactions != null)
|
||||||
|
|
Loading…
Reference in New Issue