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