aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs15
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs3
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs17
4 files changed, 20 insertions, 19 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
index a75cc60..9659883 100644
--- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
+++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
@@ -2636,8 +2636,8 @@ namespace OpenSim.ApplicationPlugins.RemoteController
2636 string text; 2636 string text;
2637 int health = scene.GetHealth(out flags, out text); 2637 int health = scene.GetHealth(out flags, out text);
2638 responseData["health"] = health; 2638 responseData["health"] = health;
2639 responseData["flags"] = health; 2639 responseData["flags"] = flags;
2640 responseData["message"] = health; 2640 responseData["message"] = text;
2641 2641
2642 response.Value = responseData; 2642 response.Value = responseData;
2643 } 2643 }
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index d17814d..792115a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2391,16 +2391,14 @@ namespace OpenSim.Region.Framework.Scenes
2391 m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName); 2391 m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName);
2392 return false; 2392 return false;
2393 } 2393 }
2394 2394
2395 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, 2); 2395 newObject.RootPart.ParentGroup.CreateScriptInstances(0, false, DefaultScriptEngine, GetStateSource(newObject));
2396 2396
2397 newObject.ResumeScripts(); 2397 newObject.ResumeScripts();
2398 2398
2399 // Do this as late as possible so that listeners have full access to the incoming object 2399 // Do this as late as possible so that listeners have full access to the incoming object
2400 EventManager.TriggerOnIncomingSceneObject(newObject); 2400 EventManager.TriggerOnIncomingSceneObject(newObject);
2401 2401
2402 TriggerChangedTeleport(newObject);
2403
2404 return true; 2402 return true;
2405 } 2403 }
2406 2404
@@ -2527,7 +2525,7 @@ namespace OpenSim.Region.Framework.Scenes
2527 return true; 2525 return true;
2528 } 2526 }
2529 2527
2530 private void TriggerChangedTeleport(SceneObjectGroup sog) 2528 private int GetStateSource(SceneObjectGroup sog)
2531 { 2529 {
2532 ScenePresence sp = GetScenePresence(sog.OwnerID); 2530 ScenePresence sp = GetScenePresence(sog.OwnerID);
2533 2531
@@ -2538,13 +2536,12 @@ namespace OpenSim.Region.Framework.Scenes
2538 if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default)) 2536 if (aCircuit != null && (aCircuit.teleportFlags != (uint)TeleportFlags.Default))
2539 { 2537 {
2540 // This will get your attention 2538 // This will get your attention
2541 //m_log.Error("[XXX] Triggering "); 2539 //m_log.Error("[XXX] Triggering CHANGED_TELEPORT");
2542 2540
2543 // Trigger CHANGED_TELEPORT 2541 return 5; // StateSource.Teleporting
2544 sp.Scene.EventManager.TriggerOnScriptChangedEvent(sog.LocalId, (uint)Changed.TELEPORT);
2545 } 2542 }
2546
2547 } 2543 }
2544 return 2; // StateSource.PrimCrossing
2548 } 2545 }
2549 2546
2550 #endregion 2547 #endregion
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 0c99d8c..8b7871b 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -42,7 +42,8 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
42 NewRez = 1, 42 NewRez = 1,
43 PrimCrossing = 2, 43 PrimCrossing = 2,
44 ScriptedRez = 3, 44 ScriptedRez = 3,
45 AttachedRez = 4 45 AttachedRez = 4,
46 Teleporting = 5
46 } 47 }
47 48
48 public interface IScriptWorkItem 49 public interface IScriptWorkItem
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 5288cd3..9548253 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -391,19 +391,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
391 } 391 }
392 else if (m_stateSource == StateSource.RegionStart) 392 else if (m_stateSource == StateSource.RegionStart)
393 { 393 {
394// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script"); 394 //m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script");
395 PostEvent(new EventParams("changed", 395 PostEvent(new EventParams("changed",
396 new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION_RESTART) }, 396 new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION_RESTART) }, new DetectParams[0]));
397 new DetectParams[0]));
398 } 397 }
399 else if (m_stateSource == StateSource.PrimCrossing) 398 else if (m_stateSource == StateSource.PrimCrossing || m_stateSource == StateSource.Teleporting)
400 { 399 {
401 // CHANGED_REGION 400 // CHANGED_REGION
402 PostEvent(new EventParams("changed", 401 PostEvent(new EventParams("changed",
403 new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION) }, 402 new Object[] { new LSL_Types.LSLInteger((int)Changed.REGION) }, new DetectParams[0]));
404 new DetectParams[0])); 403
404 // CHANGED_TELEPORT
405 if (m_stateSource == StateSource.Teleporting)
406 PostEvent(new EventParams("changed",
407 new Object[] { new LSL_Types.LSLInteger((int)Changed.TELEPORT) }, new DetectParams[0]));
405 } 408 }
406 } 409 }
407 else 410 else
408 { 411 {
409 Start(); 412 Start();