aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorlbsa712007-12-27 21:41:48 +0000
committerlbsa712007-12-27 21:41:48 +0000
commitefd90b56b761219af6425b1c7a2cdd3b6ffb4de2 (patch)
treebf5b897e1e3c13211e3e2fc61d30508b94c928c0 /OpenSim/Region/ScriptEngine
parent* removed always true if (diff)
downloadopensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.zip
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.gz
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.bz2
opensim-SC_OLD-efd90b56b761219af6425b1c7a2cdd3b6ffb4de2.tar.xz
* Optimized usings
* shortened references * Removed redundant 'this' * Normalized EOF
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_Types.cs66
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs9
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs8
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs21
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs14
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs65
12 files changed, 105 insertions, 92 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
index 6ba7018..9c595ed 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
@@ -634,4 +634,4 @@ namespace OpenSim.Region.ScriptEngine.Common
634 //OpenSim functions 634 //OpenSim functions
635 string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer); 635 string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
636 } 636 }
637} 637} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
index 3a0b8ed..232baf8 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_Types.cs
@@ -80,7 +80,7 @@ namespace OpenSim.Region.ScriptEngine.Common
80 { 80 {
81 if (!(o is Vector3)) return false; 81 if (!(o is Vector3)) return false;
82 82
83 Vector3 vector = (Vector3)o; 83 Vector3 vector = (Vector3) o;
84 84
85 return (x == vector.x && x == vector.x && z == vector.z); 85 return (x == vector.x && x == vector.x && z == vector.z);
86 } 86 }
@@ -88,11 +88,12 @@ namespace OpenSim.Region.ScriptEngine.Common
88 #endregion 88 #endregion
89 89
90 #region Vector & Vector Math 90 #region Vector & Vector Math
91
91 // Vector-Vector Math 92 // Vector-Vector Math
92 public static Vector3 operator +(Vector3 lhs, Vector3 rhs) 93 public static Vector3 operator +(Vector3 lhs, Vector3 rhs)
93 { 94 {
94 return new Vector3(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z); 95 return new Vector3(lhs.x + rhs.x, lhs.y + rhs.y, lhs.z + rhs.z);
95 } 96 }
96 97
97 public static Vector3 operator -(Vector3 lhs, Vector3 rhs) 98 public static Vector3 operator -(Vector3 lhs, Vector3 rhs)
98 { 99 {
@@ -101,51 +102,53 @@ namespace OpenSim.Region.ScriptEngine.Common
101 102
102 public static Vector3 operator *(Vector3 lhs, Vector3 rhs) 103 public static Vector3 operator *(Vector3 lhs, Vector3 rhs)
103 { 104 {
104 return new Vector3(lhs.x * rhs.x, lhs.y * rhs.y, lhs.z * rhs.z); 105 return new Vector3(lhs.x*rhs.x, lhs.y*rhs.y, lhs.z*rhs.z);
105 } 106 }
106 107
107 public static Vector3 operator %(Vector3 v1, Vector3 v2) 108 public static Vector3 operator %(Vector3 v1, Vector3 v2)
108 { 109 {
109 //Cross product 110 //Cross product
110 Vector3 tv; 111 Vector3 tv;
111 tv.x = (v1.y * v2.z) - (v1.z * v2.y); 112 tv.x = (v1.y*v2.z) - (v1.z*v2.y);
112 tv.y = (v1.z * v2.x) - (v1.x * v2.z); 113 tv.y = (v1.z*v2.x) - (v1.x*v2.z);
113 tv.z = (v1.x * v2.y) - (v1.y * v2.x); 114 tv.z = (v1.x*v2.y) - (v1.y*v2.x);
114 return tv; 115 return tv;
115 } 116 }
116 117
117 #endregion 118 #endregion
118 119
119 #region Vector & Float Math 120 #region Vector & Float Math
121
120 // Vector-Float and Float-Vector Math 122 // Vector-Float and Float-Vector Math
121 public static Vector3 operator *(Vector3 vec, float val) 123 public static Vector3 operator *(Vector3 vec, float val)
122 { 124 {
123 return new Vector3(vec.x * val, vec.y * val, vec.z * val); 125 return new Vector3(vec.x*val, vec.y*val, vec.z*val);
124 } 126 }
125 127
126 public static Vector3 operator *(float val, Vector3 vec) 128 public static Vector3 operator *(float val, Vector3 vec)
127 { 129 {
128 return new Vector3(vec.x * val, vec.y * val, vec.z * val); 130 return new Vector3(vec.x*val, vec.y*val, vec.z*val);
129 } 131 }
130 132
131 public static Vector3 operator /(Vector3 v, float f) 133 public static Vector3 operator /(Vector3 v, float f)
132 { 134 {
133 v.x = v.x / f; 135 v.x = v.x/f;
134 v.y = v.y / f; 136 v.y = v.y/f;
135 v.z = v.z / f; 137 v.z = v.z/f;
136 return v; 138 return v;
137 } 139 }
138 140
139 #endregion 141 #endregion
140 142
141 #region Vector & Rotation Math 143 #region Vector & Rotation Math
144
142 // Vector-Rotation Math 145 // Vector-Rotation Math
143 public static Vector3 operator *(Vector3 v, Quaternion r) 146 public static Vector3 operator *(Vector3 v, Quaternion r)
144 { 147 {
145 Quaternion vq = new Quaternion(v.x, v.y, v.z, 0); 148 Quaternion vq = new Quaternion(v.x, v.y, v.z, 0);
146 Quaternion nq = new Quaternion(-r.x, -r.y, -r.z, r.s); 149 Quaternion nq = new Quaternion(-r.x, -r.y, -r.z, r.s);
147 150
148 Quaternion result = (r * vq) * nq; 151 Quaternion result = (r*vq)*nq;
149 152
150 return new Vector3(result.x, result.y, result.z); 153 return new Vector3(result.x, result.y, result.z);
151 } 154 }
@@ -157,38 +160,41 @@ namespace OpenSim.Region.ScriptEngine.Common
157 Quaternion vq = new Quaternion(vec.x, vec.y, vec.z, 0); 160 Quaternion vq = new Quaternion(vec.x, vec.y, vec.z, 0);
158 Quaternion nq = new Quaternion(-quat.x, -quat.y, -quat.z, quat.s); 161 Quaternion nq = new Quaternion(-quat.x, -quat.y, -quat.z, quat.s);
159 162
160 Quaternion result = (quat * vq) * nq; 163 Quaternion result = (quat*vq)*nq;
161 164
162 return new Vector3(result.x, result.y, result.z); 165 return new Vector3(result.x, result.y, result.z);
163 } 166 }
167
164 #endregion 168 #endregion
165 169
166 #region Static Helper Functions 170 #region Static Helper Functions
171
167 public static double Dot(Vector3 v1, Vector3 v2) 172 public static double Dot(Vector3 v1, Vector3 v2)
168 { 173 {
169 return (v1.x * v2.x) + (v1.y * v2.y) + (v1.z * v2.z); 174 return (v1.x*v2.x) + (v1.y*v2.y) + (v1.z*v2.z);
170 } 175 }
171 176
172 public static Vector3 Cross(Vector3 v1, Vector3 v2) 177 public static Vector3 Cross(Vector3 v1, Vector3 v2)
173 { 178 {
174 return new Vector3 179 return new Vector3
175 ( 180 (
176 v1.y * v2.z - v1.z * v2.y, 181 v1.y*v2.z - v1.z*v2.y,
177 v1.z * v2.x - v1.x * v2.z, 182 v1.z*v2.x - v1.x*v2.z,
178 v1.x * v2.y - v1.y * v2.x 183 v1.x*v2.y - v1.y*v2.x
179 ); 184 );
180 } 185 }
181 186
182 public static float Mag(Vector3 v) 187 public static float Mag(Vector3 v)
183 { 188 {
184 return (float)Math.Sqrt(v.x * v.y + v.y * v.y + v.z * v.z); 189 return (float) Math.Sqrt(v.x*v.y + v.y*v.y + v.z*v.z);
185 } 190 }
186 191
187 public static Vector3 Norm(Vector3 vector) 192 public static Vector3 Norm(Vector3 vector)
188 { 193 {
189 float mag = Mag(vector); 194 float mag = Mag(vector);
190 return new Vector3(vector.x / mag, vector.y / mag, vector.z / mag); 195 return new Vector3(vector.x/mag, vector.y/mag, vector.z/mag);
191 } 196 }
197
192 #endregion 198 #endregion
193 } 199 }
194 200
@@ -227,7 +233,7 @@ namespace OpenSim.Region.ScriptEngine.Common
227 { 233 {
228 if (!(o is Quaternion)) return false; 234 if (!(o is Quaternion)) return false;
229 235
230 Quaternion quaternion = (Quaternion)o; 236 Quaternion quaternion = (Quaternion) o;
231 237
232 return x == quaternion.x && y == quaternion.y && z == quaternion.z && s == quaternion.s; 238 return x == quaternion.x && y == quaternion.y && z == quaternion.z && s == quaternion.s;
233 } 239 }
@@ -253,10 +259,10 @@ namespace OpenSim.Region.ScriptEngine.Common
253 public static Quaternion operator *(Quaternion a, Quaternion b) 259 public static Quaternion operator *(Quaternion a, Quaternion b)
254 { 260 {
255 Quaternion c; 261 Quaternion c;
256 c.x = a.s * b.x + a.x * b.s + a.y * b.z - a.z * b.y; 262 c.x = a.s*b.x + a.x*b.s + a.y*b.z - a.z*b.y;
257 c.y = a.s * b.y + a.y * b.s + a.z * b.x - a.x * b.z; 263 c.y = a.s*b.y + a.y*b.s + a.z*b.x - a.x*b.z;
258 c.z = a.s * b.z + a.z * b.s + a.x * b.y - a.y * b.x; 264 c.z = a.s*b.z + a.z*b.s + a.x*b.y - a.y*b.x;
259 c.s = a.s * b.s - a.x * b.x - a.y * b.y - a.z * b.z; 265 c.s = a.s*b.s - a.x*b.x - a.y*b.y - a.z*b.z;
260 return c; 266 return c;
261 } 267 }
262 } 268 }
@@ -324,7 +330,7 @@ namespace OpenSim.Region.ScriptEngine.Common
324 { 330 {
325 if (start >= m_data.Length) 331 if (start >= m_data.Length)
326 { 332 {
327 return this.GetSublist(0, end); 333 return GetSublist(0, end);
328 } 334 }
329 if (end >= m_data.Length) 335 if (end >= m_data.Length)
330 { 336 {
@@ -334,7 +340,7 @@ namespace OpenSim.Region.ScriptEngine.Common
334 //ret = new object[m_data.Length - Math.Abs(end - start + 1)]; 340 //ret = new object[m_data.Length - Math.Abs(end - start + 1)];
335 //Array.Copy(m_data, 0, ret, m_data.Length - start, end + 1); 341 //Array.Copy(m_data, 0, ret, m_data.Length - start, end + 1);
336 //Array.Copy(m_data, start, ret, 0, m_data.Length - start); 342 //Array.Copy(m_data, start, ret, 0, m_data.Length - start);
337 return this.GetSublist(0, end) + this.GetSublist(start, this.Data.Length - 1); 343 return GetSublist(0, end) + GetSublist(start, Data.Length - 1);
338 //return new list(ret); 344 //return new list(ret);
339 } 345 }
340 } 346 }
@@ -379,4 +385,4 @@ namespace OpenSim.Region.ScriptEngine.Common
379 } 385 }
380 } 386 }
381 } 387 }
382} 388} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs
index e5f7220..4594ad8 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Common.cs
@@ -52,4 +52,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
52 //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); 52 //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message);
53 } 53 }
54 } 54 }
55} 55} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
index c81e6bd..0623cc5 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
@@ -39,7 +39,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
39 private LSL2CSConverter LSL_Converter = new LSL2CSConverter(); 39 private LSL2CSConverter LSL_Converter = new LSL2CSConverter();
40 private CSharpCodeProvider codeProvider = new CSharpCodeProvider(); 40 private CSharpCodeProvider codeProvider = new CSharpCodeProvider();
41 private static UInt64 scriptCompileCounter = 0; 41 private static UInt64 scriptCompileCounter = 0;
42 private static int instanceID = new Random().Next(0, int.MaxValue); // Implemented due to peer preassure --- will cause garbage in ScriptEngines folder ;) 42
43 private static int instanceID = new Random().Next(0, int.MaxValue);
44 // Implemented due to peer preassure --- will cause garbage in ScriptEngines folder ;)
45
43 //private ICodeCompiler icc = codeProvider.CreateCompiler(); 46 //private ICodeCompiler icc = codeProvider.CreateCompiler();
44 public string CompileFromFile(string LSOFileName) 47 public string CompileFromFile(string LSOFileName)
45 { 48 {
@@ -83,7 +86,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
83 { 86 {
84 // Output assembly name 87 // Output assembly name
85 scriptCompileCounter++; 88 scriptCompileCounter++;
86 string OutFile = Path.Combine("ScriptEngines", "DotNetScript_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll"); 89 string OutFile =
90 Path.Combine("ScriptEngines",
91 "DotNetScript_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll");
87 try 92 try
88 { 93 {
89 File.Delete(OutFile); 94 File.Delete(OutFile);
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
index 4063647..8e37798 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs
@@ -316,8 +316,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
316 316
317 317
318 quotes.Clear(); 318 quotes.Clear();
319 319
320 return Return; 320 return Return;
321 } 321 }
322 } 322 }
323} 323} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
index a9297fd..2796b64 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs
@@ -1638,7 +1638,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
1638 1638
1639 public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) 1639 public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end)
1640 { 1640 {
1641 return m_LSL_Functions.llListReplaceList(dest,src,start,end); 1641 return m_LSL_Functions.llListReplaceList(dest, src, start, end);
1642 } 1642 }
1643 1643
1644 public void llLoadURL(string avatar_id, string message, string url) 1644 public void llLoadURL(string avatar_id, string message, string url)
@@ -2025,7 +2025,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
2025 public const int REMOTE_DATA_CHANNEL = 1; 2025 public const int REMOTE_DATA_CHANNEL = 1;
2026 public const int REMOTE_DATA_REQUEST = 2; 2026 public const int REMOTE_DATA_REQUEST = 2;
2027 public const int REMOTE_DATA_REPLY = 3; 2027 public const int REMOTE_DATA_REPLY = 3;
2028 2028
2029 public const int PRIM_MATERIAL = 2; 2029 public const int PRIM_MATERIAL = 2;
2030 public const int PRIM_PHYSICS = 3; 2030 public const int PRIM_PHYSICS = 3;
2031 public const int PRIM_TEMP_ON_REZ = 4; 2031 public const int PRIM_TEMP_ON_REZ = 4;
@@ -2041,7 +2041,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
2041 public const int PRIM_FLEXIBLE = 21; 2041 public const int PRIM_FLEXIBLE = 21;
2042 public const int PRIM_TEXGEN = 22; 2042 public const int PRIM_TEXGEN = 22;
2043 public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake 2043 public const int PRIM_CAST_SHADOWS = 24; // Not implemented, here for completeness sake
2044 public const int PRIM_POINT_LIGHT = 23; // Huh? 2044 public const int PRIM_POINT_LIGHT = 23; // Huh?
2045 public const int PRIM_TEXGEN_DEFAULT = 0; 2045 public const int PRIM_TEXGEN_DEFAULT = 0;
2046 public const int PRIM_TEXGEN_PLANAR = 1; 2046 public const int PRIM_TEXGEN_PLANAR = 1;
2047 public const int PRIM_TYPE_BOX = 0; 2047 public const int PRIM_TYPE_BOX = 0;
@@ -2122,4 +2122,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
2122 public vector ZERO_VECTOR = new vector(0, 0, 0); 2122 public vector ZERO_VECTOR = new vector(0, 0, 0);
2123 public rotation ZERO_ROTATION = new rotation(0, 0, 0, 0); 2123 public rotation ZERO_ROTATION = new rotation(0, 0, 0, 0);
2124 } 2124 }
2125} 2125} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index bc47241..d5a31fb 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -28,13 +28,11 @@
28 28
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Collections;
32using System.Runtime.Remoting.Lifetime; 31using System.Runtime.Remoting.Lifetime;
33using System.Text; 32using System.Text;
34using System.Threading; 33using System.Threading;
35using Axiom.Math; 34using Axiom.Math;
36using libsecondlife; 35using libsecondlife;
37using libsecondlife.StructuredData;
38using OpenSim.Framework; 36using OpenSim.Framework;
39using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
40using OpenSim.Region.Environment.Scenes; 38using OpenSim.Region.Environment.Scenes;
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
index 161cedf..8dfd908 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventManager.cs
@@ -217,4 +217,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
217 { 217 {
218 } 218 }
219 } 219 }
220} 220} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
index 890335b..2d0d69d 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs
@@ -184,9 +184,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
184 { 184 {
185#if DEBUG 185#if DEBUG
186 m_ScriptEngine.Log.Debug("ScriptEngine", "Executing event:\r\n" 186 m_ScriptEngine.Log.Debug("ScriptEngine", "Executing event:\r\n"
187 + "QIS.localID: " + QIS.localID 187 + "QIS.localID: " + QIS.localID
188 + ", QIS.itemID: " + QIS.itemID 188 + ", QIS.itemID: " + QIS.itemID
189 + ", QIS.functionName: " + QIS.functionName); 189 + ", QIS.functionName: " + QIS.functionName);
190#endif 190#endif
191 m_ScriptEngine.m_ScriptManager.ExecuteEvent(QIS.localID, QIS.itemID, 191 m_ScriptEngine.m_ScriptManager.ExecuteEvent(QIS.localID, QIS.itemID,
192 QIS.functionName, QIS.param); 192 QIS.functionName, QIS.param);
@@ -197,14 +197,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
197 string text = "Error executing script function \"" + QIS.functionName + "\":\r\n"; 197 string text = "Error executing script function \"" + QIS.functionName + "\":\r\n";
198 //if (e.InnerException != null) 198 //if (e.InnerException != null)
199 //{ 199 //{
200 // Send inner exception 200 // Send inner exception
201 text += e.InnerException.Message.ToString(); 201 text += e.InnerException.Message.ToString();
202 //} 202 //}
203 //else 203 //else
204 //{ 204 //{
205 text += "\r\n"; 205 text += "\r\n";
206 // Send normal 206 // Send normal
207 text += e.Message.ToString(); 207 text += e.Message.ToString();
208 //} 208 //}
209 try 209 try
210 { 210 {
@@ -222,7 +222,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
222 //else 222 //else
223 //{ 223 //{
224 // T oconsole 224 // T oconsole
225 m_ScriptEngine.Log.Error("ScriptEngine", "Unable to send text in-world:\r\n" + text); 225 m_ScriptEngine.Log.Error("ScriptEngine",
226 "Unable to send text in-world:\r\n" + text);
226 } 227 }
227 } 228 }
228 finally 229 finally
@@ -338,4 +339,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
338 } 339 }
339 } 340 }
340 } 341 }
341} 342} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs
index fdd7260..e403385 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/LSLLongCmdHandler.cs
@@ -202,17 +202,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
202 202
203 public void CheckHttpRequests() 203 public void CheckHttpRequests()
204 { 204 {
205 IHttpRequests iHttpReq = 205 IHttpRequests iHttpReq =
206 m_ScriptEngine.World.RequestModuleInterface<IHttpRequests>(); 206 m_ScriptEngine.World.RequestModuleInterface<IHttpRequests>();
207 207
208 HttpRequestClass httpInfo = null; 208 HttpRequestClass httpInfo = null;
209 209
210 if( iHttpReq != null ) 210 if (iHttpReq != null)
211 httpInfo = iHttpReq.GetNextCompletedRequest(); 211 httpInfo = iHttpReq.GetNextCompletedRequest();
212 212
213 while ( httpInfo != null ) 213 while (httpInfo != null)
214 { 214 {
215
216 //Console.WriteLine("PICKED HTTP REQ:" + httpInfo.response_body + httpInfo.status); 215 //Console.WriteLine("PICKED HTTP REQ:" + httpInfo.response_body + httpInfo.status);
217 216
218 // Deliver data to prim's remote_data handler 217 // Deliver data to prim's remote_data handler
@@ -221,7 +220,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
221 // only returns the byte for HTTP_BODY_TRUNCATED, which is not 220 // only returns the byte for HTTP_BODY_TRUNCATED, which is not
222 // implemented here yet anyway. Should be fixed if/when maxsize 221 // implemented here yet anyway. Should be fixed if/when maxsize
223 // is supported 222 // is supported
224 223
225 object[] resobj = new object[] 224 object[] resobj = new object[]
226 { 225 {
227 httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body 226 httpInfo.reqID.ToString(), httpInfo.status, null, httpInfo.response_body
@@ -254,7 +253,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
254 //Deliver data to prim's remote_data handler 253 //Deliver data to prim's remote_data handler
255 object[] resobj = new object[] 254 object[] resobj = new object[]
256 { 255 {
257 2, rInfo.GetChannelKey().ToString(), rInfo.GetMessageID().ToString(), "", rInfo.GetIntValue(), 256 2, rInfo.GetChannelKey().ToString(), rInfo.GetMessageID().ToString(), "",
257 rInfo.GetIntValue(),
258 rInfo.GetStrVal() 258 rInfo.GetStrVal()
259 }; 259 };
260 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue( 260 m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
@@ -284,4 +284,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
284 } 284 }
285 } 285 }
286 } 286 }
287} 287} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
index c1c792c..82049f7 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs
@@ -121,4 +121,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
121 121
122 #endregion 122 #endregion
123 } 123 }
124} 124} \ No newline at end of file
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
index 6b83dff..e211902 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs
@@ -224,7 +224,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
224 224
225 #region Start/Stop/Reset script 225 #region Start/Stop/Reset script
226 226
227 Object startStopLock = new Object(); 227 private Object startStopLock = new Object();
228 228
229 /// <summary> 229 /// <summary>
230 /// Fetches, loads and hooks up a script to an objects events 230 /// Fetches, loads and hooks up a script to an objects events
@@ -261,7 +261,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
261 } 261 }
262 262
263 // Create a new instance of the compiler (reuse) 263 // Create a new instance of the compiler (reuse)
264 Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler(); 264 private Compiler.LSL.Compiler LSLCompiler = new Compiler.LSL.Compiler();
265
265 private void _StartScript(uint localID, LLUUID itemID, string Script) 266 private void _StartScript(uint localID, LLUUID itemID, string Script)
266 { 267 {
267 lock (startStopLock) 268 lock (startStopLock)
@@ -316,7 +317,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
316 CompiledScript.Start(LSLB); 317 CompiledScript.Start(LSLB);
317 318
318 // Fire the first start-event 319 // Fire the first start-event
319 m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", new object[] { }); 320 m_scriptEngine.m_EventQueueManager.AddToScriptQueue(localID, itemID, "state_entry", new object[] {});
320 } 321 }
321 catch (Exception e) 322 catch (Exception e)
322 { 323 {
@@ -327,12 +328,14 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
327 string text = "Error compiling script:\r\n" + e.Message.ToString(); 328 string text = "Error compiling script:\r\n" + e.Message.ToString();
328 if (text.Length > 1500) 329 if (text.Length > 1500)
329 text = text.Substring(0, 1500); 330 text = text.Substring(0, 1500);
330 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.Say, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID); 331 World.SimChat(Helpers.StringToField(text), ChatTypeEnum.Say, 0, m_host.AbsolutePosition,
332 m_host.Name, m_host.UUID);
331 } 333 }
332 catch (Exception e2) 334 catch (Exception e2)
333 { 335 {
334 m_scriptEngine.Log.Error("ScriptEngine", "Error displaying error in-world: " + e2.ToString()); 336 m_scriptEngine.Log.Error("ScriptEngine", "Error displaying error in-world: " + e2.ToString());
335 m_scriptEngine.Log.Error("ScriptEngine", "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); 337 m_scriptEngine.Log.Error("ScriptEngine",
338 "Errormessage: Error compiling script:\r\n" + e.Message.ToString());
336 } 339 }
337 } 340 }
338 } 341 }
@@ -342,39 +345,39 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
342 { 345 {
343 lock (startStopLock) 346 lock (startStopLock)
344 { 347 {
345 // Stop script 348 // Stop script
346 Console.WriteLine("Stop script localID: " + localID + " LLUID: " + itemID.ToString()); 349 Console.WriteLine("Stop script localID: " + localID + " LLUID: " + itemID.ToString());
347 350
348 351
349 // Stop long command on script 352 // Stop long command on script
350 m_scriptEngine.m_LSLLongCmdHandler.RemoveScript(localID, itemID); 353 m_scriptEngine.m_LSLLongCmdHandler.RemoveScript(localID, itemID);
351 354
352 LSL_BaseClass LSLBC = GetScript(localID, itemID); 355 LSL_BaseClass LSLBC = GetScript(localID, itemID);
353 if (LSLBC == null) 356 if (LSLBC == null)
354 return; 357 return;
355 358
356 // TEMP: First serialize it 359 // TEMP: First serialize it
357 //GetSerializedScript(localID, itemID); 360 //GetSerializedScript(localID, itemID);
358 361
359 362
360 try 363 try
361 { 364 {
362 // Get AppDomain 365 // Get AppDomain
363 AppDomain ad = LSLBC.Exec.GetAppDomain(); 366 AppDomain ad = LSLBC.Exec.GetAppDomain();
364 // Tell script not to accept new requests 367 // Tell script not to accept new requests
365 GetScript(localID, itemID).Exec.StopScript(); 368 GetScript(localID, itemID).Exec.StopScript();
366 // Remove from internal structure 369 // Remove from internal structure
367 RemoveScript(localID, itemID); 370 RemoveScript(localID, itemID);
368 // Tell AppDomain that we have stopped script 371 // Tell AppDomain that we have stopped script
369 m_scriptEngine.m_AppDomainManager.StopScript(ad); 372 m_scriptEngine.m_AppDomainManager.StopScript(ad);
370 } 373 }
371 catch (Exception e) 374 catch (Exception e)
372 { 375 {
373 Console.WriteLine("Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + 376 Console.WriteLine("Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() +
374 ": " + e.ToString()); 377 ": " + e.ToString());
378 }
375 } 379 }
376 } 380 }
377 }
378 381
379 private string ProcessYield(string FileName) 382 private string ProcessYield(string FileName)
380 { 383 {
@@ -435,4 +438,4 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
435 438
436 #endregion 439 #endregion
437 } 440 }
438} 441} \ No newline at end of file