aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 42d61a7..8168300 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -89,6 +89,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
89 private long m_eventDelayTicks = 0; 89 private long m_eventDelayTicks = 0;
90 private long m_nextEventTimeTicks = 0; 90 private long m_nextEventTimeTicks = 0;
91 private bool m_startOnInit = true; 91 private bool m_startOnInit = true;
92 private UUID m_AttachedAvatar = UUID.Zero;
92 private StateSource m_stateSource; 93 private StateSource m_stateSource;
93 private bool m_postOnRez; 94 private bool m_postOnRez;
94 private bool m_startedFromSavedState = false; 95 private bool m_startedFromSavedState = false;
@@ -232,6 +233,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
232 m_MaxScriptQueue = maxScriptQueue; 233 m_MaxScriptQueue = maxScriptQueue;
233 m_stateSource = stateSource; 234 m_stateSource = stateSource;
234 m_postOnRez = postOnRez; 235 m_postOnRez = postOnRez;
236 m_AttachedAvatar = part.AttachedAvatar;
235 m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID; 237 m_RegionID = part.ParentGroup.Scene.RegionInfo.RegionID;
236 238
237 if (part != null) 239 if (part != null)
@@ -379,7 +381,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
379 new Object[] {new LSL_Types.LSLInteger(m_StartParam)}, new DetectParams[0])); 381 new Object[] {new LSL_Types.LSLInteger(m_StartParam)}, new DetectParams[0]));
380 } 382 }
381 383
382 if (m_stateSource == StateSource.NewRez) 384 if (m_stateSource == StateSource.AttachedRez)
385 {
386 PostEvent(new EventParams("attach",
387 new object[] { new LSL_Types.LSLString(m_AttachedAvatar.ToString()) }, new DetectParams[0]));
388 }
389 else if (m_stateSource == StateSource.NewRez)
383 { 390 {
384// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script"); 391// m_log.Debug("[Script] Posted changed(CHANGED_REGION_RESTART) to script");
385 PostEvent(new EventParams("changed", 392 PostEvent(new EventParams("changed",
@@ -403,6 +410,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
403 new Object[] {new LSL_Types.LSLInteger(m_StartParam)}, new DetectParams[0])); 410 new Object[] {new LSL_Types.LSLInteger(m_StartParam)}, new DetectParams[0]));
404 } 411 }
405 412
413 if (m_stateSource == StateSource.AttachedRez)
414 {
415 PostEvent(new EventParams("attach",
416 new object[] { new LSL_Types.LSLString(m_AttachedAvatar.ToString()) }, new DetectParams[0]));
417 }
418
406 } 419 }
407 } 420 }
408 421