diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 73f07ba..da3a541 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -892,6 +892,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
892 | if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) | 892 | if (!m_scene.SimulationService.UpdateAgent(neighbourRegion, cAgent)) |
893 | { | 893 | { |
894 | // region doesn't take it | 894 | // region doesn't take it |
895 | ReInstantiateScripts(agent); | ||
895 | ResetFromTransit(agent.UUID); | 896 | ResetFromTransit(agent.UUID); |
896 | return agent; | 897 | return agent; |
897 | } | 898 | } |
@@ -1761,14 +1762,22 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1761 | protected void ReInstantiateScripts(ScenePresence sp) | 1762 | protected void ReInstantiateScripts(ScenePresence sp) |
1762 | { | 1763 | { |
1763 | int i = 0; | 1764 | int i = 0; |
1764 | sp.Attachments.ForEach(delegate(SceneObjectGroup sog) | 1765 | if (sp.InTransitScriptStates.Count > 0) |
1765 | { | 1766 | { |
1766 | sog.SetState(sp.InTransitScriptStates[i++], sp.Scene); | 1767 | sp.Attachments.ForEach(delegate(SceneObjectGroup sog) |
1767 | sog.CreateScriptInstances(0, false, sp.Scene.DefaultScriptEngine, 0); | 1768 | { |
1768 | sog.ResumeScripts(); | 1769 | if (i < sp.InTransitScriptStates.Count) |
1769 | }); | 1770 | { |
1771 | sog.SetState(sp.InTransitScriptStates[i++], sp.Scene); | ||
1772 | sog.CreateScriptInstances(0, false, sp.Scene.DefaultScriptEngine, 0); | ||
1773 | sog.ResumeScripts(); | ||
1774 | } | ||
1775 | else | ||
1776 | m_log.ErrorFormat("[ENTITY TRANSFER MODULE]: InTransitScriptStates.Count={0} smaller than Attachments.Count={1}", sp.InTransitScriptStates.Count, sp.Attachments.Count); | ||
1777 | }); | ||
1770 | 1778 | ||
1771 | sp.InTransitScriptStates.Clear(); | 1779 | sp.InTransitScriptStates.Clear(); |
1780 | } | ||
1772 | } | 1781 | } |
1773 | #endregion | 1782 | #endregion |
1774 | 1783 | ||