diff options
author | UbitUmarov | 2014-07-22 14:50:17 +0100 |
---|---|---|
committer | UbitUmarov | 2014-07-22 14:50:17 +0100 |
commit | cf132430ae6d989412cccc0e9c8148798b1382d5 (patch) | |
tree | 8757a85089f4d00b8ac050ca5cdfa63b49505b19 /OpenSim/Region | |
parent | dont try to cross with avatars on DIE_AT_EDGE or RETURN_AT_EDGE sog (diff) | |
download | opensim-SC-cf132430ae6d989412cccc0e9c8148798b1382d5.zip opensim-SC-cf132430ae6d989412cccc0e9c8148798b1382d5.tar.gz opensim-SC-cf132430ae6d989412cccc0e9c8148798b1382d5.tar.bz2 opensim-SC-cf132430ae6d989412cccc0e9c8148798b1382d5.tar.xz |
tell scripts about positions changes after they are actually changed
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 299effa..48aacfe 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -687,22 +687,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
687 | } | 687 | } |
688 | } | 688 | } |
689 | 689 | ||
690 | // Restuff the new GroupPosition into each SOP of the linkset. | ||
691 | // This has the affect of resetting and tainting the physics actors. | ||
692 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
693 | bool triggerScriptEvent = m_rootPart.GroupPosition != val; | 690 | bool triggerScriptEvent = m_rootPart.GroupPosition != val; |
694 | if (m_dupeInProgress) | 691 | if (m_dupeInProgress || IsDeleted) |
695 | triggerScriptEvent = false; | 692 | triggerScriptEvent = false; |
693 | |||
696 | m_rootPart.GroupPosition = val; | 694 | m_rootPart.GroupPosition = val; |
697 | if (triggerScriptEvent) | 695 | |
698 | m_rootPart.TriggerScriptChangedEvent(Changed.POSITION); | 696 | // Restuff the new GroupPosition into each child SOP of the linkset. |
697 | // this is needed because physics may not have linksets but just loose SOPs in world | ||
698 | |||
699 | SceneObjectPart[] parts = m_parts.GetArray(); | ||
700 | |||
699 | foreach (SceneObjectPart part in parts) | 701 | foreach (SceneObjectPart part in parts) |
700 | { | 702 | { |
701 | if (part == m_rootPart) | 703 | if (part != m_rootPart) |
702 | continue; | 704 | part.GroupPosition = val; |
703 | part.GroupPosition = val; | 705 | } |
704 | if (triggerScriptEvent) | 706 | |
707 | // now that position is changed tell it to scripts | ||
708 | if (triggerScriptEvent) | ||
709 | { | ||
710 | foreach (SceneObjectPart part in parts) | ||
711 | { | ||
705 | part.TriggerScriptChangedEvent(Changed.POSITION); | 712 | part.TriggerScriptChangedEvent(Changed.POSITION); |
713 | } | ||
706 | } | 714 | } |
707 | 715 | ||
708 | /* | 716 | /* |