aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorDiva Canto2011-04-29 17:09:48 -0700
committerDiva Canto2011-04-29 17:09:48 -0700
commit4d5d6222f7edd7cd9c659571f280076c863a0fb1 (patch)
tree55f3e47e03dabec9dcd067b1e55a054319aad127 /OpenSim/Region/Framework/Scenes/Scene.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-4d5d6222f7edd7cd9c659571f280076c863a0fb1.zip
opensim-SC_OLD-4d5d6222f7edd7cd9c659571f280076c863a0fb1.tar.gz
opensim-SC_OLD-4d5d6222f7edd7cd9c659571f280076c863a0fb1.tar.bz2
opensim-SC_OLD-4d5d6222f7edd7cd9c659571f280076c863a0fb1.tar.xz
Delaying starting the scripts on TPs and crossings until the agent is root.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs22
1 files changed, 8 insertions, 14 deletions
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
1229 1229
1230 // Increment the frame counter 1230 // Increment the frame counter
1231 ++Frame; 1231 ++Frame;
1232
1233 try 1232 try
1234 { 1233 {
1235 // Check if any objects have reached their targets 1234 // Check if any objects have reached their targets
@@ -2336,9 +2335,13 @@ namespace OpenSim.Region.Framework.Scenes
2336 return false; 2335 return false;
2337 } 2336 }
2338 2337
2339 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); 2338 // For attachments, we need to wait until the agent is root
2340 2339 // before we restart the scripts, or else some functions won't work.
2341 newObject.ResumeScripts(); 2340 if (!newObject.IsAttachment)
2341 {
2342 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
2343 newObject.ResumeScripts();
2344 }
2342 2345
2343 // Do this as late as possible so that listeners have full access to the incoming object 2346 // Do this as late as possible so that listeners have full access to the incoming object
2344 EventManager.TriggerOnIncomingSceneObject(newObject); 2347 EventManager.TriggerOnIncomingSceneObject(newObject);
@@ -2455,17 +2458,8 @@ namespace OpenSim.Region.Framework.Scenes
2455 ScenePresence sp = GetScenePresence(sog.OwnerID); 2458 ScenePresence sp = GetScenePresence(sog.OwnerID);
2456 2459
2457 if (sp != null) 2460 if (sp != null)
2458 { 2461 return sp.GetStateSource();
2459 AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(sp.UUID);
2460 2462
2461 if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default))
2462 {
2463 // This will get your attention
2464 //m_log.Error("[XXX] Triggering CHANGED_TELEPORT");
2465
2466 return 5; // StateSource.Teleporting
2467 }
2468 }
2469 return 2; // StateSource.PrimCrossing 2463 return 2; // StateSource.PrimCrossing
2470 } 2464 }
2471 2465