diff options
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4d619c3..1d06889 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1255,7 +1255,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1255 | 1255 | ||
1256 | // Increment the frame counter | 1256 | // Increment the frame counter |
1257 | ++Frame; | 1257 | ++Frame; |
1258 | |||
1259 | try | 1258 | try |
1260 | { | 1259 | { |
1261 | // Check if any objects have reached their targets | 1260 | // Check if any objects have reached their targets |
@@ -2383,7 +2382,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2383 | /// <returns></returns> | 2382 | /// <returns></returns> |
2384 | public bool IncomingCreateObject(ISceneObject sog) | 2383 | public bool IncomingCreateObject(ISceneObject sog) |
2385 | { | 2384 | { |
2386 | //m_log.Debug(" >>> IncomingCreateObject(sog) <<< " + ((SceneObjectGroup)sog).AbsolutePosition + " deleted? " + ((SceneObjectGroup)sog).IsDeleted); | 2385 | //m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition, |
2386 | // ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment); | ||
2387 | |||
2387 | SceneObjectGroup newObject; | 2388 | SceneObjectGroup newObject; |
2388 | try | 2389 | try |
2389 | { | 2390 | { |
@@ -2401,9 +2402,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2401 | return false; | 2402 | return false; |
2402 | } | 2403 | } |
2403 | 2404 | ||
2404 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); | 2405 | // For attachments, we need to wait until the agent is root |
2405 | 2406 | // before we restart the scripts, or else some functions won't work. | |
2406 | newObject.ResumeScripts(); | 2407 | if (!newObject.IsAttachment) |
2408 | { | ||
2409 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); | ||
2410 | newObject.ResumeScripts(); | ||
2411 | } | ||
2407 | 2412 | ||
2408 | // Do this as late as possible so that listeners have full access to the incoming object | 2413 | // Do this as late as possible so that listeners have full access to the incoming object |
2409 | EventManager.TriggerOnIncomingSceneObject(newObject); | 2414 | EventManager.TriggerOnIncomingSceneObject(newObject); |
@@ -2540,17 +2545,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2540 | ScenePresence sp = GetScenePresence(sog.OwnerID); | 2545 | ScenePresence sp = GetScenePresence(sog.OwnerID); |
2541 | 2546 | ||
2542 | if (sp != null) | 2547 | if (sp != null) |
2543 | { | 2548 | return sp.GetStateSource(); |
2544 | AgentCircuitData aCircuit = m_authenticateHandler.GetAgentCircuitData(sp.UUID); | ||
2545 | |||
2546 | if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default)) | ||
2547 | { | ||
2548 | // This will get your attention | ||
2549 | //m_log.Error("[XXX] Triggering CHANGED_TELEPORT"); | ||
2550 | 2549 | ||
2551 | return 5; // StateSource.Teleporting | ||
2552 | } | ||
2553 | } | ||
2554 | return 2; // StateSource.PrimCrossing | 2550 | return 2; // StateSource.PrimCrossing |
2555 | } | 2551 | } |
2556 | 2552 | ||