Put the previous state back in the attachments in case the agent transfer fails.

This commit is contained in:
Diva Canto
2011-05-04 12:04:35 -07:00
parent df7dacd004
commit 6c503e75ac
2 changed files with 18 additions and 1 deletions

View File

@@ -1759,11 +1759,15 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
protected void ReInstantiateScripts(ScenePresence sp)
{
int i = 0;
sp.Attachments.ForEach(delegate(SceneObjectGroup sog)
{
sog.SetState(sp.InTransitScriptStates[i++], sp.Scene);
sog.CreateScriptInstances(0, false, sp.Scene.DefaultScriptEngine, 0);
sog.ResumeScripts();
});
sp.InTransitScriptStates.Clear();
}
#endregion