Added data structure to be passed through event execution queue so that events can use llDetect*-commands to find information about event.

ThreadPoolClientBranch
Tedd Hansen 2008-01-17 15:22:35 +00:00
parent 18c959df12
commit 82d43db1cc
9 changed files with 85 additions and 47 deletions

View File

@ -26,6 +26,8 @@
* *
*/ */
using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
namespace OpenSim.Region.ScriptEngine.Common namespace OpenSim.Region.ScriptEngine.Common
{ {
public interface IScript public interface IScript
@ -34,5 +36,6 @@ namespace OpenSim.Region.ScriptEngine.Common
Executor Exec { get; } Executor Exec { get; }
string Source { get; set; } string Source { get; set; }
void Start(LSL_BuiltIn_Commands_Interface BuiltIn_Commands); void Start(LSL_BuiltIn_Commands_Interface BuiltIn_Commands);
EventQueueManager.Queue_llDetectParams_Struct llDetectParams { get; set; }
} }
} }

View File

@ -31,6 +31,7 @@ using System.Collections.Generic;
using System.Runtime.Remoting.Lifetime; using System.Runtime.Remoting.Lifetime;
using System.Threading; using System.Threading;
using OpenSim.Region.ScriptEngine.Common; using OpenSim.Region.ScriptEngine.Common;
using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
using integer = System.Int32; using integer = System.Int32;
using key = System.String; using key = System.String;
using vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3; using vector = OpenSim.Region.ScriptEngine.Common.LSL_Types.Vector3;
@ -64,6 +65,12 @@ namespace OpenSim.Region.ScriptEngine.Common
return lease; return lease;
} }
public EventQueueManager.Queue_llDetectParams_Struct _llDetectParams;
EventQueueManager.Queue_llDetectParams_Struct IScript.llDetectParams
{
get { return _llDetectParams; }
set { _llDetectParams = value; }
}
private Executor m_Exec; private Executor m_Exec;
@ -127,6 +134,8 @@ namespace OpenSim.Region.ScriptEngine.Common
} }
// //
// DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs // DO NOT MODIFY HERE: MODIFY IN LSL_BuiltIn_Commands.cs
// //

View File

@ -37,6 +37,7 @@ using OpenSim.Framework;
using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.ScriptEngine.Common; using OpenSim.Region.ScriptEngine.Common;
using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
//using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; //using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL;
namespace OpenSim.Region.ScriptEngine.Common namespace OpenSim.Region.ScriptEngine.Common
@ -2368,7 +2369,7 @@ namespace OpenSim.Region.ScriptEngine.Common
{ {
LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID); LLUUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID);
object[] resobj = new object[] { 1, channelID.ToString(), LLUUID.Zero.ToString(), String.Empty, 0, String.Empty }; object[] resobj = new object[] { 1, channelID.ToString(), LLUUID.Zero.ToString(), String.Empty, 0, String.Empty };
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", resobj); m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(m_localID, m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj);
} }
} }

View File

@ -76,13 +76,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public void changed(uint localID, uint change) public void changed(uint localID, uint change)
{ {
// Add to queue for all scripts in localID, Object pass change. // Add to queue for all scripts in localID, Object pass change.
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID,"changed", new object[] {(int) change}); myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "changed", EventQueueManager.llDetectNull, new object[] { (int)change });
} }
public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
{ {
// Add to queue for all scripts in ObjectID object // Add to queue for all scripts in ObjectID object
myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", new object[] {(int) 1}); myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", EventQueueManager.llDetectNull, new object[] { (int)1 });
} }
public void OnRezScript(uint localID, LLUUID itemID, string script) public void OnRezScript(uint localID, LLUUID itemID, string script)
@ -109,47 +109,47 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public void state_exit(uint localID, LLUUID itemID) public void state_exit(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_exit"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_exit", EventQueueManager.llDetectNull);
} }
public void touch(uint localID, LLUUID itemID) public void touch(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch", EventQueueManager.llDetectNull);
} }
public void touch_end(uint localID, LLUUID itemID) public void touch_end(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "touch_end", EventQueueManager.llDetectNull);
} }
public void collision_start(uint localID, LLUUID itemID) public void collision_start(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_start"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_start", EventQueueManager.llDetectNull);
} }
public void collision(uint localID, LLUUID itemID) public void collision(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision", EventQueueManager.llDetectNull);
} }
public void collision_end(uint localID, LLUUID itemID) public void collision_end(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_end"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "collision_end", EventQueueManager.llDetectNull);
} }
public void land_collision_start(uint localID, LLUUID itemID) public void land_collision_start(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_start", EventQueueManager.llDetectNull);
} }
public void land_collision(uint localID, LLUUID itemID) public void land_collision(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision", EventQueueManager.llDetectNull);
} }
public void land_collision_end(uint localID, LLUUID itemID) public void land_collision_end(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "land_collision_end", EventQueueManager.llDetectNull);
} }
// Handled by long commands // Handled by long commands
@ -160,108 +160,108 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public void listen(uint localID, LLUUID itemID) public void listen(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "listen", EventQueueManager.llDetectNull);
} }
public void on_rez(uint localID, LLUUID itemID) public void on_rez(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "on_rez", EventQueueManager.llDetectNull);
} }
public void sensor(uint localID, LLUUID itemID) public void sensor(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "sensor", EventQueueManager.llDetectNull);
} }
public void no_sensor(uint localID, LLUUID itemID) public void no_sensor(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "no_sensor", EventQueueManager.llDetectNull);
} }
public void control(uint localID, LLUUID itemID) public void control(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "control", EventQueueManager.llDetectNull);
} }
public void money(uint localID, LLUUID itemID) public void money(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "money"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "money", EventQueueManager.llDetectNull);
} }
public void email(uint localID, LLUUID itemID) public void email(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "email", EventQueueManager.llDetectNull);
} }
public void at_target(uint localID, LLUUID itemID) public void at_target(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_target"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_target", EventQueueManager.llDetectNull);
} }
public void not_at_target(uint localID, LLUUID itemID) public void not_at_target(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_target"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_target", EventQueueManager.llDetectNull);
} }
public void at_rot_target(uint localID, LLUUID itemID) public void at_rot_target(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "at_rot_target", EventQueueManager.llDetectNull);
} }
public void not_at_rot_target(uint localID, LLUUID itemID) public void not_at_rot_target(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "not_at_rot_target", EventQueueManager.llDetectNull);
} }
public void run_time_permissions(uint localID, LLUUID itemID) public void run_time_permissions(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "run_time_permissions", EventQueueManager.llDetectNull);
} }
public void changed(uint localID, LLUUID itemID) public void changed(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "changed", EventQueueManager.llDetectNull);
} }
public void attach(uint localID, LLUUID itemID) public void attach(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "attach", EventQueueManager.llDetectNull);
} }
public void dataserver(uint localID, LLUUID itemID) public void dataserver(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "dataserver", EventQueueManager.llDetectNull);
} }
public void link_message(uint localID, LLUUID itemID) public void link_message(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "link_message", EventQueueManager.llDetectNull);
} }
public void moving_start(uint localID, LLUUID itemID) public void moving_start(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_start", EventQueueManager.llDetectNull);
} }
public void moving_end(uint localID, LLUUID itemID) public void moving_end(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "moving_end", EventQueueManager.llDetectNull);
} }
public void object_rez(uint localID, LLUUID itemID) public void object_rez(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "object_rez", EventQueueManager.llDetectNull);
} }
public void remote_data(uint localID, LLUUID itemID) public void remote_data(uint localID, LLUUID itemID)
{ {
myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data"); myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "remote_data", EventQueueManager.llDetectNull);
} }
// Handled by long commands // Handled by long commands
public void http_response(uint localID, LLUUID itemID) public void http_response(uint localID, LLUUID itemID)
{ {
// myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response"); // myScriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "http_response", EventQueueManager.llDetectNull);
} }
} }
} }

View File

@ -96,9 +96,30 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
public uint localID; public uint localID;
public LLUUID itemID; public LLUUID itemID;
public string functionName; public string functionName;
public Queue_llDetectParams_Struct llDetectParams;
public object[] param; public object[] param;
} }
/// <summary>
/// Shared empty llDetectNull
/// </summary>
public readonly static Queue_llDetectParams_Struct llDetectNull = new Queue_llDetectParams_Struct();
/// <summary>
/// Structure to hold data for llDetect* commands
/// </summary>
public struct Queue_llDetectParams_Struct
{
// More or less just a placeholder for the actual moving of additional data
// should be fixed to something better :)
public LSL_Types.key[] _key;
public LSL_Types.Quaternion[] _Quaternion;
public LSL_Types.Vector3[] _Vector3;
public bool[] _bool;
public int[] _int;
public string [] _string;
}
/// <summary> /// <summary>
/// List of localID locks for mutex processing of script events /// List of localID locks for mutex processing of script events
/// </summary> /// </summary>
@ -211,7 +232,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
+ ", QIS.functionName: " + QIS.functionName); + ", QIS.functionName: " + QIS.functionName);
#endif #endif
m_ScriptEngine.m_ScriptManager.ExecuteEvent(QIS.localID, QIS.itemID, m_ScriptEngine.m_ScriptManager.ExecuteEvent(QIS.localID, QIS.itemID,
QIS.functionName, QIS.param); QIS.functionName, QIS.llDetectParams, QIS.param);
} }
catch (Exception e) catch (Exception e)
{ {
@ -311,10 +332,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
/// <summary> /// <summary>
/// Add event to event execution queue /// Add event to event execution queue
/// </summary> /// </summary>
/// <param name="localID"></param> /// <param name="localID">Region object ID</param>
/// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param> /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param>
/// <param name="param">Array of parameters to match event mask</param> /// <param name="param">Array of parameters to match event mask</param>
public void AddToObjectQueue(uint localID, string FunctionName, params object[] param) public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
{ {
// Determine all scripts in Object and add to their queue // Determine all scripts in Object and add to their queue
//myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName);
@ -334,18 +355,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
{ {
// Add to each script in that object // Add to each script in that object
// TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter? // TODO: Some scripts may not subscribe to this event. Should we NOT add it? Does it matter?
AddToScriptQueue(localID, itemID, FunctionName, param); AddToScriptQueue(localID, itemID, FunctionName, qParams, param);
} }
} }
/// <summary> /// <summary>
/// Add event to event execution queue /// Add event to event execution queue
/// </summary> /// </summary>
/// <param name="localID"></param> /// <param name="localID">Region object ID</param>
/// <param name="itemID"></param> /// <param name="itemID">Region script ID</param>
/// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param> /// <param name="FunctionName">Name of the function, will be state + "_event_" + FunctionName</param>
/// <param name="param">Array of parameters to match event mask</param> /// <param name="param">Array of parameters to match event mask</param>
public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, params object[] param) public void AddToScriptQueue(uint localID, LLUUID itemID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param)
{ {
lock (queueLock) lock (queueLock)
{ {
@ -354,6 +375,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
QIS.localID = localID; QIS.localID = localID;
QIS.itemID = itemID; QIS.itemID = itemID;
QIS.functionName = FunctionName; QIS.functionName = FunctionName;
QIS.llDetectParams = qParams;
QIS.param = param; QIS.param = param;
// Add it to queue // Add it to queue

View File

@ -185,7 +185,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
if (ts.next.ToUniversalTime() < DateTime.Now.ToUniversalTime()) if (ts.next.ToUniversalTime() < DateTime.Now.ToUniversalTime())
{ {
// Add it to queue // Add it to queue
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull,
new object[] {}); new object[] {});
// set next interval // set next interval
@ -230,7 +230,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}; };
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
httpInfo.localID, httpInfo.itemID, "http_response", resobj httpInfo.localID, httpInfo.itemID, "http_response", EventQueueManager.llDetectNull, resobj
); );
httpInfo.Stop(); httpInfo.Stop();
@ -264,7 +264,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
rInfo.GetStrVal() rInfo.GetStrVal()
}; };
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", resobj rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", EventQueueManager.llDetectNull, resobj
); );
} }
} }
@ -287,7 +287,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}; };
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
lInfo.GetLocalID(), lInfo.GetItemID(), "listen", resobj lInfo.GetLocalID(), lInfo.GetItemID(), "listen", EventQueueManager.llDetectNull, resobj
); );
} }
} }

View File

@ -232,7 +232,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
/// <param name="itemID">Script ID</param> /// <param name="itemID">Script ID</param>
/// <param name="FunctionName">Name of function</param> /// <param name="FunctionName">Name of function</param>
/// <param name="args">Arguments to pass to function</param> /// <param name="args">Arguments to pass to function</param>
internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, object[] args) internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, EventQueueManager.Queue_llDetectParams_Struct qParams, object[] args)
{ {
#if DEBUG #if DEBUG
Console.WriteLine("ScriptEngine: Inside ExecuteEvent for event " + FunctionName); Console.WriteLine("ScriptEngine: Inside ExecuteEvent for event " + FunctionName);
@ -247,6 +247,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
Console.WriteLine("ScriptEngine: Executing event: " + FunctionName); Console.WriteLine("ScriptEngine: Executing event: " + FunctionName);
#endif #endif
// Must be done in correct AppDomain, so leaving it up to the script itself // Must be done in correct AppDomain, so leaving it up to the script itself
Script.llDetectParams = qParams;
Script.Exec.ExecuteEvent(FunctionName, args); Script.Exec.ExecuteEvent(FunctionName, args);
} }

View File

@ -36,6 +36,7 @@ using libsecondlife;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.ScriptEngine.Common; using OpenSim.Region.ScriptEngine.Common;
using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL; using OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL;
namespace OpenSim.Region.ScriptEngine.DotNetEngine namespace OpenSim.Region.ScriptEngine.DotNetEngine
@ -99,7 +100,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
CompiledScript.Start(LSLB); CompiledScript.Start(LSLB);
// Fire the first start-event // Fire the first start-event
m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", new object[] { }); m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
} }
catch (Exception e) catch (Exception e)
{ {

View File

@ -36,6 +36,7 @@ using libsecondlife;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Scenes;
using OpenSim.Region.ScriptEngine.Common; using OpenSim.Region.ScriptEngine.Common;
using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase;
namespace OpenSim.Region.ScriptEngine.LSOEngine namespace OpenSim.Region.ScriptEngine.LSOEngine
{ {
@ -96,7 +97,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine
CompiledScript.Start(LSLB); CompiledScript.Start(LSLB);
// Fire the first start-event // Fire the first start-event
m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", new object[] { }); m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", EventQueueManager.llDetectNull, new object[] { });
} }
catch (Exception e) catch (Exception e)
{ {