diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e479628..216eb51 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2384,16 +2384,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2384 | m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName); | 2384 | m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName); |
2385 | return false; | 2385 | return false; |
2386 | } | 2386 | } |
2387 | 2387 | ||
2388 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 2); | 2388 | newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject)); |
2389 | 2389 | ||
2390 | newObject.ResumeScripts(); | 2390 | newObject.ResumeScripts(); |
2391 | 2391 | ||
2392 | // Do this as late as possible so that listeners have full access to the incoming object | 2392 | // Do this as late as possible so that listeners have full access to the incoming object |
2393 | EventManager.TriggerOnIncomingSceneObject(newObject); | 2393 | EventManager.TriggerOnIncomingSceneObject(newObject); |
2394 | 2394 | ||
2395 | TriggerChangedTeleport(newObject); | ||
2396 | |||
2397 | return true; | 2395 | return true; |
2398 | } | 2396 | } |
2399 | 2397 | ||
@@ -2520,7 +2518,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2520 | return true; | 2518 | return true; |
2521 | } | 2519 | } |
2522 | 2520 | ||
2523 | private void TriggerChangedTeleport(SceneObjectGroup sog) | 2521 | private int GetStateSource(SceneObjectGroup sog) |
2524 | { | 2522 | { |
2525 | ScenePresence sp = GetScenePresence(sog.OwnerID); | 2523 | ScenePresence sp = GetScenePresence(sog.OwnerID); |
2526 | 2524 | ||
@@ -2531,13 +2529,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2531 | if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default)) | 2529 | if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default)) |
2532 | { | 2530 | { |
2533 | // This will get your attention | 2531 | // This will get your attention |
2534 | //m_log.Error("[XXX] Triggering "); | 2532 | //m_log.Error("[XXX] Triggering CHANGED_TELEPORT"); |
2535 | 2533 | ||
2536 | // Trigger CHANGED_TELEPORT | 2534 | return 5; // StateSource.Teleporting |
2537 | sp.Scene.EventManager.TriggerOnScriptChangedEvent(sog.LocalId, (uint)Changed.TELEPORT); | ||
2538 | } | 2535 | } |
2539 | |||
2540 | } | 2536 | } |
2537 | return 2; // StateSource.PrimCrossing | ||
2541 | } | 2538 | } |
2542 | 2539 | ||
2543 | #endregion | 2540 | #endregion |