diff options
author | Justin Clark-Casey (justincc) | 2012-06-07 23:35:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-07 23:35:21 +0100 |
commit | de87e4871b6eb3852e8f7175f637adaf14a74ccf (patch) | |
tree | 449c439cc504d639578b490e9dcb4ac991b74455 /OpenSim/Region/Framework/Scenes | |
parent | Mantis 6044 Building master currently fails. (diff) | |
download | opensim-SC_OLD-de87e4871b6eb3852e8f7175f637adaf14a74ccf.zip opensim-SC_OLD-de87e4871b6eb3852e8f7175f637adaf14a74ccf.tar.gz opensim-SC_OLD-de87e4871b6eb3852e8f7175f637adaf14a74ccf.tar.bz2 opensim-SC_OLD-de87e4871b6eb3852e8f7175f637adaf14a74ccf.tar.xz |
Don't send kill object messages to clients when a child agent is closed.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ae35cb9..f291022 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -3274,26 +3274,29 @@ namespace OpenSim.Region.Framework.Scenes | |||
3274 | { | 3274 | { |
3275 | m_eventManager.TriggerOnRemovePresence(agentID); | 3275 | m_eventManager.TriggerOnRemovePresence(agentID); |
3276 | 3276 | ||
3277 | if (AttachmentsModule != null && !isChildAgent && avatar.PresenceType != PresenceType.Npc) | 3277 | if (!isChildAgent) |
3278 | { | 3278 | { |
3279 | IUserManagement uMan = RequestModuleInterface<IUserManagement>(); | 3279 | if (AttachmentsModule != null && avatar.PresenceType != PresenceType.Npc) |
3280 | // Don't save attachments for HG visitors, it | ||
3281 | // messes up their inventory. When a HG visitor logs | ||
3282 | // out on a foreign grid, their attachments will be | ||
3283 | // reloaded in the state they were in when they left | ||
3284 | // the home grid. This is best anyway as the visited | ||
3285 | // grid may use an incompatible script engine. | ||
3286 | if (uMan == null || uMan.IsLocalGridUser(avatar.UUID)) | ||
3287 | AttachmentsModule.SaveChangedAttachments(avatar, false); | ||
3288 | } | ||
3289 | |||
3290 | ForEachClient( | ||
3291 | delegate(IClientAPI client) | ||
3292 | { | 3280 | { |
3293 | //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway | 3281 | IUserManagement uMan = RequestModuleInterface<IUserManagement>(); |
3294 | try { client.SendKillObject(avatar.RegionHandle, new List<uint> { avatar.LocalId }); } | 3282 | // Don't save attachments for HG visitors, it |
3295 | catch (NullReferenceException) { } | 3283 | // messes up their inventory. When a HG visitor logs |
3296 | }); | 3284 | // out on a foreign grid, their attachments will be |
3285 | // reloaded in the state they were in when they left | ||
3286 | // the home grid. This is best anyway as the visited | ||
3287 | // grid may use an incompatible script engine. | ||
3288 | if (uMan == null || uMan.IsLocalGridUser(avatar.UUID)) | ||
3289 | AttachmentsModule.SaveChangedAttachments(avatar, false); | ||
3290 | } | ||
3291 | |||
3292 | ForEachClient( | ||
3293 | delegate(IClientAPI client) | ||
3294 | { | ||
3295 | //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway | ||
3296 | try { client.SendKillObject(avatar.RegionHandle, new List<uint> { avatar.LocalId }); } | ||
3297 | catch (NullReferenceException) { } | ||
3298 | }); | ||
3299 | } | ||
3297 | 3300 | ||
3298 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); | 3301 | IAgentAssetTransactions agentTransactions = this.RequestModuleInterface<IAgentAssetTransactions>(); |
3299 | if (agentTransactions != null) | 3302 | if (agentTransactions != null) |