aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs38
1 files changed, 36 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index f47e57d..5317cf1 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -935,7 +935,24 @@ namespace OpenSim.Region.ScriptEngine.XEngine
935 935
936 public bool PostScriptEvent(UUID itemID, string name, Object[] p) 936 public bool PostScriptEvent(UUID itemID, string name, Object[] p)
937 { 937 {
938 return PostScriptEvent(itemID, new EventParams(name, p, new DetectParams[0])); 938 Object[] lsl_p = new Object[p.Length];
939 for (int i = 0; i < p.Length ; i++)
940 {
941 if (p[i] is int)
942 lsl_p[i] = new LSL_Types.LSLInteger((int)p[i]);
943 else if (p[i] is string)
944 lsl_p[i] = new LSL_Types.LSLString((string)p[i]);
945 else if (p[i] is Vector3)
946 lsl_p[i] = new LSL_Types.Vector3(((Vector3)p[i]).X, ((Vector3)p[i]).Y, ((Vector3)p[i]).Z);
947 else if (p[i] is Quaternion)
948 lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W);
949 else if (p[i] is float)
950 lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]);
951 else
952 lsl_p[i] = p[i];
953 }
954
955 return PostScriptEvent(itemID, new EventParams(name, lsl_p, new DetectParams[0]));
939 } 956 }
940 957
941 public bool PostObjectEvent(UUID itemID, string name, Object[] p) 958 public bool PostObjectEvent(UUID itemID, string name, Object[] p)
@@ -944,7 +961,24 @@ namespace OpenSim.Region.ScriptEngine.XEngine
944 if (part == null) 961 if (part == null)
945 return false; 962 return false;
946 963
947 return PostObjectEvent(part.LocalId, new EventParams(name, p, new DetectParams[0])); 964 Object[] lsl_p = new Object[p.Length];
965 for (int i = 0; i < p.Length ; i++)
966 {
967 if (p[i] is int)
968 lsl_p[i] = new LSL_Types.LSLInteger((int)p[i]);
969 else if (p[i] is string)
970 lsl_p[i] = new LSL_Types.LSLString((string)p[i]);
971 else if (p[i] is Vector3)
972 lsl_p[i] = new LSL_Types.Vector3(((Vector3)p[i]).X, ((Vector3)p[i]).Y, ((Vector3)p[i]).Z);
973 else if (p[i] is Quaternion)
974 lsl_p[i] = new LSL_Types.Quaternion(((Quaternion)p[i]).X, ((Quaternion)p[i]).Y, ((Quaternion)p[i]).Z, ((Quaternion)p[i]).W);
975 else if (p[i] is float)
976 lsl_p[i] = new LSL_Types.LSLFloat((float)p[i]);
977 else
978 lsl_p[i] = p[i];
979 }
980
981 return PostObjectEvent(part.LocalId, new EventParams(name, lsl_p, new DetectParams[0]));
948 } 982 }
949 983
950 public Assembly OnAssemblyResolve(object sender, 984 public Assembly OnAssemblyResolve(object sender,