From 8a398ef02d60b3f9007bc76fa404ddffa6c458d4 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 30 Apr 2011 16:01:54 +0200 Subject: When coming in from a legacy region without fatpacks, start scripts the usual way --- OpenSim/Region/Framework/Scenes/Scene.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1d06889..bbf36f1 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2409,6 +2409,22 @@ namespace OpenSim.Region.Framework.Scenes newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); newObject.ResumeScripts(); } + else + { + ScenePresence sp; + if (TryGetScenePresence(newObject.OwnerID, out sp)) + { + // If the scene presence is here and already a root + // agent, we came from a ;egacy region. Start the scripts + // here as they used to start. + // TODO: Remove in 0.7.3 + if (!sp.IsChildAgent) + { + newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); + newObject.ResumeScripts(); + } + } + } // Do this as late as possible so that listeners have full access to the incoming object EventManager.TriggerOnIncomingSceneObject(newObject); -- cgit v1.1