diff options
author | UbitUmarov | 2014-08-03 19:35:16 +0100 |
---|---|---|
committer | UbitUmarov | 2014-08-03 19:35:16 +0100 |
commit | 6b3f10790eb72a6c0fa3e5d088d681d28fc835dd (patch) | |
tree | 98ee1d7ec26d1d4c3bb7788d3a5e1cdc7e28612a /OpenSim/Region/CoreModules | |
parent | dont get script states for NPCs on deRez (diff) | |
download | opensim-SC-6b3f10790eb72a6c0fa3e5d088d681d28fc835dd.zip opensim-SC-6b3f10790eb72a6c0fa3e5d088d681d28fc835dd.tar.gz opensim-SC-6b3f10790eb72a6c0fa3e5d088d681d28fc835dd.tar.bz2 opensim-SC-6b3f10790eb72a6c0fa3e5d088d681d28fc835dd.tar.xz |
bugg
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 9e6ed91..5bc6631 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -390,7 +390,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
390 | 390 | ||
391 | if (sp.PresenceType != PresenceType.Npc) | 391 | if (sp.PresenceType != PresenceType.Npc) |
392 | { | 392 | { |
393 | m_log.DebugFormat("[ATTACHMENTS MODULE]: enter PrepareScriptInstanceForSave loop"); | ||
394 | foreach (SceneObjectGroup so in attachments) | 393 | foreach (SceneObjectGroup so in attachments) |
395 | { | 394 | { |
396 | // Scripts MUST be snapshotted before the object is | 395 | // Scripts MUST be snapshotted before the object is |
@@ -400,18 +399,23 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
400 | // scripts performing attachment operations at the same time. Getting object states stops the scripts. | 399 | // scripts performing attachment operations at the same time. Getting object states stops the scripts. |
401 | scriptStates[so] = PrepareScriptInstanceForSave(so, false); | 400 | scriptStates[so] = PrepareScriptInstanceForSave(so, false); |
402 | } | 401 | } |
403 | } | ||
404 | 402 | ||
405 | m_log.DebugFormat("[ATTACHMENTS MODULE]: enter UpdateDetachedObject loop"); | 403 | lock (sp.AttachmentsSyncLock) |
406 | lock (sp.AttachmentsSyncLock) | 404 | { |
407 | { | 405 | foreach (SceneObjectGroup so in attachments) |
408 | foreach (SceneObjectGroup so in attachments) | 406 | UpdateDetachedObject(sp, so, scriptStates[so]); |
409 | UpdateDetachedObject(sp, so, scriptStates[so]); | 407 | sp.ClearAttachments(); |
410 | m_log.DebugFormat("[ATTACHMENTS MODULE]: enter ClearAttachments"); | 408 | } |
411 | sp.ClearAttachments(); | ||
412 | } | 409 | } |
413 | m_log.DebugFormat("[ATTACHMENTS MODULE]: derez done"); | 410 | else |
414 | 411 | { | |
412 | lock (sp.AttachmentsSyncLock) | ||
413 | { | ||
414 | foreach (SceneObjectGroup so in attachments) | ||
415 | UpdateDetachedObject(sp, so, String.Empty); | ||
416 | sp.ClearAttachments(); | ||
417 | } | ||
418 | } | ||
415 | } | 419 | } |
416 | 420 | ||
417 | public void DeleteAttachmentsFromScene(IScenePresence sp, bool silent) | 421 | public void DeleteAttachmentsFromScene(IScenePresence sp, bool silent) |