From 9892e115ccdcc8567087041917fb5c7694aa8836 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 28 Apr 2011 20:19:54 -0700 Subject: Fatpack message on agent transfers: 1 message only (UpdateAgent) containing the agent and all attachments. Preserves backwards compatibility -- older sims get passed attachments one by one. Meaning that I finally introduced versioning in the simulation service. --- OpenSim/Region/Framework/Scenes/Scene.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 01de824..696c6ee 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2316,7 +2316,9 @@ namespace OpenSim.Region.Framework.Scenes /// public bool IncomingCreateObject(ISceneObject sog) { - //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); + //m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition, + // ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment); + SceneObjectGroup newObject; try { -- cgit v1.1 From 4d5d6222f7edd7cd9c659571f280076c863a0fb1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 29 Apr 2011 17:09:48 -0700 Subject: Delaying starting the scripts on TPs and crossings until the agent is root. --- OpenSim/Region/Framework/Scenes/Scene.cs | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 696c6ee..2cbe4dc 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1229,7 +1229,6 @@ namespace OpenSim.Region.Framework.Scenes // Increment the frame counter ++Frame; - try { // Check if any objects have reached their targets @@ -2336,9 +2335,13 @@ namespace OpenSim.Region.Framework.Scenes return false; } - newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); - - newObject.ResumeScripts(); + // For attachments, we need to wait until the agent is root + // before we restart the scripts, or else some functions won't work. + if (!newObject.IsAttachment) + { + 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); @@ -2455,17 +2458,8 @@ namespace OpenSim.Region.Framework.Scenes ScenePresence sp = GetScenePresence(sog.OwnerID); if (sp != null) - { - AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(sp.UUID); + return sp.GetStateSource(); - if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default)) - { - // This will get your attention - //m_log.Error("[XXX] Triggering CHANGED_TELEPORT"); - - return 5; // StateSource.Teleporting - } - } return 2; // StateSource.PrimCrossing } -- cgit v1.1