aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorMelanie Thielker2008-09-23 11:41:34 +0000
committerMelanie Thielker2008-09-23 11:41:34 +0000
commit44e566260c9da5ff62c448cfdd67063c7a486126 (patch)
tree64b9c963872c986317132adc5d4fe0978ad25b64 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentSmall fix to eliminate a beauty spot (diff)
downloadopensim-SC-44e566260c9da5ff62c448cfdd67063c7a486126.zip
opensim-SC-44e566260c9da5ff62c448cfdd67063c7a486126.tar.gz
opensim-SC-44e566260c9da5ff62c448cfdd67063c7a486126.tar.bz2
opensim-SC-44e566260c9da5ff62c448cfdd67063c7a486126.tar.xz
Mantis #2243
Thank you, tyre, for a patch that refactors LSL to use a unified set of method signatures and type names, reorders methods and removes unused and adds new method stubs.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs1035
1 files changed, 551 insertions, 484 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 110ece4..512fcd9 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -50,6 +50,14 @@ using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
50using OpenSim.Region.ScriptEngine.Interfaces; 50using OpenSim.Region.ScriptEngine.Interfaces;
51using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces; 51using OpenSim.Region.ScriptEngine.Shared.Api.Interfaces;
52 52
53using LSL_Float = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLFloat;
54using LSL_Integer = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLInteger;
55using LSL_Key = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
56using LSL_List = OpenSim.Region.ScriptEngine.Shared.LSL_Types.list;
57using LSL_Rotation = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Quaternion;
58using LSL_String = OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString;
59using LSL_Vector = OpenSim.Region.ScriptEngine.Shared.LSL_Types.Vector3;
60
53namespace OpenSim.Region.ScriptEngine.Shared.Api 61namespace OpenSim.Region.ScriptEngine.Shared.Api
54{ 62{
55 /// <summary> 63 /// <summary>
@@ -87,6 +95,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
87 AsyncCommands = (AsyncCommandManager)ScriptEngine.AsyncCommands; 95 AsyncCommands = (AsyncCommandManager)ScriptEngine.AsyncCommands;
88 } 96 }
89 97
98 private DateTime m_timer = DateTime.Now;
99 private bool m_waitingForScriptAnswer=false;
90 protected void ScriptSleep(int delay) 100 protected void ScriptSleep(int delay)
91 { 101 {
92 delay = (int)((float)delay * m_ScriptDelayFactor); 102 delay = (int)((float)delay * m_ScriptDelayFactor);
@@ -95,8 +105,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
95 System.Threading.Thread.Sleep(delay); 105 System.Threading.Thread.Sleep(delay);
96 } 106 }
97 107
98 private DateTime m_timer = DateTime.Now;
99 private bool m_waitingForScriptAnswer=false;
100 108
101 109
102 // Object never expires 110 // Object never expires
@@ -252,55 +260,55 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
252 } 260 }
253 261
254 //These are the implementations of the various ll-functions used by the LSL scripts. 262 //These are the implementations of the various ll-functions used by the LSL scripts.
255 public LSL_Types.LSLFloat llSin(double f) 263 public LSL_Float llSin(double f)
256 { 264 {
257 m_host.AddScriptLPS(1); 265 m_host.AddScriptLPS(1);
258 return (double)Math.Sin(f); 266 return (double)Math.Sin(f);
259 } 267 }
260 268
261 public LSL_Types.LSLFloat llCos(double f) 269 public LSL_Float llCos(double f)
262 { 270 {
263 m_host.AddScriptLPS(1); 271 m_host.AddScriptLPS(1);
264 return (double)Math.Cos(f); 272 return (double)Math.Cos(f);
265 } 273 }
266 274
267 public LSL_Types.LSLFloat llTan(double f) 275 public LSL_Float llTan(double f)
268 { 276 {
269 m_host.AddScriptLPS(1); 277 m_host.AddScriptLPS(1);
270 return (double)Math.Tan(f); 278 return (double)Math.Tan(f);
271 } 279 }
272 280
273 public LSL_Types.LSLFloat llAtan2(double x, double y) 281 public LSL_Float llAtan2(double x, double y)
274 { 282 {
275 m_host.AddScriptLPS(1); 283 m_host.AddScriptLPS(1);
276 return (double)Math.Atan2(y, x); 284 return (double)Math.Atan2(y, x);
277 } 285 }
278 286
279 public LSL_Types.LSLFloat llSqrt(double f) 287 public LSL_Float llSqrt(double f)
280 { 288 {
281 m_host.AddScriptLPS(1); 289 m_host.AddScriptLPS(1);
282 return (double)Math.Sqrt(f); 290 return (double)Math.Sqrt(f);
283 } 291 }
284 292
285 public LSL_Types.LSLFloat llPow(double fbase, double fexponent) 293 public LSL_Float llPow(double fbase, double fexponent)
286 { 294 {
287 m_host.AddScriptLPS(1); 295 m_host.AddScriptLPS(1);
288 return (double)Math.Pow(fbase, fexponent); 296 return (double)Math.Pow(fbase, fexponent);
289 } 297 }
290 298
291 public LSL_Types.LSLInteger llAbs(int i) 299 public LSL_Integer llAbs(int i)
292 { 300 {
293 m_host.AddScriptLPS(1); 301 m_host.AddScriptLPS(1);
294 return (int)Math.Abs(i); 302 return (int)Math.Abs(i);
295 } 303 }
296 304
297 public LSL_Types.LSLFloat llFabs(double f) 305 public LSL_Float llFabs(double f)
298 { 306 {
299 m_host.AddScriptLPS(1); 307 m_host.AddScriptLPS(1);
300 return (double)Math.Abs(f); 308 return (double)Math.Abs(f);
301 } 309 }
302 310
303 public LSL_Types.LSLFloat llFrand(double mag) 311 public LSL_Float llFrand(double mag)
304 { 312 {
305 m_host.AddScriptLPS(1); 313 m_host.AddScriptLPS(1);
306 lock (Util.RandomClass) 314 lock (Util.RandomClass)
@@ -309,44 +317,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
309 } 317 }
310 } 318 }
311 319
312 public LSL_Types.LSLInteger llFloor(double f) 320 public LSL_Integer llFloor(double f)
313 { 321 {
314 m_host.AddScriptLPS(1); 322 m_host.AddScriptLPS(1);
315 return (int)Math.Floor(f); 323 return (int)Math.Floor(f);
316 } 324 }
317 325
318 public LSL_Types.LSLInteger llCeil(double f) 326 public LSL_Integer llCeil(double f)
319 { 327 {
320 m_host.AddScriptLPS(1); 328 m_host.AddScriptLPS(1);
321 return (int)Math.Ceiling(f); 329 return (int)Math.Ceiling(f);
322 } 330 }
323 331
324 // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven) 332 // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven)
325 public LSL_Types.LSLInteger llRound(double f) 333 public LSL_Integer llRound(double f)
326 { 334 {
327 m_host.AddScriptLPS(1); 335 m_host.AddScriptLPS(1);
328 return (int)Math.Round(f, MidpointRounding.AwayFromZero); 336 return (int)Math.Round(f, MidpointRounding.AwayFromZero);
329 } 337 }
330 338
331 //This next group are vector operations involving squaring and square root. ckrinke 339 //This next group are vector operations involving squaring and square root. ckrinke
332 public LSL_Types.LSLFloat llVecMag(LSL_Types.Vector3 v) 340 public LSL_Float llVecMag(LSL_Vector v)
333 { 341 {
334 m_host.AddScriptLPS(1); 342 m_host.AddScriptLPS(1);
335 return LSL_Types.Vector3.Mag(v); 343 return LSL_Vector.Mag(v);
336 } 344 }
337 345
338 public LSL_Types.Vector3 llVecNorm(LSL_Types.Vector3 v) 346 public LSL_Vector llVecNorm(LSL_Vector v)
339 { 347 {
340 m_host.AddScriptLPS(1); 348 m_host.AddScriptLPS(1);
341 double mag = LSL_Types.Vector3.Mag(v); 349 double mag = LSL_Vector.Mag(v);
342 LSL_Types.Vector3 nor = new LSL_Types.Vector3(); 350 LSL_Vector nor = new LSL_Vector();
343 nor.x = v.x / mag; 351 nor.x = v.x / mag;
344 nor.y = v.y / mag; 352 nor.y = v.y / mag;
345 nor.z = v.z / mag; 353 nor.z = v.z / mag;
346 return nor; 354 return nor;
347 } 355 }
348 356
349 public LSL_Types.LSLFloat llVecDist(LSL_Types.Vector3 a, LSL_Types.Vector3 b) 357 public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b)
350 { 358 {
351 m_host.AddScriptLPS(1); 359 m_host.AddScriptLPS(1);
352 double dx = a.x - b.x; 360 double dx = a.x - b.x;
@@ -369,23 +377,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
369 377
370 // Old implementation of llRot2Euler, now normalized 378 // Old implementation of llRot2Euler, now normalized
371 379
372 public LSL_Types.Vector3 llRot2Euler(LSL_Types.Quaternion r) 380 public LSL_Vector llRot2Euler(LSL_Rotation r)
373 { 381 {
374 m_host.AddScriptLPS(1); 382 m_host.AddScriptLPS(1);
375 //This implementation is from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions. ckrinke 383 //This implementation is from http://lslwiki.net/lslwiki/wakka.php?wakka=LibraryRotationFunctions. ckrinke
376 LSL_Types.Quaternion t = new LSL_Types.Quaternion(r.x * r.x, r.y * r.y, r.z * r.z, r.s * r.s); 384 LSL_Rotation t = new LSL_Rotation(r.x * r.x, r.y * r.y, r.z * r.z, r.s * r.s);
377 double m = (t.x + t.y + t.z + t.s); 385 double m = (t.x + t.y + t.z + t.s);
378 if (m == 0) return new LSL_Types.Vector3(); 386 if (m == 0) return new LSL_Vector();
379 double n = 2 * (r.y * r.s + r.x * r.z); 387 double n = 2 * (r.y * r.s + r.x * r.z);
380 double p = m * m - n * n; 388 double p = m * m - n * n;
381 if (p > 0) 389 if (p > 0)
382 return new LSL_Types.Vector3(NormalizeAngle(Math.Atan2(2.0 * (r.x * r.s - r.y * r.z), (-t.x - t.y + t.z + t.s))), 390 return new LSL_Vector(NormalizeAngle(Math.Atan2(2.0 * (r.x * r.s - r.y * r.z), (-t.x - t.y + t.z + t.s))),
383 NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))), 391 NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))),
384 NormalizeAngle(Math.Atan2(2.0 * (r.z * r.s - r.x * r.y), (t.x - t.y - t.z + t.s)))); 392 NormalizeAngle(Math.Atan2(2.0 * (r.z * r.s - r.x * r.y), (t.x - t.y - t.z + t.s))));
385 else if (n > 0) 393 else if (n > 0)
386 return new LSL_Types.Vector3(0.0, Math.PI / 2, NormalizeAngle(Math.Atan2((r.z * r.s + r.x * r.y), 0.5 - t.x - t.z))); 394 return new LSL_Vector(0.0, Math.PI / 2, NormalizeAngle(Math.Atan2((r.z * r.s + r.x * r.y), 0.5 - t.x - t.z)));
387 else 395 else
388 return new LSL_Types.Vector3(0.0, -Math.PI / 2, NormalizeAngle(Math.Atan2((r.z * r.s + r.x * r.y), 0.5 - t.x - t.z))); 396 return new LSL_Vector(0.0, -Math.PI / 2, NormalizeAngle(Math.Atan2((r.z * r.s + r.x * r.y), 0.5 - t.x - t.z)));
389 } 397 }
390 398
391 /* From wiki: 399 /* From wiki:
@@ -433,7 +441,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
433 * Apparently in some cases this is better from a numerical precision perspective? 441 * Apparently in some cases this is better from a numerical precision perspective?
434 */ 442 */
435 443
436 public LSL_Types.Quaternion llEuler2Rot(LSL_Types.Vector3 v) 444 public LSL_Rotation llEuler2Rot(LSL_Vector v)
437 { 445 {
438 m_host.AddScriptLPS(1); 446 m_host.AddScriptLPS(1);
439 447
@@ -451,10 +459,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
451 z = s1*s2*c3+c1*c2*s3; 459 z = s1*s2*c3+c1*c2*s3;
452 s = c1*c2*c3-s1*s2*s3; 460 s = c1*c2*c3-s1*s2*s3;
453 461
454 return new LSL_Types.Quaternion(x, y, z, s); 462 return new LSL_Rotation(x, y, z, s);
455 } 463 }
456 464
457 public LSL_Types.Quaternion llAxes2Rot(LSL_Types.Vector3 fwd, LSL_Types.Vector3 left, LSL_Types.Vector3 up) 465 public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up)
458 { 466 {
459 m_host.AddScriptLPS(1); 467 m_host.AddScriptLPS(1);
460 double x, y, z, s; 468 double x, y, z, s;
@@ -487,7 +495,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
487 if (f == 5) { z = -z; } 495 if (f == 5) { z = -z; }
488 if (f == 6) { y = -y; } 496 if (f == 6) { y = -y; }
489 497
490 LSL_Types.Quaternion result = new LSL_Types.Quaternion(x, y, z, s); 498 LSL_Rotation result = new LSL_Rotation(x, y, z, s);
491 499
492 // a hack to correct a few questionable angles :( 500 // a hack to correct a few questionable angles :(
493 if (llVecDist(llRot2Fwd(result), fwd) > 0.001 || llVecDist(llRot2Left(result), left) > 0.001) 501 if (llVecDist(llRot2Fwd(result), fwd) > 0.001 || llVecDist(llRot2Left(result), left) > 0.001)
@@ -496,7 +504,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
496 return result; 504 return result;
497 } 505 }
498 506
499 public LSL_Types.Vector3 llRot2Fwd(LSL_Types.Quaternion r) 507 public LSL_Vector llRot2Fwd(LSL_Rotation r)
500 { 508 {
501 m_host.AddScriptLPS(1); 509 m_host.AddScriptLPS(1);
502 510
@@ -518,10 +526,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
518 x = r.x * r.x - r.y * r.y - r.z * r.z + r.s * r.s; 526 x = r.x * r.x - r.y * r.y - r.z * r.z + r.s * r.s;
519 y = 2 * (r.x * r.y + r.z * r.s); 527 y = 2 * (r.x * r.y + r.z * r.s);
520 z = 2 * (r.x * r.z - r.y * r.s); 528 z = 2 * (r.x * r.z - r.y * r.s);
521 return (new LSL_Types.Vector3(x, y, z)); 529 return (new LSL_Vector(x, y, z));
522 } 530 }
523 531
524 public LSL_Types.Vector3 llRot2Left(LSL_Types.Quaternion r) 532 public LSL_Vector llRot2Left(LSL_Rotation r)
525 { 533 {
526 m_host.AddScriptLPS(1); 534 m_host.AddScriptLPS(1);
527 535
@@ -543,10 +551,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
543 x = 2 * (r.x * r.y - r.z * r.s); 551 x = 2 * (r.x * r.y - r.z * r.s);
544 y = -r.x * r.x + r.y * r.y - r.z * r.z + r.s * r.s; 552 y = -r.x * r.x + r.y * r.y - r.z * r.z + r.s * r.s;
545 z = 2 * (r.x * r.s + r.y * r.z); 553 z = 2 * (r.x * r.s + r.y * r.z);
546 return (new LSL_Types.Vector3(x, y, z)); 554 return (new LSL_Vector(x, y, z));
547 } 555 }
548 556
549 public LSL_Types.Vector3 llRot2Up(LSL_Types.Quaternion r) 557 public LSL_Vector llRot2Up(LSL_Rotation r)
550 { 558 {
551 m_host.AddScriptLPS(1); 559 m_host.AddScriptLPS(1);
552 double x, y, z, m; 560 double x, y, z, m;
@@ -567,18 +575,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
567 x = 2 * (r.x * r.z + r.y * r.s); 575 x = 2 * (r.x * r.z + r.y * r.s);
568 y = 2 * (-r.x * r.s + r.y * r.z); 576 y = 2 * (-r.x * r.s + r.y * r.z);
569 z = -r.x * r.x - r.y * r.y + r.z * r.z + r.s * r.s; 577 z = -r.x * r.x - r.y * r.y + r.z * r.z + r.s * r.s;
570 return (new LSL_Types.Vector3(x, y, z)); 578 return (new LSL_Vector(x, y, z));
571 } 579 }
572 580
573 public LSL_Types.Quaternion llRotBetween(LSL_Types.Vector3 a, LSL_Types.Vector3 b) 581 public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b)
574 { 582 {
575 //A and B should both be normalized 583 //A and B should both be normalized
576 m_host.AddScriptLPS(1); 584 m_host.AddScriptLPS(1);
577 double dotProduct = LSL_Types.Vector3.Dot(a, b); 585 double dotProduct = LSL_Vector.Dot(a, b);
578 LSL_Types.Vector3 crossProduct = LSL_Types.Vector3.Cross(a, b); 586 LSL_Vector crossProduct = LSL_Vector.Cross(a, b);
579 double magProduct = LSL_Types.Vector3.Mag(a) * LSL_Types.Vector3.Mag(b); 587 double magProduct = LSL_Vector.Mag(a) * LSL_Vector.Mag(b);
580 double angle = Math.Acos(dotProduct / magProduct); 588 double angle = Math.Acos(dotProduct / magProduct);
581 LSL_Types.Vector3 axis = LSL_Types.Vector3.Norm(crossProduct); 589 LSL_Vector axis = LSL_Vector.Norm(crossProduct);
582 double s = Math.Sin(angle / 2); 590 double s = Math.Sin(angle / 2);
583 591
584 double x = axis.x * s; 592 double x = axis.x * s;
@@ -587,9 +595,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
587 double w = Math.Cos(angle / 2); 595 double w = Math.Cos(angle / 2);
588 596
589 if (Double.IsNaN(x) || Double.IsNaN(y) || Double.IsNaN(z) || Double.IsNaN(w)) 597 if (Double.IsNaN(x) || Double.IsNaN(y) || Double.IsNaN(z) || Double.IsNaN(w))
590 return new LSL_Types.Quaternion(0.0f, 0.0f, 0.0f, 1.0f); 598 return new LSL_Rotation(0.0f, 0.0f, 0.0f, 1.0f);
591 599
592 return new LSL_Types.Quaternion((float)x, (float)y, (float)z, (float)w); 600 return new LSL_Rotation((float)x, (float)y, (float)z, (float)w);
593 } 601 }
594 602
595 public void llWhisper(int channelID, string text) 603 public void llWhisper(int channelID, string text)
@@ -651,7 +659,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
651 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text); 659 wComm.DeliverMessage(ChatTypeEnum.Region, channelID, m_host.Name, m_host.UUID, text);
652 } 660 }
653 661
654 public LSL_Types.LSLInteger llListen(int channelID, string name, string ID, string msg) 662 public LSL_Integer llListen(int channelID, string name, string ID, string msg)
655 { 663 {
656 m_host.AddScriptLPS(1); 664 m_host.AddScriptLPS(1);
657 UUID keyID; 665 UUID keyID;
@@ -726,7 +734,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
726 return SensedObject.Name; 734 return SensedObject.Name;
727 } 735 }
728 736
729 public LSL_Types.LSLString llDetectedName(int number) 737 public LSL_String llDetectedName(int number)
730 { 738 {
731 m_host.AddScriptLPS(1); 739 m_host.AddScriptLPS(1);
732 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number); 740 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number);
@@ -735,7 +743,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
735 return d.Name; 743 return d.Name;
736 } 744 }
737 745
738 public LSL_Types.LSLString llDetectedKey(int number) 746 public LSL_String llDetectedKey(int number)
739 { 747 {
740 m_host.AddScriptLPS(1); 748 m_host.AddScriptLPS(1);
741 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number); 749 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number);
@@ -744,7 +752,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
744 return d.Key.ToString(); 752 return d.Key.ToString();
745 } 753 }
746 754
747 public LSL_Types.LSLString llDetectedOwner(int number) 755 public LSL_String llDetectedOwner(int number)
748 { 756 {
749 m_host.AddScriptLPS(1); 757 m_host.AddScriptLPS(1);
750 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number); 758 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number);
@@ -753,71 +761,113 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
753 return d.Owner.ToString(); 761 return d.Owner.ToString();
754 } 762 }
755 763
756 public LSL_Types.LSLInteger llDetectedType(int number) 764 public LSL_Integer llDetectedType(int number)
757 { 765 {
758 m_host.AddScriptLPS(1); 766 m_host.AddScriptLPS(1);
759 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number); 767 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number);
760 if (d == null) 768 if (d == null)
761 return 0; 769 return 0;
762 return new LSL_Types.LSLInteger(d.Type); 770 return new LSL_Integer(d.Type);
763 } 771 }
764 772
765 public LSL_Types.Vector3 llDetectedPos(int number) 773 public LSL_Vector llDetectedPos(int number)
766 { 774 {
767 m_host.AddScriptLPS(1); 775 m_host.AddScriptLPS(1);
768 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number); 776 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number);
769 if (d == null) 777 if (d == null)
770 return new LSL_Types.Vector3(); 778 return new LSL_Vector();
771 return d.Position; 779 return d.Position;
772 } 780 }
773 781
774 public LSL_Types.Vector3 llDetectedVel(int number) 782 public LSL_Vector llDetectedVel(int number)
775 { 783 {
776 m_host.AddScriptLPS(1); 784 m_host.AddScriptLPS(1);
777 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number); 785 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number);
778 if (d == null) 786 if (d == null)
779 return new LSL_Types.Vector3(); 787 return new LSL_Vector();
780 return d.Velocity; 788 return d.Velocity;
781 } 789 }
782 790
783 public LSL_Types.Vector3 llDetectedGrab(int number) 791 public LSL_Vector llDetectedGrab(int number)
784 { 792 {
785 m_host.AddScriptLPS(1); 793 m_host.AddScriptLPS(1);
786 DetectParams parms = m_ScriptEngine.GetDetectParams(m_itemID, number); 794 DetectParams parms = m_ScriptEngine.GetDetectParams(m_itemID, number);
787 if (parms == null) 795 if (parms == null)
788 return new LSL_Types.Vector3(0, 0, 0); 796 return new LSL_Vector(0, 0, 0);
789 797
790 return parms.OffsetPos; 798 return parms.OffsetPos;
791 } 799 }
792 800
793 public LSL_Types.Quaternion llDetectedRot(int number) 801 public LSL_Rotation llDetectedRot(int number)
794 { 802 {
795 m_host.AddScriptLPS(1); 803 m_host.AddScriptLPS(1);
796 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number); 804 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number);
797 if (d == null) 805 if (d == null)
798 return new LSL_Types.Quaternion(); 806 return new LSL_Rotation();
799 return d.Rotation; 807 return d.Rotation;
800 } 808 }
801 809
802 public LSL_Types.LSLInteger llDetectedGroup(int number) 810 public LSL_Integer llDetectedGroup(int number)
803 { 811 {
804 m_host.AddScriptLPS(1); 812 m_host.AddScriptLPS(1);
805 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number); 813 DetectParams d = m_ScriptEngine.GetDetectParams(m_itemID, number);
806 if (d == null) 814 if (d == null)
807 return new LSL_Types.LSLInteger(0); 815 return new LSL_Integer(0);
808 if (m_host.GroupID == d.Group) 816 if (m_host.GroupID == d.Group)
809 return new LSL_Types.LSLInteger(1); 817 return new LSL_Integer(1);
810 return new LSL_Types.LSLInteger(0); 818 return new LSL_Integer(0);
811 } 819 }
812 820
813 public LSL_Types.LSLInteger llDetectedLinkNumber(int number) 821 public LSL_Integer llDetectedLinkNumber(int number)
814 { 822 {
815 m_host.AddScriptLPS(1); 823 m_host.AddScriptLPS(1);
816 DetectParams parms = m_ScriptEngine.GetDetectParams(m_itemID, number); 824 DetectParams parms = m_ScriptEngine.GetDetectParams(m_itemID, number);
817 if (parms == null) 825 if (parms == null)
818 return new LSL_Types.LSLInteger(0); 826 return new LSL_Integer(0);
827
828 return new LSL_Integer(parms.LinkNum);
829 }
830
831 public LSL_Vector llDetectedTouchBinormal(int index)
832 {
833 m_host.AddScriptLPS(1);
834 NotImplemented("llDetectedTouchBinormal");
835 return new LSL_Vector();
836 }
837
838 public LSL_Integer llDetectedTouchFace(int index)
839 {
840 m_host.AddScriptLPS(1);
841 NotImplemented("llDetectedTouchFace");
842 return new LSL_Integer(0);
843 }
844
845 public LSL_Vector llDetectedTouchNormal(int index)
846 {
847 m_host.AddScriptLPS(1);
848 NotImplemented("llDetectedTouchNormal");
849 return new LSL_Vector();
850 }
851
852 public LSL_Vector llDetectedTouchPos(int index)
853 {
854 m_host.AddScriptLPS(1);
855 NotImplemented("llDetectedTouchPos");
856 return new LSL_Vector();
857 }
819 858
820 return new LSL_Types.LSLInteger(parms.LinkNum); 859 public LSL_Vector llDetectedTouchST(int index)
860 {
861 m_host.AddScriptLPS(1);
862 NotImplemented("llDetectedTouchST");
863 return new LSL_Vector();
864 }
865
866 public LSL_Vector llDetectedTouchUV(int index)
867 {
868 m_host.AddScriptLPS(1);
869 NotImplemented("llDetectedTouchUV");
870 return new LSL_Vector();
821 } 871 }
822 872
823 public void llDie() 873 public void llDie()
@@ -826,7 +876,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
826 throw new SelfDeleteException(); 876 throw new SelfDeleteException();
827 } 877 }
828 878
829 public LSL_Types.LSLFloat llGround(LSL_Types.Vector3 offset) 879 public LSL_Float llGround(LSL_Vector offset)
830 { 880 {
831 m_host.AddScriptLPS(1); 881 m_host.AddScriptLPS(1);
832 int x = (int)(m_host.OffsetPosition.X + offset.x); 882 int x = (int)(m_host.OffsetPosition.X + offset.x);
@@ -834,16 +884,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
834 return World.GetLandHeight(x, y); 884 return World.GetLandHeight(x, y);
835 } 885 }
836 886
837 public LSL_Types.LSLFloat llCloud(LSL_Types.Vector3 offset) 887 public LSL_Float llCloud(LSL_Vector offset)
838 { 888 {
839 m_host.AddScriptLPS(1); 889 m_host.AddScriptLPS(1);
840 return 0; 890 return 0;
841 } 891 }
842 892
843 public LSL_Types.Vector3 llWind(LSL_Types.Vector3 offset) 893 public LSL_Vector llWind(LSL_Vector offset)
844 { 894 {
845 m_host.AddScriptLPS(1); 895 m_host.AddScriptLPS(1);
846 return new LSL_Types.Vector3(); 896 return new LSL_Vector();
847 } 897 }
848 898
849 public void llSetStatus(int status, int value) 899 public void llSetStatus(int status, int value)
@@ -934,7 +984,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
934 } 984 }
935 } 985 }
936 986
937 public LSL_Types.LSLInteger llGetStatus(int status) 987 public LSL_Integer llGetStatus(int status)
938 { 988 {
939 m_host.AddScriptLPS(1); 989 m_host.AddScriptLPS(1);
940 // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); 990 // Console.WriteLine(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString());
@@ -994,13 +1044,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
994 return 0; 1044 return 0;
995 } 1045 }
996 1046
997 public void llSetScale(LSL_Types.Vector3 scale) 1047 public void llSetScale(LSL_Vector scale)
998 { 1048 {
999 m_host.AddScriptLPS(1); 1049 m_host.AddScriptLPS(1);
1000 SetScale(m_host, scale); 1050 SetScale(m_host, scale);
1001 } 1051 }
1002 1052
1003 private void SetScale(SceneObjectPart part, LSL_Types.Vector3 scale) 1053 private void SetScale(SceneObjectPart part, LSL_Vector scale)
1004 { 1054 {
1005 // TODO: this needs to trigger a persistance save as well 1055 // TODO: this needs to trigger a persistance save as well
1006 1056
@@ -1030,20 +1080,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1030 part.SendFullUpdateToAllClients(); 1080 part.SendFullUpdateToAllClients();
1031 } 1081 }
1032 1082
1033 public LSL_Types.Vector3 llGetScale() 1083 public LSL_Vector llGetScale()
1034 { 1084 {
1035 m_host.AddScriptLPS(1); 1085 m_host.AddScriptLPS(1);
1036 return new LSL_Types.Vector3(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); 1086 return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z);
1037 } 1087 }
1038 1088
1039 public void llSetColor(LSL_Types.Vector3 color, int face) 1089 public void llSetClickAction(int action)
1090 {
1091 m_host.AddScriptLPS(1);
1092 NotImplemented("llSetClickAction");
1093 return;
1094 }
1095
1096 public void llSetColor(LSL_Vector color, int face)
1040 { 1097 {
1041 m_host.AddScriptLPS(1); 1098 m_host.AddScriptLPS(1);
1042 1099
1043 SetColor(m_host, color, face); 1100 SetColor(m_host, color, face);
1044 } 1101 }
1045 1102
1046 private void SetColor(SceneObjectPart part, LSL_Types.Vector3 color, int face) 1103 private void SetColor(SceneObjectPart part, LSL_Vector color, int face)
1047 { 1104 {
1048 Primitive.TextureEntry tex = part.Shape.Textures; 1105 Primitive.TextureEntry tex = part.Shape.Textures;
1049 Color4 texcolor; 1106 Color4 texcolor;
@@ -1180,14 +1237,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1180 } 1237 }
1181 } 1238 }
1182 1239
1183 public LSL_Types.LSLFloat llGetAlpha(int face) 1240 public LSL_Float llGetAlpha(int face)
1184 { 1241 {
1185 m_host.AddScriptLPS(1); 1242 m_host.AddScriptLPS(1);
1186 1243
1187 return GetAlpha(m_host, face); 1244 return GetAlpha(m_host, face);
1188 } 1245 }
1189 1246
1190 private LSL_Types.LSLFloat GetAlpha(SceneObjectPart part, int face) 1247 private LSL_Float GetAlpha(SceneObjectPart part, int face)
1191 { 1248 {
1192 Primitive.TextureEntry tex = part.Shape.Textures; 1249 Primitive.TextureEntry tex = part.Shape.Textures;
1193 if (face == ScriptBaseClass.ALL_SIDES) 1250 if (face == ScriptBaseClass.ALL_SIDES)
@@ -1257,7 +1314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1257 /// <param name="tension"></param> 1314 /// <param name="tension"></param>
1258 /// <param name="Force"></param> 1315 /// <param name="Force"></param>
1259 private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction, 1316 private void SetFlexi(SceneObjectPart part, bool flexi, int softness, float gravity, float friction,
1260 float wind, float tension, LSL_Types.Vector3 Force) 1317 float wind, float tension, LSL_Vector Force)
1261 { 1318 {
1262 if (part == null) 1319 if (part == null)
1263 return; 1320 return;
@@ -1315,7 +1372,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1315 /// <param name="intensity"></param> 1372 /// <param name="intensity"></param>
1316 /// <param name="radius"></param> 1373 /// <param name="radius"></param>
1317 /// <param name="falloff"></param> 1374 /// <param name="falloff"></param>
1318 private void SetPointLight(SceneObjectPart part, bool light, LSL_Types.Vector3 color, float intensity, float radius, float falloff) 1375 private void SetPointLight(SceneObjectPart part, bool light, LSL_Vector color, float intensity, float radius, float falloff)
1319 { 1376 {
1320 if (part == null) 1377 if (part == null)
1321 return; 1378 return;
@@ -1339,17 +1396,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1339 part.ScheduleFullUpdate(); 1396 part.ScheduleFullUpdate();
1340 } 1397 }
1341 1398
1342 public LSL_Types.Vector3 llGetColor(int face) 1399 public LSL_Vector llGetColor(int face)
1343 { 1400 {
1344 m_host.AddScriptLPS(1); 1401 m_host.AddScriptLPS(1);
1345 return GetColor(m_host, face); 1402 return GetColor(m_host, face);
1346 } 1403 }
1347 1404
1348 private LSL_Types.Vector3 GetColor(SceneObjectPart part, int face) 1405 private LSL_Vector GetColor(SceneObjectPart part, int face)
1349 { 1406 {
1350 Primitive.TextureEntry tex = part.Shape.Textures; 1407 Primitive.TextureEntry tex = part.Shape.Textures;
1351 Color4 texcolor; 1408 Color4 texcolor;
1352 LSL_Types.Vector3 rgb = new LSL_Types.Vector3(); 1409 LSL_Vector rgb = new LSL_Vector();
1353 if (face == ScriptBaseClass.ALL_SIDES) 1410 if (face == ScriptBaseClass.ALL_SIDES)
1354 { 1411 {
1355 int i; 1412 int i;
@@ -1378,7 +1435,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1378 } 1435 }
1379 else 1436 else
1380 { 1437 {
1381 return new LSL_Types.Vector3(); 1438 return new LSL_Vector();
1382 } 1439 }
1383 } 1440 }
1384 1441
@@ -1532,13 +1589,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1532 } 1589 }
1533 } 1590 }
1534 1591
1535 public LSL_Types.LSLString llGetTexture(int face) 1592 public LSL_String llGetTexture(int face)
1536 { 1593 {
1537 m_host.AddScriptLPS(1); 1594 m_host.AddScriptLPS(1);
1538 return GetTexture(m_host, face); 1595 return GetTexture(m_host, face);
1539 } 1596 }
1540 1597
1541 private LSL_Types.LSLString GetTexture(SceneObjectPart part, int face) 1598 private LSL_String GetTexture(SceneObjectPart part, int face)
1542 { 1599 {
1543 Primitive.TextureEntry tex = part.Shape.Textures; 1600 Primitive.TextureEntry tex = part.Shape.Textures;
1544 if (face == ScriptBaseClass.ALL_SIDES) 1601 if (face == ScriptBaseClass.ALL_SIDES)
@@ -1557,7 +1614,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1557 } 1614 }
1558 } 1615 }
1559 1616
1560 public void llSetPos(LSL_Types.Vector3 pos) 1617 public void llSetPos(LSL_Vector pos)
1561 { 1618 {
1562 m_host.AddScriptLPS(1); 1619 m_host.AddScriptLPS(1);
1563 1620
@@ -1566,10 +1623,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1566 ScriptSleep(200); 1623 ScriptSleep(200);
1567 } 1624 }
1568 1625
1569 private void SetPos(SceneObjectPart part, LSL_Types.Vector3 targetPos) 1626 private void SetPos(SceneObjectPart part, LSL_Vector targetPos)
1570 { 1627 {
1571 // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos) 1628 // Capped movemment if distance > 10m (http://wiki.secondlife.com/wiki/LlSetPos)
1572 LSL_Types.Vector3 currentPos = llGetLocalPos(); 1629 LSL_Vector currentPos = llGetLocalPos();
1573 if (llVecDist(currentPos, targetPos) > 10.0f * m_ScriptDistanceFactor) 1630 if (llVecDist(currentPos, targetPos) > 10.0f * m_ScriptDistanceFactor)
1574 { 1631 {
1575 targetPos = currentPos + m_ScriptDistanceFactor * 10 * llVecNorm(targetPos - currentPos); 1632 targetPos = currentPos + m_ScriptDistanceFactor * 10 * llVecNorm(targetPos - currentPos);
@@ -1585,32 +1642,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1585 } 1642 }
1586 } 1643 }
1587 1644
1588 public LSL_Types.Vector3 llGetPos() 1645 public LSL_Vector llGetPos()
1589 { 1646 {
1590 m_host.AddScriptLPS(1); 1647 m_host.AddScriptLPS(1);
1591 return new LSL_Types.Vector3(m_host.AbsolutePosition.X, 1648 return new LSL_Vector(m_host.AbsolutePosition.X,
1592 m_host.AbsolutePosition.Y, 1649 m_host.AbsolutePosition.Y,
1593 m_host.AbsolutePosition.Z); 1650 m_host.AbsolutePosition.Z);
1594 } 1651 }
1595 1652
1596 public LSL_Types.Vector3 llGetLocalPos() 1653 public LSL_Vector llGetLocalPos()
1597 { 1654 {
1598 m_host.AddScriptLPS(1); 1655 m_host.AddScriptLPS(1);
1599 if (m_host.ParentID != 0) 1656 if (m_host.ParentID != 0)
1600 { 1657 {
1601 return new LSL_Types.Vector3(m_host.OffsetPosition.X, 1658 return new LSL_Vector(m_host.OffsetPosition.X,
1602 m_host.OffsetPosition.Y, 1659 m_host.OffsetPosition.Y,
1603 m_host.OffsetPosition.Z); 1660 m_host.OffsetPosition.Z);
1604 } 1661 }
1605 else 1662 else
1606 { 1663 {
1607 return new LSL_Types.Vector3(m_host.AbsolutePosition.X, 1664 return new LSL_Vector(m_host.AbsolutePosition.X,
1608 m_host.AbsolutePosition.Y, 1665 m_host.AbsolutePosition.Y,
1609 m_host.AbsolutePosition.Z); 1666 m_host.AbsolutePosition.Z);
1610 } 1667 }
1611 } 1668 }
1612 1669
1613 public void llSetRot(LSL_Types.Quaternion rot) 1670 public void llSetRot(LSL_Rotation rot)
1614 { 1671 {
1615 m_host.AddScriptLPS(1); 1672 m_host.AddScriptLPS(1);
1616 1673
@@ -1619,27 +1676,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1619 ScriptSleep(200); 1676 ScriptSleep(200);
1620 } 1677 }
1621 1678
1622 private void SetRot(SceneObjectPart part, LSL_Types.Quaternion rot) 1679 private void SetRot(SceneObjectPart part, LSL_Rotation rot)
1623 { 1680 {
1624 part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s)); 1681 part.UpdateRotation(new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s));
1625 // Update rotation does not move the object in the physics scene if it's a linkset. 1682 // Update rotation does not move the object in the physics scene if it's a linkset.
1626 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition; 1683 part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
1627 } 1684 }
1628 1685
1629 public LSL_Types.Quaternion llGetRot() 1686 public LSL_Rotation llGetRot()
1630 { 1687 {
1631 m_host.AddScriptLPS(1); 1688 m_host.AddScriptLPS(1);
1632 Quaternion q = m_host.RotationOffset; 1689 Quaternion q = m_host.RotationOffset;
1633 return new LSL_Types.Quaternion(q.X, q.Y, q.Z, q.W); 1690 return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
1634 } 1691 }
1635 1692
1636 public LSL_Types.Quaternion llGetLocalRot() 1693 public LSL_Rotation llGetLocalRot()
1637 { 1694 {
1638 m_host.AddScriptLPS(1); 1695 m_host.AddScriptLPS(1);
1639 return new LSL_Types.Quaternion(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W); 1696 return new LSL_Rotation(m_host.RotationOffset.X, m_host.RotationOffset.Y, m_host.RotationOffset.Z, m_host.RotationOffset.W);
1640 } 1697 }
1641 1698
1642 public void llSetForce(LSL_Types.Vector3 force, int local) 1699 public void llSetForce(LSL_Vector force, int local)
1643 { 1700 {
1644 m_host.AddScriptLPS(1); 1701 m_host.AddScriptLPS(1);
1645 1702
@@ -1655,9 +1712,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1655 } 1712 }
1656 } 1713 }
1657 1714
1658 public LSL_Types.Vector3 llGetForce() 1715 public LSL_Vector llGetForce()
1659 { 1716 {
1660 LSL_Types.Vector3 force = new LSL_Types.Vector3(0.0, 0.0, 0.0); 1717 LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0);
1661 1718
1662 m_host.AddScriptLPS(1); 1719 m_host.AddScriptLPS(1);
1663 1720
@@ -1675,7 +1732,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1675 return force; 1732 return force;
1676 } 1733 }
1677 1734
1678 public LSL_Types.LSLInteger llTarget(LSL_Types.Vector3 position, double range) 1735 public LSL_Integer llTarget(LSL_Vector position, double range)
1679 { 1736 {
1680 m_host.AddScriptLPS(1); 1737 m_host.AddScriptLPS(1);
1681 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range); 1738 return m_host.registerTargetWaypoint(new Vector3((float)position.x, (float)position.y, (float)position.z), (float)range);
@@ -1687,7 +1744,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1687 m_host.unregisterTargetWaypoint(number); 1744 m_host.unregisterTargetWaypoint(number);
1688 } 1745 }
1689 1746
1690 public LSL_Types.LSLInteger llRotTarget(LSL_Types.Quaternion rot, double error) 1747 public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
1691 { 1748 {
1692 m_host.AddScriptLPS(1); 1749 m_host.AddScriptLPS(1);
1693 NotImplemented("llRotTarget"); 1750 NotImplemented("llRotTarget");
@@ -1700,7 +1757,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1700 NotImplemented("llRotTargetRemove"); 1757 NotImplemented("llRotTargetRemove");
1701 } 1758 }
1702 1759
1703 public void llMoveToTarget(LSL_Types.Vector3 target, double tau) 1760 public void llMoveToTarget(LSL_Vector target, double tau)
1704 { 1761 {
1705 m_host.AddScriptLPS(1); 1762 m_host.AddScriptLPS(1);
1706 m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau); 1763 m_host.MoveToTarget(new Vector3((float)target.x, (float)target.y, (float)target.z), (float)tau);
@@ -1712,7 +1769,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1712 m_host.StopMoveToTarget(); 1769 m_host.StopMoveToTarget();
1713 } 1770 }
1714 1771
1715 public void llApplyImpulse(LSL_Types.Vector3 force, int local) 1772 public void llApplyImpulse(LSL_Vector force, int local)
1716 { 1773 {
1717 m_host.AddScriptLPS(1); 1774 m_host.AddScriptLPS(1);
1718 //No energy force yet 1775 //No energy force yet
@@ -1727,62 +1784,62 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1727 m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0); 1784 m_host.ApplyImpulse(new Vector3((float)force.x, (float)force.y, (float)force.z), local != 0);
1728 } 1785 }
1729 1786
1730 public void llApplyRotationalImpulse(LSL_Types.Vector3 force, int local) 1787 public void llApplyRotationalImpulse(LSL_Vector force, int local)
1731 { 1788 {
1732 m_host.AddScriptLPS(1); 1789 m_host.AddScriptLPS(1);
1733 NotImplemented("llApplyRotationalImpulse"); 1790 NotImplemented("llApplyRotationalImpulse");
1734 } 1791 }
1735 1792
1736 public void llSetTorque(LSL_Types.Vector3 torque, int local) 1793 public void llSetTorque(LSL_Vector torque, int local)
1737 { 1794 {
1738 m_host.AddScriptLPS(1); 1795 m_host.AddScriptLPS(1);
1739 NotImplemented("llSetTorque"); 1796 NotImplemented("llSetTorque");
1740 } 1797 }
1741 1798
1742 public LSL_Types.Vector3 llGetTorque() 1799 public LSL_Vector llGetTorque()
1743 { 1800 {
1744 m_host.AddScriptLPS(1); 1801 m_host.AddScriptLPS(1);
1745 NotImplemented("llGetTorque"); 1802 NotImplemented("llGetTorque");
1746 return new LSL_Types.Vector3(); 1803 return new LSL_Vector();
1747 } 1804 }
1748 1805
1749 public void llSetForceAndTorque(LSL_Types.Vector3 force, LSL_Types.Vector3 torque, int local) 1806 public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local)
1750 { 1807 {
1751 m_host.AddScriptLPS(1); 1808 m_host.AddScriptLPS(1);
1752 NotImplemented("llSetForceAndTorque"); 1809 NotImplemented("llSetForceAndTorque");
1753 } 1810 }
1754 1811
1755 public LSL_Types.Vector3 llGetVel() 1812 public LSL_Vector llGetVel()
1756 { 1813 {
1757 m_host.AddScriptLPS(1); 1814 m_host.AddScriptLPS(1);
1758 return new LSL_Types.Vector3(m_host.Velocity.X, m_host.Velocity.Y, m_host.Velocity.Z); 1815 return new LSL_Vector(m_host.Velocity.X, m_host.Velocity.Y, m_host.Velocity.Z);
1759 } 1816 }
1760 1817
1761 public LSL_Types.Vector3 llGetAccel() 1818 public LSL_Vector llGetAccel()
1762 { 1819 {
1763 m_host.AddScriptLPS(1); 1820 m_host.AddScriptLPS(1);
1764 return new LSL_Types.Vector3(m_host.Acceleration.X, m_host.Acceleration.Y, m_host.Acceleration.Z); 1821 return new LSL_Vector(m_host.Acceleration.X, m_host.Acceleration.Y, m_host.Acceleration.Z);
1765 } 1822 }
1766 1823
1767 public LSL_Types.Vector3 llGetOmega() 1824 public LSL_Vector llGetOmega()
1768 { 1825 {
1769 m_host.AddScriptLPS(1); 1826 m_host.AddScriptLPS(1);
1770 return new LSL_Types.Vector3(m_host.RotationalVelocity.X, m_host.RotationalVelocity.Y, m_host.RotationalVelocity.Z); 1827 return new LSL_Vector(m_host.RotationalVelocity.X, m_host.RotationalVelocity.Y, m_host.RotationalVelocity.Z);
1771 } 1828 }
1772 1829
1773 public LSL_Types.LSLFloat llGetTimeOfDay() 1830 public LSL_Float llGetTimeOfDay()
1774 { 1831 {
1775 m_host.AddScriptLPS(1); 1832 m_host.AddScriptLPS(1);
1776 return (double)(((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)) * World.TimeDilation); 1833 return (double)(((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)) * World.TimeDilation);
1777 } 1834 }
1778 1835
1779 public LSL_Types.LSLFloat llGetWallclock() 1836 public LSL_Float llGetWallclock()
1780 { 1837 {
1781 m_host.AddScriptLPS(1); 1838 m_host.AddScriptLPS(1);
1782 return DateTime.Now.TimeOfDay.TotalSeconds; 1839 return DateTime.Now.TimeOfDay.TotalSeconds;
1783 } 1840 }
1784 1841
1785 public LSL_Types.LSLFloat llGetTime() 1842 public LSL_Float llGetTime()
1786 { 1843 {
1787 m_host.AddScriptLPS(1); 1844 m_host.AddScriptLPS(1);
1788 TimeSpan ScriptTime = DateTime.Now - m_timer; 1845 TimeSpan ScriptTime = DateTime.Now - m_timer;
@@ -1795,7 +1852,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1795 m_timer = DateTime.Now; 1852 m_timer = DateTime.Now;
1796 } 1853 }
1797 1854
1798 public LSL_Types.LSLFloat llGetAndResetTime() 1855 public LSL_Float llGetAndResetTime()
1799 { 1856 {
1800 m_host.AddScriptLPS(1); 1857 m_host.AddScriptLPS(1);
1801 TimeSpan ScriptTime = DateTime.Now - m_timer; 1858 TimeSpan ScriptTime = DateTime.Now - m_timer;
@@ -1900,7 +1957,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1900 /// this more complicated than it might otherwise seem. 1957 /// this more complicated than it might otherwise seem.
1901 /// </summary> 1958 /// </summary>
1902 1959
1903 public LSL_Types.LSLString llGetSubString(string src, int start, int end) 1960 public LSL_String llGetSubString(string src, int start, int end)
1904 { 1961 {
1905 1962
1906 m_host.AddScriptLPS(1); 1963 m_host.AddScriptLPS(1);
@@ -1996,7 +2053,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1996 /// i.e. end < start. 2053 /// i.e. end < start.
1997 /// </summary> 2054 /// </summary>
1998 2055
1999 public LSL_Types.LSLString llDeleteSubString(string src, int start, int end) 2056 public LSL_String llDeleteSubString(string src, int start, int end)
2000 { 2057 {
2001 2058
2002 m_host.AddScriptLPS(1); 2059 m_host.AddScriptLPS(1);
@@ -2079,7 +2136,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2079 /// string bound, with the result being a concatenation. 2136 /// string bound, with the result being a concatenation.
2080 /// </summary> 2137 /// </summary>
2081 2138
2082 public LSL_Types.LSLString llInsertString(string dest, int index, string src) 2139 public LSL_String llInsertString(string dest, int index, string src)
2083 { 2140 {
2084 2141
2085 m_host.AddScriptLPS(1); 2142 m_host.AddScriptLPS(1);
@@ -2117,19 +2174,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2117 2174
2118 } 2175 }
2119 2176
2120 public LSL_Types.LSLString llToUpper(string src) 2177 public LSL_String llToUpper(string src)
2121 { 2178 {
2122 m_host.AddScriptLPS(1); 2179 m_host.AddScriptLPS(1);
2123 return src.ToUpper(); 2180 return src.ToUpper();
2124 } 2181 }
2125 2182
2126 public LSL_Types.LSLString llToLower(string src) 2183 public LSL_String llToLower(string src)
2127 { 2184 {
2128 m_host.AddScriptLPS(1); 2185 m_host.AddScriptLPS(1);
2129 return src.ToLower(); 2186 return src.ToLower();
2130 } 2187 }
2131 2188
2132 public LSL_Types.LSLInteger llGiveMoney(string destination, int amount) 2189 public LSL_Integer llGiveMoney(string destination, int amount)
2133 { 2190 {
2134 UUID invItemID=InventorySelf(); 2191 UUID invItemID=InventorySelf();
2135 if (invItemID == UUID.Zero) 2192 if (invItemID == UUID.Zero)
@@ -2198,7 +2255,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2198 // ScriptSleep(100); 2255 // ScriptSleep(100);
2199 } 2256 }
2200 2257
2201 public void llRezAtRoot(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) 2258 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
2202 { 2259 {
2203 m_host.AddScriptLPS(1); 2260 m_host.AddScriptLPS(1);
2204 2261
@@ -2244,14 +2301,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2244 2301
2245 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2302 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
2246 "object_rez", new Object[] { 2303 "object_rez", new Object[] {
2247 new LSL_Types.LSLString( 2304 new LSL_String(
2248 new_group.RootPart.UUID.ToString()) }, 2305 new_group.RootPart.UUID.ToString()) },
2249 new DetectParams[0])); 2306 new DetectParams[0]));
2250 2307
2251 float groupmass = new_group.GetMass(); 2308 float groupmass = new_group.GetMass();
2252 2309
2253 //Recoil. 2310 //Recoil.
2254 llApplyImpulse(new LSL_Types.Vector3(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0); 2311 llApplyImpulse(new LSL_Vector(llvel.X * groupmass, llvel.Y * groupmass, llvel.Z * groupmass), 0);
2255 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay) 2312 // Variable script delay? (see (http://wiki.secondlife.com/wiki/LSL_Delay)
2256 ScriptSleep((int)((groupmass * velmag) / 10)); 2313 ScriptSleep((int)((groupmass * velmag) / 10));
2257 // ScriptSleep(100); 2314 // ScriptSleep(100);
@@ -2261,12 +2318,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2261 llSay(0, "Could not find object " + inventory); 2318 llSay(0, "Could not find object " + inventory);
2262 } 2319 }
2263 2320
2264 public void llRezObject(string inventory, LSL_Types.Vector3 pos, LSL_Types.Vector3 vel, LSL_Types.Quaternion rot, int param) 2321 public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
2265 { 2322 {
2266 llRezAtRoot(inventory, pos, vel, rot, param); 2323 llRezAtRoot(inventory, pos, vel, rot, param);
2267 } 2324 }
2268 2325
2269 public void llLookAt(LSL_Types.Vector3 target, double strength, double damping) 2326 public void llLookAt(LSL_Vector target, double strength, double damping)
2270 { 2327 {
2271 m_host.AddScriptLPS(1); 2328 m_host.AddScriptLPS(1);
2272 NotImplemented("llLookAt"); 2329 NotImplemented("llLookAt");
@@ -2291,7 +2348,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2291 Thread.Sleep((int)(sec * 1000)); 2348 Thread.Sleep((int)(sec * 1000));
2292 } 2349 }
2293 2350
2294 public LSL_Types.LSLFloat llGetMass() 2351 public LSL_Float llGetMass()
2295 { 2352 {
2296 m_host.AddScriptLPS(1); 2353 m_host.AddScriptLPS(1);
2297 return m_host.GetMass(); 2354 return m_host.GetMass();
@@ -2325,7 +2382,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2325 } 2382 }
2326 2383
2327 m_host.AddScriptLPS(1); 2384 m_host.AddScriptLPS(1);
2328 //NotImplemented("llTakeControls");
2329 } 2385 }
2330 2386
2331 public void llReleaseControls() 2387 public void llReleaseControls()
@@ -2378,7 +2434,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2378 Deprecated("llReleaseCamera"); 2434 Deprecated("llReleaseCamera");
2379 } 2435 }
2380 2436
2381 public LSL_Types.LSLString llGetOwner() 2437 public LSL_String llGetOwner()
2382 { 2438 {
2383 m_host.AddScriptLPS(1); 2439 m_host.AddScriptLPS(1);
2384 2440
@@ -2428,8 +2484,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2428 msg.binaryBucket = new byte[0];// binaryBucket; 2484 msg.binaryBucket = new byte[0];// binaryBucket;
2429 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 2485 World.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
2430 // ScriptSleep(2000); 2486 // ScriptSleep(2000);
2431
2432 // NotImplemented("llInstantMessage");
2433 } 2487 }
2434 2488
2435 public void llEmail(string address, string subject, string message) 2489 public void llEmail(string address, string subject, string message)
@@ -2459,16 +2513,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2459 m_ScriptEngine.PostObjectEvent(m_host.LocalId, 2513 m_ScriptEngine.PostObjectEvent(m_host.LocalId,
2460 new EventParams("email", 2514 new EventParams("email",
2461 new Object[] { 2515 new Object[] {
2462 new LSL_Types.LSLString(email.time), 2516 new LSL_String(email.time),
2463 new LSL_Types.LSLString(email.sender), 2517 new LSL_String(email.sender),
2464 new LSL_Types.LSLString(email.subject), 2518 new LSL_String(email.subject),
2465 new LSL_Types.LSLString(email.message), 2519 new LSL_String(email.message),
2466 new LSL_Types.LSLInteger(email.numLeft)}, 2520 new LSL_Integer(email.numLeft)},
2467 new DetectParams[0])); 2521 new DetectParams[0]));
2468 2522
2469 } 2523 }
2470 2524
2471 public LSL_Types.LSLString llGetKey() 2525 public LSL_String llGetKey()
2472 { 2526 {
2473 m_host.AddScriptLPS(1); 2527 m_host.AddScriptLPS(1);
2474 return m_host.UUID.ToString(); 2528 return m_host.UUID.ToString();
@@ -2512,13 +2566,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2512 NotImplemented("llSoundPreload"); 2566 NotImplemented("llSoundPreload");
2513 } 2567 }
2514 2568
2515 public void llRotLookAt(LSL_Types.Quaternion target, double strength, double damping) 2569 public void llRotLookAt(LSL_Rotation target, double strength, double damping)
2516 { 2570 {
2517 m_host.AddScriptLPS(1); 2571 m_host.AddScriptLPS(1);
2518 NotImplemented("llRotLookAt"); 2572 NotImplemented("llRotLookAt");
2519 } 2573 }
2520 2574
2521 public LSL_Types.LSLInteger llStringLength(string str) 2575 public LSL_Integer llStringLength(string str)
2522 { 2576 {
2523 m_host.AddScriptLPS(1); 2577 m_host.AddScriptLPS(1);
2524 if (str.Length > 0) 2578 if (str.Length > 0)
@@ -2602,7 +2656,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2602 NotImplemented("llStopPointAt"); 2656 NotImplemented("llStopPointAt");
2603 } 2657 }
2604 2658
2605 public void llTargetOmega(LSL_Types.Vector3 axis, double spinrate, double gain) 2659 public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
2606 { 2660 {
2607 m_host.AddScriptLPS(1); 2661 m_host.AddScriptLPS(1);
2608 m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate)); 2662 m_host.RotationalVelocity = new Vector3((float)(axis.x * spinrate), (float)(axis.y * spinrate), (float)(axis.z * spinrate));
@@ -2612,13 +2666,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2612 m_host.ParentGroup.HasGroupChanged = true; 2666 m_host.ParentGroup.HasGroupChanged = true;
2613 } 2667 }
2614 2668
2615 public LSL_Types.LSLInteger llGetStartParameter() 2669 public LSL_Integer llGetStartParameter()
2616 { 2670 {
2617 m_host.AddScriptLPS(1); 2671 m_host.AddScriptLPS(1);
2618 return m_ScriptEngine.GetStartParameter(m_itemID); 2672 return m_ScriptEngine.GetStartParameter(m_itemID);
2619 } 2673 }
2620 2674
2621 public void llGodLikeRezObject(string inventory, LSL_Types.Vector3 pos) 2675 public void llGodLikeRezObject(string inventory, LSL_Vector pos)
2622 { 2676 {
2623 m_host.AddScriptLPS(1); 2677 m_host.AddScriptLPS(1);
2624 NotImplemented("llGodLikeRezObject"); 2678 NotImplemented("llGodLikeRezObject");
@@ -2645,7 +2699,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2645 2699
2646 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2700 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
2647 "run_time_permissions", new Object[] { 2701 "run_time_permissions", new Object[] {
2648 new LSL_Types.LSLInteger(0) }, 2702 new LSL_Integer(0) },
2649 new DetectParams[0])); 2703 new DetectParams[0]));
2650 2704
2651 return; 2705 return;
@@ -2671,7 +2725,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2671 2725
2672 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2726 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
2673 "run_time_permissions", new Object[] { 2727 "run_time_permissions", new Object[] {
2674 new LSL_Types.LSLInteger(perm) }, 2728 new LSL_Integer(perm) },
2675 new DetectParams[0])); 2729 new DetectParams[0]));
2676 2730
2677 return; 2731 return;
@@ -2691,7 +2745,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2691 2745
2692 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2746 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
2693 "run_time_permissions", new Object[] { 2747 "run_time_permissions", new Object[] {
2694 new LSL_Types.LSLInteger(perm) }, 2748 new LSL_Integer(perm) },
2695 new DetectParams[0])); 2749 new DetectParams[0]));
2696 2750
2697 return; 2751 return;
@@ -2721,7 +2775,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2721 // Requested agent is not in range, refuse perms 2775 // Requested agent is not in range, refuse perms
2722 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2776 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
2723 "run_time_permissions", new Object[] { 2777 "run_time_permissions", new Object[] {
2724 new LSL_Types.LSLInteger(0) }, 2778 new LSL_Integer(0) },
2725 new DetectParams[0])); 2779 new DetectParams[0]));
2726 } 2780 }
2727 2781
@@ -2744,11 +2798,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2744 m_host.TaskInventory[invItemID].PermsMask=answer; 2798 m_host.TaskInventory[invItemID].PermsMask=answer;
2745 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 2799 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
2746 "run_time_permissions", new Object[] { 2800 "run_time_permissions", new Object[] {
2747 new LSL_Types.LSLInteger(answer) }, 2801 new LSL_Integer(answer) },
2748 new DetectParams[0])); 2802 new DetectParams[0]));
2749 } 2803 }
2750 2804
2751 public LSL_Types.LSLString llGetPermissionsKey() 2805 public LSL_String llGetPermissionsKey()
2752 { 2806 {
2753 m_host.AddScriptLPS(1); 2807 m_host.AddScriptLPS(1);
2754 2808
@@ -2763,7 +2817,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2763 return UUID.Zero.ToString(); 2817 return UUID.Zero.ToString();
2764 } 2818 }
2765 2819
2766 public LSL_Types.LSLInteger llGetPermissions() 2820 public LSL_Integer llGetPermissions()
2767 { 2821 {
2768 m_host.AddScriptLPS(1); 2822 m_host.AddScriptLPS(1);
2769 2823
@@ -2778,7 +2832,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2778 return 0; 2832 return 0;
2779 } 2833 }
2780 2834
2781 public LSL_Types.LSLInteger llGetLinkNumber() 2835 public LSL_Integer llGetLinkNumber()
2782 { 2836 {
2783 m_host.AddScriptLPS(1); 2837 m_host.AddScriptLPS(1);
2784 2838
@@ -2792,7 +2846,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2792 } 2846 }
2793 } 2847 }
2794 2848
2795 public void llSetLinkColor(int linknumber, LSL_Types.Vector3 color, int face) 2849 public void llSetLinkColor(int linknumber, LSL_Vector color, int face)
2796 { 2850 {
2797 List<SceneObjectPart> parts = GetLinkParts(linknumber); 2851 List<SceneObjectPart> parts = GetLinkParts(linknumber);
2798 2852
@@ -2915,7 +2969,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2915 } 2969 }
2916 } 2970 }
2917 2971
2918 public LSL_Types.LSLString llGetLinkKey(int linknum) 2972 public LSL_String llGetLinkKey(int linknum)
2919 { 2973 {
2920 m_host.AddScriptLPS(1); 2974 m_host.AddScriptLPS(1);
2921 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 2975 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
@@ -2929,7 +2983,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2929 } 2983 }
2930 } 2984 }
2931 2985
2932 public LSL_Types.LSLString llGetLinkName(int linknum) 2986 public LSL_String llGetLinkName(int linknum)
2933 { 2987 {
2934 m_host.AddScriptLPS(1); 2988 m_host.AddScriptLPS(1);
2935 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 2989 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
@@ -2943,7 +2997,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2943 } 2997 }
2944 } 2998 }
2945 2999
2946 public LSL_Types.LSLInteger llGetInventoryNumber(int type) 3000 public LSL_Integer llGetInventoryNumber(int type)
2947 { 3001 {
2948 m_host.AddScriptLPS(1); 3002 m_host.AddScriptLPS(1);
2949 int count = 0; 3003 int count = 0;
@@ -2957,7 +3011,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2957 return count; 3011 return count;
2958 } 3012 }
2959 3013
2960 public LSL_Types.LSLString llGetInventoryName(int type, int number) 3014 public LSL_String llGetInventoryName(int type, int number)
2961 { 3015 {
2962 m_host.AddScriptLPS(1); 3016 m_host.AddScriptLPS(1);
2963 ArrayList keys = new ArrayList(); 3017 ArrayList keys = new ArrayList();
@@ -2999,7 +3053,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2999 } 3053 }
3000 } 3054 }
3001 3055
3002 public LSL_Types.LSLFloat llGetEnergy() 3056 public LSL_Float llGetEnergy()
3003 { 3057 {
3004 m_host.AddScriptLPS(1); 3058 m_host.AddScriptLPS(1);
3005 // TODO: figure out real energy value 3059 // TODO: figure out real energy value
@@ -3063,7 +3117,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3063 } 3117 }
3064 } 3118 }
3065 3119
3066 public void llSetText(string text, LSL_Types.Vector3 color, double alpha) 3120 public void llSetText(string text, LSL_Vector color, double alpha)
3067 { 3121 {
3068 m_host.AddScriptLPS(1); 3122 m_host.AddScriptLPS(1);
3069 Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f), 3123 Vector3 av3 = new Vector3(Util.Clip((float)color.x, 0.0f, 1.0f),
@@ -3073,7 +3127,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3073 m_host.ParentGroup.HasGroupChanged = true; 3127 m_host.ParentGroup.HasGroupChanged = true;
3074 } 3128 }
3075 3129
3076 public LSL_Types.LSLFloat llWater(LSL_Types.Vector3 offset) 3130 public LSL_Float llWater(LSL_Vector offset)
3077 { 3131 {
3078 m_host.AddScriptLPS(1); 3132 m_host.AddScriptLPS(1);
3079 return World.RegionInfo.RegionSettings.WaterHeight; 3133 return World.RegionInfo.RegionSettings.WaterHeight;
@@ -3085,7 +3139,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3085 NotImplemented("llPassTouches"); 3139 NotImplemented("llPassTouches");
3086 } 3140 }
3087 3141
3088 public LSL_Types.LSLString llRequestAgentData(string id, int data) 3142 public LSL_String llRequestAgentData(string id, int data)
3089 { 3143 {
3090 m_host.AddScriptLPS(1); 3144 m_host.AddScriptLPS(1);
3091 3145
@@ -3140,7 +3194,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3140 return tid.ToString(); 3194 return tid.ToString();
3141 } 3195 }
3142 3196
3143 public LSL_Types.LSLString llRequestInventoryData(string name) 3197 public LSL_String llRequestInventoryData(string name)
3144 { 3198 {
3145 m_host.AddScriptLPS(1); 3199 m_host.AddScriptLPS(1);
3146 3200
@@ -3203,6 +3257,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3203 // ScriptSleep(5000); 3257 // ScriptSleep(5000);
3204 } 3258 }
3205 3259
3260 public void llTextBox(string avatar, string message, int chat_channel)
3261 {
3262 m_host.AddScriptLPS(1);
3263 NotImplemented("llTextBox");
3264 }
3265
3206 public void llModifyLand(int action, int brush) 3266 public void llModifyLand(int action, int brush)
3207 { 3267 {
3208 m_host.AddScriptLPS(1); 3268 m_host.AddScriptLPS(1);
@@ -3221,7 +3281,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3221 NotImplemented("llCollisionSprite"); 3281 NotImplemented("llCollisionSprite");
3222 } 3282 }
3223 3283
3224 public LSL_Types.LSLString llGetAnimation(string id) 3284 public LSL_String llGetAnimation(string id)
3225 { 3285 {
3226 m_host.AddScriptLPS(1); 3286 m_host.AddScriptLPS(1);
3227 NotImplemented("llGetAnimation"); 3287 NotImplemented("llGetAnimation");
@@ -3259,7 +3319,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3259 3319
3260 object[] resobj = new object[] 3320 object[] resobj = new object[]
3261 { 3321 {
3262 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3322 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3263 }; 3323 };
3264 3324
3265 m_ScriptEngine.PostScriptEvent(partItemID, 3325 m_ScriptEngine.PostScriptEvent(partItemID,
@@ -3283,7 +3343,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3283 partItemID = item.ItemID; 3343 partItemID = item.ItemID;
3284 Object[] resobj = new object[] 3344 Object[] resobj = new object[]
3285 { 3345 {
3286 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3346 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3287 }; 3347 };
3288 3348
3289 m_ScriptEngine.PostScriptEvent(partItemID, 3349 m_ScriptEngine.PostScriptEvent(partItemID,
@@ -3311,7 +3371,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3311 partItemID = item.ItemID; 3371 partItemID = item.ItemID;
3312 Object[] resobj = new object[] 3372 Object[] resobj = new object[]
3313 { 3373 {
3314 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3374 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3315 }; 3375 };
3316 3376
3317 m_ScriptEngine.PostScriptEvent(partItemID, 3377 m_ScriptEngine.PostScriptEvent(partItemID,
@@ -3341,7 +3401,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3341 partItemID = item.ItemID; 3401 partItemID = item.ItemID;
3342 Object[] resobj = new object[] 3402 Object[] resobj = new object[]
3343 { 3403 {
3344 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3404 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3345 }; 3405 };
3346 3406
3347 m_ScriptEngine.PostScriptEvent(partItemID, 3407 m_ScriptEngine.PostScriptEvent(partItemID,
@@ -3365,7 +3425,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3365 3425
3366 object[] resobj = new object[] 3426 object[] resobj = new object[]
3367 { 3427 {
3368 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3428 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3369 }; 3429 };
3370 3430
3371 m_ScriptEngine.PostScriptEvent(partItemID, 3431 m_ScriptEngine.PostScriptEvent(partItemID,
@@ -3392,7 +3452,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3392 partItemID = item.ItemID; 3452 partItemID = item.ItemID;
3393 Object[] resObjDef = new object[] 3453 Object[] resObjDef = new object[]
3394 { 3454 {
3395 new LSL_Types.LSLInteger(m_host.LinkNum), new LSL_Types.LSLInteger(num), new LSL_Types.LSLString(msg), new LSL_Types.LSLString(id) 3455 new LSL_Integer(m_host.LinkNum), new LSL_Integer(num), new LSL_String(msg), new LSL_String(id)
3396 }; 3456 };
3397 3457
3398 m_ScriptEngine.PostScriptEvent(partItemID, 3458 m_ScriptEngine.PostScriptEvent(partItemID,
@@ -3410,7 +3470,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3410 3470
3411 } 3471 }
3412 3472
3413 public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) 3473 public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local)
3414 { 3474 {
3415 m_host.AddScriptLPS(1); 3475 m_host.AddScriptLPS(1);
3416 SceneObjectPart targ = World.GetSceneObjectPart(target); 3476 SceneObjectPart targ = World.GetSceneObjectPart(target);
@@ -3425,7 +3485,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3425 NotImplemented("llPassCollisions"); 3485 NotImplemented("llPassCollisions");
3426 } 3486 }
3427 3487
3428 public LSL_Types.LSLString llGetScriptName() 3488 public LSL_String llGetScriptName()
3429 { 3489 {
3430 3490
3431 string result = String.Empty; 3491 string result = String.Empty;
@@ -3502,7 +3562,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3502 3562
3503 } 3563 }
3504 3564
3505 public LSL_Types.LSLInteger llGetNumberOfSides() 3565 public LSL_Integer llGetNumberOfSides()
3506 { 3566 {
3507 m_host.AddScriptLPS(1); 3567 m_host.AddScriptLPS(1);
3508 3568
@@ -3597,7 +3657,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3597 // Xantor 29/apr/2008 3657 // Xantor 29/apr/2008
3598 // Returns rotation described by rotating angle radians about axis. 3658 // Returns rotation described by rotating angle radians about axis.
3599 // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) 3659 // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2))
3600 public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) 3660 public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle)
3601 { 3661 {
3602 m_host.AddScriptLPS(1); 3662 m_host.AddScriptLPS(1);
3603 3663
@@ -3609,13 +3669,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3609 y = axis.y * t; 3669 y = axis.y * t;
3610 z = axis.z * t; 3670 z = axis.z * t;
3611 3671
3612 return new LSL_Types.Quaternion(x,y,z,s); 3672 return new LSL_Rotation(x,y,z,s);
3613 } 3673 }
3614 3674
3615 3675
3616 // Xantor 29/apr/2008 3676 // Xantor 29/apr/2008
3617 // converts a Quaternion to X,Y,Z axis rotations 3677 // converts a Quaternion to X,Y,Z axis rotations
3618 public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) 3678 public LSL_Vector llRot2Axis(LSL_Rotation rot)
3619 { 3679 {
3620 m_host.AddScriptLPS(1); 3680 m_host.AddScriptLPS(1);
3621 double x,y,z; 3681 double x,y,z;
@@ -3646,12 +3706,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3646 z = rot.z / s; 3706 z = rot.z / s;
3647 } 3707 }
3648 3708
3649 return new LSL_Types.Vector3(x,y,z); 3709 return new LSL_Vector(x,y,z);
3650 } 3710 }
3651 3711
3652 3712
3653 // Returns the angle of a quaternion (see llRot2Axis for the axis) 3713 // Returns the angle of a quaternion (see llRot2Axis for the axis)
3654 public LSL_Types.LSLFloat llRot2Angle(LSL_Types.Quaternion rot) 3714 public LSL_Float llRot2Angle(LSL_Rotation rot)
3655 { 3715 {
3656 m_host.AddScriptLPS(1); 3716 m_host.AddScriptLPS(1);
3657 3717
@@ -3671,27 +3731,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3671 return angle; 3731 return angle;
3672 } 3732 }
3673 3733
3674 public LSL_Types.LSLFloat llAcos(double val) 3734 public LSL_Float llAcos(double val)
3675 { 3735 {
3676 m_host.AddScriptLPS(1); 3736 m_host.AddScriptLPS(1);
3677 return (double)Math.Acos(val); 3737 return (double)Math.Acos(val);
3678 } 3738 }
3679 3739
3680 public LSL_Types.LSLFloat llAsin(double val) 3740 public LSL_Float llAsin(double val)
3681 { 3741 {
3682 m_host.AddScriptLPS(1); 3742 m_host.AddScriptLPS(1);
3683 return (double)Math.Asin(val); 3743 return (double)Math.Asin(val);
3684 } 3744 }
3685 3745
3686 // Xantor 30/apr/2008 3746 // Xantor 30/apr/2008
3687 public LSL_Types.LSLFloat llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) 3747 public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b)
3688 { 3748 {
3689 m_host.AddScriptLPS(1); 3749 m_host.AddScriptLPS(1);
3690 3750
3691 return (double) Math.Acos(a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s) * 2; 3751 return (double) Math.Acos(a.x * b.x + a.y * b.y + a.z * b.z + a.s * b.s) * 2;
3692 } 3752 }
3693 3753
3694 public LSL_Types.LSLString llGetInventoryKey(string name) 3754 public LSL_String llGetInventoryKey(string name)
3695 { 3755 {
3696 m_host.AddScriptLPS(1); 3756 m_host.AddScriptLPS(1);
3697 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 3757 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -3721,15 +3781,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3721 m_host.ParentGroup.RootPart.AllowedDrop = false; 3781 m_host.ParentGroup.RootPart.AllowedDrop = false;
3722 } 3782 }
3723 3783
3724 public LSL_Types.Vector3 llGetSunDirection() 3784 public LSL_Vector llGetSunDirection()
3725 { 3785 {
3726 m_host.AddScriptLPS(1); 3786 m_host.AddScriptLPS(1);
3727 3787
3728 LSL_Types.Vector3 SunDoubleVector3; 3788 LSL_Vector SunDoubleVector3;
3729 Vector3 SunFloatVector3; 3789 Vector3 SunFloatVector3;
3730 3790
3731 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule 3791 // sunPosition estate setting is set in OpenSim.Region.Environment.Modules.SunModule
3732 // have to convert from Vector3 (float) to LSL_Types.Vector3 (double) 3792 // have to convert from Vector3 (float) to LSL_Vector (double)
3733 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector; 3793 SunFloatVector3 = World.RegionInfo.RegionSettings.SunVector;
3734 SunDoubleVector3.x = (double)SunFloatVector3.X; 3794 SunDoubleVector3.x = (double)SunFloatVector3.X;
3735 SunDoubleVector3.y = (double)SunFloatVector3.Y; 3795 SunDoubleVector3.y = (double)SunFloatVector3.Y;
@@ -3738,16 +3798,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3738 return SunDoubleVector3; 3798 return SunDoubleVector3;
3739 } 3799 }
3740 3800
3741 public LSL_Types.Vector3 llGetTextureOffset(int face) 3801 public LSL_Vector llGetTextureOffset(int face)
3742 { 3802 {
3743 m_host.AddScriptLPS(1); 3803 m_host.AddScriptLPS(1);
3744 return GetTextureOffset(m_host, face); 3804 return GetTextureOffset(m_host, face);
3745 } 3805 }
3746 3806
3747 private LSL_Types.Vector3 GetTextureOffset(SceneObjectPart part, int face) 3807 private LSL_Vector GetTextureOffset(SceneObjectPart part, int face)
3748 { 3808 {
3749 Primitive.TextureEntry tex = part.Shape.Textures; 3809 Primitive.TextureEntry tex = part.Shape.Textures;
3750 LSL_Types.Vector3 offset = new LSL_Types.Vector3(); 3810 LSL_Vector offset = new LSL_Vector();
3751 if (face == ScriptBaseClass.ALL_SIDES) 3811 if (face == ScriptBaseClass.ALL_SIDES)
3752 { 3812 {
3753 face = 0; 3813 face = 0;
@@ -3765,11 +3825,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3765 } 3825 }
3766 } 3826 }
3767 3827
3768 public LSL_Types.Vector3 llGetTextureScale(int side) 3828 public LSL_Vector llGetTextureScale(int side)
3769 { 3829 {
3770 m_host.AddScriptLPS(1); 3830 m_host.AddScriptLPS(1);
3771 Primitive.TextureEntry tex = m_host.Shape.Textures; 3831 Primitive.TextureEntry tex = m_host.Shape.Textures;
3772 LSL_Types.Vector3 scale; 3832 LSL_Vector scale;
3773 if (side == -1) 3833 if (side == -1)
3774 { 3834 {
3775 side = 0; 3835 side = 0;
@@ -3780,13 +3840,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3780 return scale; 3840 return scale;
3781 } 3841 }
3782 3842
3783 public LSL_Types.LSLFloat llGetTextureRot(int face) 3843 public LSL_Float llGetTextureRot(int face)
3784 { 3844 {
3785 m_host.AddScriptLPS(1); 3845 m_host.AddScriptLPS(1);
3786 return GetTextureRot(m_host, face); 3846 return GetTextureRot(m_host, face);
3787 } 3847 }
3788 3848
3789 private LSL_Types.LSLFloat GetTextureRot(SceneObjectPart part, int face) 3849 private LSL_Float GetTextureRot(SceneObjectPart part, int face)
3790 { 3850 {
3791 Primitive.TextureEntry tex = part.Shape.Textures; 3851 Primitive.TextureEntry tex = part.Shape.Textures;
3792 if (face == -1) 3852 if (face == -1)
@@ -3803,13 +3863,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3803 } 3863 }
3804 } 3864 }
3805 3865
3806 public LSL_Types.LSLInteger llSubStringIndex(string source, string pattern) 3866 public LSL_Integer llSubStringIndex(string source, string pattern)
3807 { 3867 {
3808 m_host.AddScriptLPS(1); 3868 m_host.AddScriptLPS(1);
3809 return source.IndexOf(pattern); 3869 return source.IndexOf(pattern);
3810 } 3870 }
3811 3871
3812 public LSL_Types.LSLString llGetOwnerKey(string id) 3872 public LSL_String llGetOwnerKey(string id)
3813 { 3873 {
3814 m_host.AddScriptLPS(1); 3874 m_host.AddScriptLPS(1);
3815 UUID key = new UUID(); 3875 UUID key = new UUID();
@@ -3834,14 +3894,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3834 } 3894 }
3835 } 3895 }
3836 3896
3837 public LSL_Types.Vector3 llGetCenterOfMass() 3897 public LSL_Vector llGetCenterOfMass()
3838 { 3898 {
3839 m_host.AddScriptLPS(1); 3899 m_host.AddScriptLPS(1);
3840 NotImplemented("llGetCenterOfMass"); 3900 NotImplemented("llGetCenterOfMass");
3841 return new LSL_Types.Vector3(); 3901 return new LSL_Vector();
3842 } 3902 }
3843 3903
3844 public LSL_Types.list llListSort(LSL_Types.list src, int stride, int ascending) 3904 public LSL_List llListSort(LSL_List src, int stride, int ascending)
3845 { 3905 {
3846 m_host.AddScriptLPS(1); 3906 m_host.AddScriptLPS(1);
3847 3907
@@ -3852,7 +3912,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3852 return src.Sort(stride, ascending); 3912 return src.Sort(stride, ascending);
3853 } 3913 }
3854 3914
3855 public LSL_Types.LSLInteger llGetListLength(LSL_Types.list src) 3915 public LSL_Integer llGetListLength(LSL_List src)
3856 { 3916 {
3857 m_host.AddScriptLPS(1); 3917 m_host.AddScriptLPS(1);
3858 3918
@@ -3866,7 +3926,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3866 } 3926 }
3867 } 3927 }
3868 3928
3869 public LSL_Types.LSLInteger llList2Integer(LSL_Types.list src, int index) 3929 public LSL_Integer llList2Integer(LSL_List src, int index)
3870 { 3930 {
3871 m_host.AddScriptLPS(1); 3931 m_host.AddScriptLPS(1);
3872 if (index < 0) 3932 if (index < 0)
@@ -3879,12 +3939,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3879 } 3939 }
3880 try 3940 try
3881 { 3941 {
3882 if (src.Data[index] is LSL_Types.LSLInteger) 3942 if (src.Data[index] is LSL_Integer)
3883 return Convert.ToInt32(((LSL_Types.LSLInteger) src.Data[index]).value); 3943 return Convert.ToInt32(((LSL_Integer) src.Data[index]).value);
3884 else if (src.Data[index] is LSL_Types.LSLFloat) 3944 else if (src.Data[index] is LSL_Float)
3885 return Convert.ToInt32(((LSL_Types.LSLFloat) src.Data[index]).value); 3945 return Convert.ToInt32(((LSL_Float) src.Data[index]).value);
3886 else if (src.Data[index] is LSL_Types.LSLString) 3946 else if (src.Data[index] is LSL_String)
3887 return Convert.ToInt32(((LSL_Types.LSLString) src.Data[index]).m_string); 3947 return Convert.ToInt32(((LSL_String) src.Data[index]).m_string);
3888 return Convert.ToInt32(src.Data[index]); 3948 return Convert.ToInt32(src.Data[index]);
3889 } 3949 }
3890 catch (FormatException) 3950 catch (FormatException)
@@ -3893,7 +3953,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3893 } 3953 }
3894 } 3954 }
3895 3955
3896 public LSL_Types.LSLFloat llList2Float(LSL_Types.list src, int index) 3956 public LSL_Float llList2Float(LSL_List src, int index)
3897 { 3957 {
3898 m_host.AddScriptLPS(1); 3958 m_host.AddScriptLPS(1);
3899 if (index < 0) 3959 if (index < 0)
@@ -3906,12 +3966,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3906 } 3966 }
3907 try 3967 try
3908 { 3968 {
3909 if (src.Data[index] is LSL_Types.LSLInteger) 3969 if (src.Data[index] is LSL_Integer)
3910 return Convert.ToDouble(((LSL_Types.LSLInteger) src.Data[index]).value); 3970 return Convert.ToDouble(((LSL_Integer) src.Data[index]).value);
3911 else if (src.Data[index] is LSL_Types.LSLFloat) 3971 else if (src.Data[index] is LSL_Float)
3912 return Convert.ToDouble(((LSL_Types.LSLFloat) src.Data[index]).value); 3972 return Convert.ToDouble(((LSL_Float) src.Data[index]).value);
3913 else if (src.Data[index] is LSL_Types.LSLString) 3973 else if (src.Data[index] is LSL_String)
3914 return Convert.ToDouble(((LSL_Types.LSLString) src.Data[index]).m_string); 3974 return Convert.ToDouble(((LSL_String) src.Data[index]).m_string);
3915 return Convert.ToDouble(src.Data[index]); 3975 return Convert.ToDouble(src.Data[index]);
3916 } 3976 }
3917 catch (FormatException) 3977 catch (FormatException)
@@ -3920,7 +3980,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3920 } 3980 }
3921 } 3981 }
3922 3982
3923 public LSL_Types.LSLString llList2String(LSL_Types.list src, int index) 3983 public LSL_String llList2String(LSL_List src, int index)
3924 { 3984 {
3925 m_host.AddScriptLPS(1); 3985 m_host.AddScriptLPS(1);
3926 if (index < 0) 3986 if (index < 0)
@@ -3934,7 +3994,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3934 return src.Data[index].ToString(); 3994 return src.Data[index].ToString();
3935 } 3995 }
3936 3996
3937 public LSL_Types.LSLString llList2Key(LSL_Types.list src, int index) 3997 public LSL_String llList2Key(LSL_List src, int index)
3938 { 3998 {
3939 m_host.AddScriptLPS(1); 3999 m_host.AddScriptLPS(1);
3940 if (index < 0) 4000 if (index < 0)
@@ -3948,7 +4008,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3948 return src.Data[index].ToString(); 4008 return src.Data[index].ToString();
3949 } 4009 }
3950 4010
3951 public LSL_Types.Vector3 llList2Vector(LSL_Types.list src, int index) 4011 public LSL_Vector llList2Vector(LSL_List src, int index)
3952 { 4012 {
3953 m_host.AddScriptLPS(1); 4013 m_host.AddScriptLPS(1);
3954 if (index < 0) 4014 if (index < 0)
@@ -3957,19 +4017,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3957 } 4017 }
3958 if (index >= src.Length) 4018 if (index >= src.Length)
3959 { 4019 {
3960 return new LSL_Types.Vector3(0, 0, 0); 4020 return new LSL_Vector(0, 0, 0);
3961 } 4021 }
3962 if (src.Data[index].GetType() == typeof(LSL_Types.Vector3)) 4022 if (src.Data[index].GetType() == typeof(LSL_Vector))
3963 { 4023 {
3964 return (LSL_Types.Vector3)src.Data[index]; 4024 return (LSL_Vector)src.Data[index];
3965 } 4025 }
3966 else 4026 else
3967 { 4027 {
3968 return new LSL_Types.Vector3(src.Data[index].ToString()); 4028 return new LSL_Vector(src.Data[index].ToString());
3969 } 4029 }
3970 } 4030 }
3971 4031
3972 public LSL_Types.Quaternion llList2Rot(LSL_Types.list src, int index) 4032 public LSL_Rotation llList2Rot(LSL_List src, int index)
3973 { 4033 {
3974 m_host.AddScriptLPS(1); 4034 m_host.AddScriptLPS(1);
3975 if (index < 0) 4035 if (index < 0)
@@ -3978,30 +4038,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3978 } 4038 }
3979 if (index >= src.Length) 4039 if (index >= src.Length)
3980 { 4040 {
3981 return new LSL_Types.Quaternion(0, 0, 0, 1); 4041 return new LSL_Rotation(0, 0, 0, 1);
3982 } 4042 }
3983 if (src.Data[index].GetType() == typeof(LSL_Types.Quaternion)) 4043 if (src.Data[index].GetType() == typeof(LSL_Rotation))
3984 { 4044 {
3985 return (LSL_Types.Quaternion)src.Data[index]; 4045 return (LSL_Rotation)src.Data[index];
3986 } 4046 }
3987 else 4047 else
3988 { 4048 {
3989 return new LSL_Types.Quaternion(src.Data[index].ToString()); 4049 return new LSL_Rotation(src.Data[index].ToString());
3990 } 4050 }
3991 } 4051 }
3992 4052
3993 public LSL_Types.list llList2List(LSL_Types.list src, int start, int end) 4053 public LSL_List llList2List(LSL_List src, int start, int end)
3994 { 4054 {
3995 m_host.AddScriptLPS(1); 4055 m_host.AddScriptLPS(1);
3996 return src.GetSublist(start, end); 4056 return src.GetSublist(start, end);
3997 } 4057 }
3998 4058
3999 public LSL_Types.list llDeleteSubList(LSL_Types.list src, int start, int end) 4059 public LSL_List llDeleteSubList(LSL_List src, int start, int end)
4000 { 4060 {
4001 return src.DeleteSublist(end, start); 4061 return src.DeleteSublist(end, start);
4002 } 4062 }
4003 4063
4004 public LSL_Types.LSLInteger llGetListEntryType(LSL_Types.list src, int index) 4064 public LSL_Integer llGetListEntryType(LSL_List src, int index)
4005 { 4065 {
4006 m_host.AddScriptLPS(1); 4066 m_host.AddScriptLPS(1);
4007 if (index < 0) 4067 if (index < 0)
@@ -4013,11 +4073,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4013 return 0; 4073 return 0;
4014 } 4074 }
4015 4075
4016 if (src.Data[index] is LSL_Types.LSLInteger || src.Data[index] is Int32) 4076 if (src.Data[index] is LSL_Integer || src.Data[index] is Int32)
4017 return 1; 4077 return 1;
4018 if (src.Data[index] is LSL_Types.LSLFloat || src.Data[index] is Single || src.Data[index] is Double) 4078 if (src.Data[index] is LSL_Float || src.Data[index] is Single || src.Data[index] is Double)
4019 return 2; 4079 return 2;
4020 if (src.Data[index] is LSL_Types.LSLString || src.Data[index] is String) 4080 if (src.Data[index] is LSL_String || src.Data[index] is String)
4021 { 4081 {
4022 UUID tuuid; 4082 UUID tuuid;
4023 if (UUID.TryParse(src.Data[index].ToString(), out tuuid)) 4083 if (UUID.TryParse(src.Data[index].ToString(), out tuuid))
@@ -4029,11 +4089,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4029 return 3; 4089 return 3;
4030 } 4090 }
4031 } 4091 }
4032 if (src.Data[index] is LSL_Types.Vector3) 4092 if (src.Data[index] is LSL_Vector)
4033 return 5; 4093 return 5;
4034 if (src.Data[index] is LSL_Types.Quaternion) 4094 if (src.Data[index] is LSL_Rotation)
4035 return 6; 4095 return 6;
4036 if (src.Data[index] is LSL_Types.list) 4096 if (src.Data[index] is LSL_List)
4037 return 7; 4097 return 7;
4038 return 0; 4098 return 0;
4039 4099
@@ -4046,7 +4106,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4046 /// each comma. 4106 /// each comma.
4047 /// </summary> 4107 /// </summary>
4048 4108
4049 public LSL_Types.LSLString llList2CSV(LSL_Types.list src) 4109 public LSL_String llList2CSV(LSL_List src)
4050 { 4110 {
4051 4111
4052 string ret = String.Empty; 4112 string ret = String.Empty;
@@ -4074,10 +4134,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4074 /// before or after an element is trimmed. 4134 /// before or after an element is trimmed.
4075 /// </summary> 4135 /// </summary>
4076 4136
4077 public LSL_Types.list llCSV2List(string src) 4137 public LSL_List llCSV2List(string src)
4078 { 4138 {
4079 4139
4080 LSL_Types.list result = new LSL_Types.list(); 4140 LSL_List result = new LSL_List();
4081 int parens = 0; 4141 int parens = 0;
4082 int start = 0; 4142 int start = 0;
4083 int length = 0; 4143 int length = 0;
@@ -4131,9 +4191,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4131 /// sizes. 4191 /// sizes.
4132 /// </remarks> 4192 /// </remarks>
4133 4193
4134 public LSL_Types.list llListRandomize(LSL_Types.list src, int stride) 4194 public LSL_List llListRandomize(LSL_List src, int stride)
4135 { 4195 {
4136 LSL_Types.list result; 4196 LSL_List result;
4137 Random rand = new Random(); 4197 Random rand = new Random();
4138 4198
4139 int chunkk; 4199 int chunkk;
@@ -4174,7 +4234,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4174 4234
4175 // Construct the randomized list 4235 // Construct the randomized list
4176 4236
4177 result = new LSL_Types.list(); 4237 result = new LSL_List();
4178 4238
4179 for (int i = 0; i < chunkk; i++) 4239 for (int i = 0; i < chunkk; i++)
4180 { 4240 {
@@ -4187,7 +4247,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4187 else { 4247 else {
4188 object[] array = new object[src.Length]; 4248 object[] array = new object[src.Length];
4189 Array.Copy(src.Data, 0, array, 0, src.Length); 4249 Array.Copy(src.Data, 0, array, 0, src.Length);
4190 result = new LSL_Types.list(array); 4250 result = new LSL_List(array);
4191 } 4251 }
4192 4252
4193 return result; 4253 return result;
@@ -4201,10 +4261,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4201 /// range are included in the result. 4261 /// range are included in the result.
4202 /// </summary> 4262 /// </summary>
4203 4263
4204 public LSL_Types.list llList2ListStrided(LSL_Types.list src, int start, int end, int stride) 4264 public LSL_List llList2ListStrided(LSL_List src, int start, int end, int stride)
4205 { 4265 {
4206 4266
4207 LSL_Types.list result = new LSL_Types.list(); 4267 LSL_List result = new LSL_List();
4208 int[] si = new int[2]; 4268 int[] si = new int[2];
4209 int[] ei = new int[2]; 4269 int[] ei = new int[2];
4210 bool twopass = false; 4270 bool twopass = false;
@@ -4281,10 +4341,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4281 return result; 4341 return result;
4282 } 4342 }
4283 4343
4284 public LSL_Types.Vector3 llGetRegionCorner() 4344 public LSL_Integer llGetRegionAgentCount()
4345 {
4346 m_host.AddScriptLPS(1);
4347 NotImplemented("llGetRegionAgentCount");
4348 return new LSL_Integer(0);
4349 }
4350
4351 public LSL_Vector llGetRegionCorner()
4285 { 4352 {
4286 m_host.AddScriptLPS(1); 4353 m_host.AddScriptLPS(1);
4287 return new LSL_Types.Vector3(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0); 4354 return new LSL_Vector(World.RegionInfo.RegionLocX * Constants.RegionSize, World.RegionInfo.RegionLocY * Constants.RegionSize, 0);
4288 } 4355 }
4289 4356
4290 /// <summary> 4357 /// <summary>
@@ -4293,11 +4360,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4293 /// new element has the index specified by <index> 4360 /// new element has the index specified by <index>
4294 /// </summary> 4361 /// </summary>
4295 4362
4296 public LSL_Types.list llListInsertList(LSL_Types.list dest, LSL_Types.list src, int index) 4363 public LSL_List llListInsertList(LSL_List dest, LSL_List src, int index)
4297 { 4364 {
4298 4365
4299 LSL_Types.list pref = null; 4366 LSL_List pref = null;
4300 LSL_Types.list suff = null; 4367 LSL_List suff = null;
4301 4368
4302 m_host.AddScriptLPS(1); 4369 m_host.AddScriptLPS(1);
4303 4370
@@ -4343,7 +4410,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4343 /// in src. 4410 /// in src.
4344 /// </summary> 4411 /// </summary>
4345 4412
4346 public LSL_Types.LSLInteger llListFindList(LSL_Types.list src, LSL_Types.list test) 4413 public LSL_Integer llListFindList(LSL_List src, LSL_List test)
4347 { 4414 {
4348 4415
4349 int index = -1; 4416 int index = -1;
@@ -4376,7 +4443,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4376 4443
4377 } 4444 }
4378 4445
4379 public LSL_Types.LSLString llGetObjectName() 4446 public LSL_String llGetObjectName()
4380 { 4447 {
4381 m_host.AddScriptLPS(1); 4448 m_host.AddScriptLPS(1);
4382 return m_host.Name!=null?m_host.Name:String.Empty; 4449 return m_host.Name!=null?m_host.Name:String.Empty;
@@ -4388,7 +4455,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4388 m_host.Name = name!=null?name:String.Empty; 4455 m_host.Name = name!=null?name:String.Empty;
4389 } 4456 }
4390 4457
4391 public LSL_Types.LSLString llGetDate() 4458 public LSL_String llGetDate()
4392 { 4459 {
4393 m_host.AddScriptLPS(1); 4460 m_host.AddScriptLPS(1);
4394 DateTime date = DateTime.Now.ToUniversalTime(); 4461 DateTime date = DateTime.Now.ToUniversalTime();
@@ -4396,14 +4463,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4396 return result; 4463 return result;
4397 } 4464 }
4398 4465
4399 public LSL_Types.LSLInteger llEdgeOfWorld(LSL_Types.Vector3 pos, LSL_Types.Vector3 dir) 4466 public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir)
4400 { 4467 {
4401 m_host.AddScriptLPS(1); 4468 m_host.AddScriptLPS(1);
4402 NotImplemented("llEdgeOfWorld"); 4469 NotImplemented("llEdgeOfWorld");
4403 return 0; 4470 return 0;
4404 } 4471 }
4405 4472
4406 public LSL_Types.LSLInteger llGetAgentInfo(string id) 4473 public LSL_Integer llGetAgentInfo(string id)
4407 { 4474 {
4408 m_host.AddScriptLPS(1); 4475 m_host.AddScriptLPS(1);
4409 NotImplemented("llGetAgentInfo"); 4476 NotImplemented("llGetAgentInfo");
@@ -4429,7 +4496,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4429 m_host.SoundRadius = radius; 4496 m_host.SoundRadius = radius;
4430 } 4497 }
4431 4498
4432 public LSL_Types.LSLString llKey2Name(string id) 4499 public LSL_String llKey2Name(string id)
4433 { 4500 {
4434 m_host.AddScriptLPS(1); 4501 m_host.AddScriptLPS(1);
4435 UUID key = new UUID(); 4502 UUID key = new UUID();
@@ -4475,8 +4542,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4475 m_host.ParentGroup.HasGroupChanged = true; 4542 m_host.ParentGroup.HasGroupChanged = true;
4476 } 4543 }
4477 4544
4478 public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, 4545 public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east,
4479 LSL_Types.Vector3 bottom_south_west) 4546 LSL_Vector bottom_south_west)
4480 { 4547 {
4481 m_host.AddScriptLPS(1); 4548 m_host.AddScriptLPS(1);
4482 NotImplemented("llTriggerSoundLimited"); 4549 NotImplemented("llTriggerSoundLimited");
@@ -4499,10 +4566,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4499 // ScriptSleep(5000); 4566 // ScriptSleep(5000);
4500 } 4567 }
4501 4568
4502 public LSL_Types.list llParseString2List(string str, LSL_Types.list separators, LSL_Types.list spacers) 4569 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List spacers)
4503 { 4570 {
4504 m_host.AddScriptLPS(1); 4571 m_host.AddScriptLPS(1);
4505 LSL_Types.list ret = new LSL_Types.list(); 4572 LSL_List ret = new LSL_List();
4506 object[] delimiters = new object[separators.Length + spacers.Length]; 4573 object[] delimiters = new object[separators.Length + spacers.Length];
4507 separators.Data.CopyTo(delimiters, 0); 4574 separators.Data.CopyTo(delimiters, 0);
4508 spacers.Data.CopyTo(delimiters, separators.Length); 4575 spacers.Data.CopyTo(delimiters, separators.Length);
@@ -4555,7 +4622,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4555 return ret; 4622 return ret;
4556 } 4623 }
4557 4624
4558 public LSL_Types.LSLInteger llOverMyLand(string id) 4625 public LSL_Integer llOverMyLand(string id)
4559 { 4626 {
4560 m_host.AddScriptLPS(1); 4627 m_host.AddScriptLPS(1);
4561 UUID key = new UUID(); 4628 UUID key = new UUID();
@@ -4578,17 +4645,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4578 return 0; 4645 return 0;
4579 } 4646 }
4580 4647
4581 public LSL_Types.LSLString llGetLandOwnerAt(LSL_Types.Vector3 pos) 4648 public LSL_String llGetLandOwnerAt(LSL_Vector pos)
4582 { 4649 {
4583 m_host.AddScriptLPS(1); 4650 m_host.AddScriptLPS(1);
4584 return World.GetLandOwner((float)pos.x, (float)pos.y).ToString(); 4651 return World.GetLandOwner((float)pos.x, (float)pos.y).ToString();
4585 } 4652 }
4586 4653
4587 public LSL_Types.Vector3 llGetAgentSize(string id) 4654 public LSL_Vector llGetAgentSize(string id)
4588 { 4655 {
4589 m_host.AddScriptLPS(1); 4656 m_host.AddScriptLPS(1);
4590 ScenePresence avatar = World.GetScenePresence(id); 4657 ScenePresence avatar = World.GetScenePresence(id);
4591 LSL_Types.Vector3 agentSize; 4658 LSL_Vector agentSize;
4592 if (avatar == null) 4659 if (avatar == null)
4593 { 4660 {
4594 agentSize = ScriptBaseClass.ZERO_VECTOR; 4661 agentSize = ScriptBaseClass.ZERO_VECTOR;
@@ -4596,25 +4663,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4596 else 4663 else
4597 { 4664 {
4598 PhysicsVector size = avatar.PhysicsActor.Size; 4665 PhysicsVector size = avatar.PhysicsActor.Size;
4599 agentSize = new LSL_Types.Vector3(size.X, size.Y, size.Z); 4666 agentSize = new LSL_Vector(size.X, size.Y, size.Z);
4600 } 4667 }
4601 return agentSize; 4668 return agentSize;
4602 } 4669 }
4603 4670
4604 public LSL_Types.LSLInteger llSameGroup(string agent) 4671 public LSL_Integer llSameGroup(string agent)
4605 { 4672 {
4606 m_host.AddScriptLPS(1); 4673 m_host.AddScriptLPS(1);
4607 UUID agentId = new UUID(); 4674 UUID agentId = new UUID();
4608 if (!UUID.TryParse(agent, out agentId)) 4675 if (!UUID.TryParse(agent, out agentId))
4609 return new LSL_Types.LSLInteger(0); 4676 return new LSL_Integer(0);
4610 ScenePresence presence = World.GetScenePresence(agentId); 4677 ScenePresence presence = World.GetScenePresence(agentId);
4611 if (presence == null) 4678 if (presence == null)
4612 return new LSL_Types.LSLInteger(0); 4679 return new LSL_Integer(0);
4613 IClientAPI client = presence.ControllingClient; 4680 IClientAPI client = presence.ControllingClient;
4614 if (m_host.GroupID == client.ActiveGroupId) 4681 if (m_host.GroupID == client.ActiveGroupId)
4615 return new LSL_Types.LSLInteger(1); 4682 return new LSL_Integer(1);
4616 else 4683 else
4617 return new LSL_Types.LSLInteger(0); 4684 return new LSL_Integer(0);
4618 } 4685 }
4619 4686
4620 public void llUnSit(string id) 4687 public void llUnSit(string id)
@@ -4660,7 +4727,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4660 4727
4661 } 4728 }
4662 4729
4663 public LSL_Types.Vector3 llGroundSlope(LSL_Types.Vector3 offset) 4730 public LSL_Vector llGroundSlope(LSL_Vector offset)
4664 { 4731 {
4665 m_host.AddScriptLPS(1); 4732 m_host.AddScriptLPS(1);
4666 4733
@@ -4670,15 +4737,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4670 4737
4671 Vector3 p0 = new Vector3(pos.X, pos.Y, 4738 Vector3 p0 = new Vector3(pos.X, pos.Y,
4672 (float)llGround( 4739 (float)llGround(
4673 new LSL_Types.Vector3(pos.X, pos.Y, pos.Z) 4740 new LSL_Vector(pos.X, pos.Y, pos.Z)
4674 )); 4741 ));
4675 Vector3 p1 = new Vector3(pos.X + 1, pos.Y, 4742 Vector3 p1 = new Vector3(pos.X + 1, pos.Y,
4676 (float)llGround( 4743 (float)llGround(
4677 new LSL_Types.Vector3(pos.X + 1, pos.Y, pos.Z) 4744 new LSL_Vector(pos.X + 1, pos.Y, pos.Z)
4678 )); 4745 ));
4679 Vector3 p2 = new Vector3(pos.X, pos.Y + 1, 4746 Vector3 p2 = new Vector3(pos.X, pos.Y + 1,
4680 (float)llGround( 4747 (float)llGround(
4681 new LSL_Types.Vector3(pos.X, pos.Y + 1, pos.Z) 4748 new LSL_Vector(pos.X, pos.Y + 1, pos.Z)
4682 )); 4749 ));
4683 4750
4684 Vector3 v0 = new Vector3( 4751 Vector3 v0 = new Vector3(
@@ -4694,50 +4761,50 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4694 tv.Y = (v0.Z * v1.X) - (v0.X * v1.Z); 4761 tv.Y = (v0.Z * v1.X) - (v0.X * v1.Z);
4695 tv.Z = (v0.X * v1.Y) - (v0.Y * v1.X); 4762 tv.Z = (v0.X * v1.Y) - (v0.Y * v1.X);
4696 4763
4697 return new LSL_Types.Vector3(tv.X, tv.Y, tv.Z); 4764 return new LSL_Vector(tv.X, tv.Y, tv.Z);
4698 } 4765 }
4699 4766
4700 public LSL_Types.Vector3 llGroundNormal(LSL_Types.Vector3 offset) 4767 public LSL_Vector llGroundNormal(LSL_Vector offset)
4701 { 4768 {
4702 m_host.AddScriptLPS(1); 4769 m_host.AddScriptLPS(1);
4703 LSL_Types.Vector3 x = llGroundSlope(offset); 4770 LSL_Vector x = llGroundSlope(offset);
4704 return new LSL_Types.Vector3(x.x, x.y, 1.0); 4771 return new LSL_Vector(x.x, x.y, 1.0);
4705 } 4772 }
4706 4773
4707 public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) 4774 public LSL_Vector llGroundContour(LSL_Vector offset)
4708 { 4775 {
4709 m_host.AddScriptLPS(1); 4776 m_host.AddScriptLPS(1);
4710 LSL_Types.Vector3 x = llGroundSlope(offset); 4777 LSL_Vector x = llGroundSlope(offset);
4711 return new LSL_Types.Vector3(-x.y, x.x, 0.0); 4778 return new LSL_Vector(-x.y, x.x, 0.0);
4712 } 4779 }
4713 4780
4714 public LSL_Types.LSLInteger llGetAttached() 4781 public LSL_Integer llGetAttached()
4715 { 4782 {
4716 m_host.AddScriptLPS(1); 4783 m_host.AddScriptLPS(1);
4717 NotImplemented("llGetAttached"); 4784 NotImplemented("llGetAttached");
4718 return 0; 4785 return 0;
4719 } 4786 }
4720 4787
4721 public LSL_Types.LSLInteger llGetFreeMemory() 4788 public LSL_Integer llGetFreeMemory()
4722 { 4789 {
4723 m_host.AddScriptLPS(1); 4790 m_host.AddScriptLPS(1);
4724 // Make scripts designed for LSO happy 4791 // Make scripts designed for LSO happy
4725 return 16384; 4792 return 16384;
4726 } 4793 }
4727 4794
4728 public LSL_Types.LSLString llGetRegionName() 4795 public LSL_String llGetRegionName()
4729 { 4796 {
4730 m_host.AddScriptLPS(1); 4797 m_host.AddScriptLPS(1);
4731 return World.RegionInfo.RegionName; 4798 return World.RegionInfo.RegionName;
4732 } 4799 }
4733 4800
4734 public LSL_Types.LSLFloat llGetRegionTimeDilation() 4801 public LSL_Float llGetRegionTimeDilation()
4735 { 4802 {
4736 m_host.AddScriptLPS(1); 4803 m_host.AddScriptLPS(1);
4737 return (double)World.TimeDilation; 4804 return (double)World.TimeDilation;
4738 } 4805 }
4739 4806
4740 public LSL_Types.LSLFloat llGetRegionFPS() 4807 public LSL_Float llGetRegionFPS()
4741 { 4808 {
4742 m_host.AddScriptLPS(1); 4809 m_host.AddScriptLPS(1);
4743 //TODO: return actual FPS 4810 //TODO: return actual FPS
@@ -4803,7 +4870,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4803 return ps; 4870 return ps;
4804 } 4871 }
4805 4872
4806 public void llParticleSystem(LSL_Types.list rules) 4873 public void llParticleSystem(LSL_List rules)
4807 { 4874 {
4808 m_host.AddScriptLPS(1); 4875 m_host.AddScriptLPS(1);
4809 if (rules.Length == 0) 4876 if (rules.Length == 0)
@@ -4814,7 +4881,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4814 else 4881 else
4815 { 4882 {
4816 Primitive.ParticleSystem prules = getNewParticleSystemWithSLDefaultValues(); 4883 Primitive.ParticleSystem prules = getNewParticleSystemWithSLDefaultValues();
4817 LSL_Types.Vector3 tempv = new LSL_Types.Vector3(); 4884 LSL_Vector tempv = new LSL_Vector();
4818 4885
4819 float tempf = 0; 4886 float tempf = 0;
4820 4887
@@ -4968,7 +5035,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4968 return UUID.Zero; 5035 return UUID.Zero;
4969 } 5036 }
4970 5037
4971 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 5038 public void llGiveInventoryList(string destination, string category, LSL_List inventory)
4972 { 5039 {
4973 m_host.AddScriptLPS(1); 5040 m_host.AddScriptLPS(1);
4974 5041
@@ -5017,13 +5084,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5017 NotImplemented("llSetVehicleFloatParam"); 5084 NotImplemented("llSetVehicleFloatParam");
5018 } 5085 }
5019 5086
5020 public void llSetVehicleVectorParam(int param, LSL_Types.Vector3 vec) 5087 public void llSetVehicleVectorParam(int param, LSL_Vector vec)
5021 { 5088 {
5022 m_host.AddScriptLPS(1); 5089 m_host.AddScriptLPS(1);
5023 NotImplemented("llSetVehicleVectorParam"); 5090 NotImplemented("llSetVehicleVectorParam");
5024 } 5091 }
5025 5092
5026 public void llSetVehicleRotationParam(int param, LSL_Types.Quaternion rot) 5093 public void llSetVehicleRotationParam(int param, LSL_Rotation rot)
5027 { 5094 {
5028 m_host.AddScriptLPS(1); 5095 m_host.AddScriptLPS(1);
5029 NotImplemented("llSetVehicleRotationParam"); 5096 NotImplemented("llSetVehicleRotationParam");
@@ -5041,7 +5108,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5041 NotImplemented("llRemoveVehicleFlags"); 5108 NotImplemented("llRemoveVehicleFlags");
5042 } 5109 }
5043 5110
5044 public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) 5111 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
5045 { 5112 {
5046 m_host.AddScriptLPS(1); 5113 m_host.AddScriptLPS(1);
5047 // LSL quaternions can normalize to 0, normal Quaternions can't. 5114 // LSL quaternions can normalize to 0, normal Quaternions can't.
@@ -5052,7 +5119,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5052 m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); 5119 m_host.SitTargetOrientation = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
5053 } 5120 }
5054 5121
5055 public LSL_Types.LSLString llAvatarOnSitTarget() 5122 public LSL_String llAvatarOnSitTarget()
5056 { 5123 {
5057 m_host.AddScriptLPS(1); 5124 m_host.AddScriptLPS(1);
5058 return m_host.GetAvatarOnSitTarget().ToString(); 5125 return m_host.GetAvatarOnSitTarget().ToString();
@@ -5089,19 +5156,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5089 m_host.SitName = text; 5156 m_host.SitName = text;
5090 } 5157 }
5091 5158
5092 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) 5159 public void llSetCameraEyeOffset(LSL_Vector offset)
5093 { 5160 {
5094 m_host.AddScriptLPS(1); 5161 m_host.AddScriptLPS(1);
5095 m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z)); 5162 m_host.SetCameraEyeOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
5096 } 5163 }
5097 5164
5098 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) 5165 public void llSetCameraAtOffset(LSL_Vector offset)
5099 { 5166 {
5100 m_host.AddScriptLPS(1); 5167 m_host.AddScriptLPS(1);
5101 m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z)); 5168 m_host.SetCameraAtOffset(new Vector3((float)offset.x, (float)offset.y, (float)offset.z));
5102 } 5169 }
5103 5170
5104 public LSL_Types.LSLString llDumpList2String(LSL_Types.list src, string seperator) 5171 public LSL_String llDumpList2String(LSL_List src, string seperator)
5105 { 5172 {
5106 m_host.AddScriptLPS(1); 5173 m_host.AddScriptLPS(1);
5107 if (src.Length == 0) 5174 if (src.Length == 0)
@@ -5117,7 +5184,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5117 return ret; 5184 return ret;
5118 } 5185 }
5119 5186
5120 public LSL_Types.LSLInteger llScriptDanger(LSL_Types.Vector3 pos) 5187 public LSL_Integer llScriptDanger(LSL_Vector pos)
5121 { 5188 {
5122 m_host.AddScriptLPS(1); 5189 m_host.AddScriptLPS(1);
5123 bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z)); 5190 bool result = World.scriptDanger(m_host.LocalId, new Vector3((float)pos.x, (float)pos.y, (float)pos.z));
@@ -5132,7 +5199,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5132 5199
5133 } 5200 }
5134 5201
5135 public void llDialog(string avatar, string message, LSL_Types.list buttons, int chat_channel) 5202 public void llDialog(string avatar, string message, LSL_List buttons, int chat_channel)
5136 { 5203 {
5137 m_host.AddScriptLPS(1); 5204 m_host.AddScriptLPS(1);
5138 UUID av = new UUID(); 5205 UUID av = new UUID();
@@ -5188,7 +5255,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5188 ShoutError("llResetOtherScript: script "+name+" not found"); 5255 ShoutError("llResetOtherScript: script "+name+" not found");
5189 } 5256 }
5190 5257
5191 public LSL_Types.LSLInteger llGetScriptState(string name) 5258 public LSL_Integer llGetScriptState(string name)
5192 { 5259 {
5193 UUID item; 5260 UUID item;
5194 5261
@@ -5273,7 +5340,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5273 if (xmlrpcMod.IsEnabled()) 5340 if (xmlrpcMod.IsEnabled())
5274 { 5341 {
5275 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero); 5342 UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_localID, m_itemID, UUID.Zero);
5276 object[] resobj = new object[] { new LSL_Types.LSLInteger(1), new LSL_Types.LSLString(channelID.ToString()), new LSL_Types.LSLString(UUID.Zero.ToString()), new LSL_Types.LSLString(String.Empty), new LSL_Types.LSLInteger(0), new LSL_Types.LSLString(String.Empty) }; 5343 object[] resobj = new object[] { new LSL_Integer(1), new LSL_String(channelID.ToString()), new LSL_String(UUID.Zero.ToString()), new LSL_String(String.Empty), new LSL_Integer(0), new LSL_String(String.Empty) };
5277 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams( 5344 m_ScriptEngine.PostScriptEvent(m_itemID, new EventParams(
5278 "remote_data", resobj, 5345 "remote_data", resobj,
5279 new DetectParams[0])); 5346 new DetectParams[0]));
@@ -5281,7 +5348,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5281 // ScriptSleep(1000); 5348 // ScriptSleep(1000);
5282 } 5349 }
5283 5350
5284 public LSL_Types.LSLString llSendRemoteData(string channel, string dest, int idata, string sdata) 5351 public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata)
5285 { 5352 {
5286 m_host.AddScriptLPS(1); 5353 m_host.AddScriptLPS(1);
5287 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 5354 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
@@ -5305,13 +5372,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5305 // ScriptSleep(1000); 5372 // ScriptSleep(1000);
5306 } 5373 }
5307 5374
5308 public LSL_Types.LSLString llMD5String(string src, int nonce) 5375 public LSL_String llMD5String(string src, int nonce)
5309 { 5376 {
5310 m_host.AddScriptLPS(1); 5377 m_host.AddScriptLPS(1);
5311 return Util.Md5Hash(src + ":" + nonce.ToString()); 5378 return Util.Md5Hash(src + ":" + nonce.ToString());
5312 } 5379 }
5313 5380
5314 private ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist) 5381 private ObjectShapePacket.ObjectDataBlock SetPrimitiveBlockShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist)
5315 { 5382 {
5316 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock(); 5383 ObjectShapePacket.ObjectDataBlock shapeBlock = new ObjectShapePacket.ObjectDataBlock();
5317 5384
@@ -5381,7 +5448,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5381 return shapeBlock; 5448 return shapeBlock;
5382 } 5449 }
5383 5450
5384 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 taper_b, LSL_Types.Vector3 topshear, byte fudge) 5451 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector taper_b, LSL_Vector topshear, byte fudge)
5385 { 5452 {
5386 ObjectShapePacket.ObjectDataBlock shapeBlock; 5453 ObjectShapePacket.ObjectDataBlock shapeBlock;
5387 5454
@@ -5429,7 +5496,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5429 part.UpdateShape(shapeBlock); 5496 part.UpdateShape(shapeBlock);
5430 } 5497 }
5431 5498
5432 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 dimple, byte fudge) 5499 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector dimple, byte fudge)
5433 { 5500 {
5434 ObjectShapePacket.ObjectDataBlock shapeBlock; 5501 ObjectShapePacket.ObjectDataBlock shapeBlock;
5435 5502
@@ -5470,7 +5537,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5470 part.UpdateShape(shapeBlock); 5537 part.UpdateShape(shapeBlock);
5471 } 5538 }
5472 5539
5473 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Types.Vector3 cut, float hollow, LSL_Types.Vector3 twist, LSL_Types.Vector3 holesize, LSL_Types.Vector3 topshear, LSL_Types.Vector3 profilecut, LSL_Types.Vector3 taper_a, float revolutions, float radiusoffset, float skew, byte fudge) 5540 private void SetPrimitiveShapeParams(SceneObjectPart part, int holeshape, LSL_Vector cut, float hollow, LSL_Vector twist, LSL_Vector holesize, LSL_Vector topshear, LSL_Vector profilecut, LSL_Vector taper_a, float revolutions, float radiusoffset, float skew, byte fudge)
5474 { 5541 {
5475 ObjectShapePacket.ObjectDataBlock shapeBlock; 5542 ObjectShapePacket.ObjectDataBlock shapeBlock;
5476 5543
@@ -5622,12 +5689,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5622 part.UpdateShape(shapeBlock); 5689 part.UpdateShape(shapeBlock);
5623 } 5690 }
5624 5691
5625 public void llSetPrimitiveParams(LSL_Types.list rules) 5692 public void llSetPrimitiveParams(LSL_List rules)
5626 { 5693 {
5627 SetPrimParams(m_host, rules); 5694 SetPrimParams(m_host, rules);
5628 } 5695 }
5629 5696
5630 public void llSetLinkPrimitiveParams(int linknumber, LSL_Types.list rules) 5697 public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules)
5631 { 5698 {
5632 m_host.AddScriptLPS(1); 5699 m_host.AddScriptLPS(1);
5633 5700
@@ -5637,7 +5704,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5637 SetPrimParams(part, rules); 5704 SetPrimParams(part, rules);
5638 } 5705 }
5639 5706
5640 private void SetPrimParams(SceneObjectPart part, LSL_Types.list rules) 5707 private void SetPrimParams(SceneObjectPart part, LSL_List rules)
5641 { 5708 {
5642 int idx = 0; 5709 int idx = 0;
5643 5710
@@ -5648,7 +5715,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5648 int remain = rules.Length - idx; 5715 int remain = rules.Length - idx;
5649 5716
5650 int face; 5717 int face;
5651 LSL_Types.Vector3 v; 5718 LSL_Vector v;
5652 5719
5653 switch (code) 5720 switch (code)
5654 { 5721 {
@@ -5672,7 +5739,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5672 if (remain < 1) 5739 if (remain < 1)
5673 return; 5740 return;
5674 5741
5675 LSL_Types.Quaternion q = rules.GetQuaternionItem(idx++); 5742 LSL_Rotation q = rules.GetQuaternionItem(idx++);
5676 SetRot(part, q); 5743 SetRot(part, q);
5677 5744
5678 break; 5745 break;
@@ -5685,14 +5752,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5685 5752
5686 remain = rules.Length - idx; 5753 remain = rules.Length - idx;
5687 float hollow; 5754 float hollow;
5688 LSL_Types.Vector3 twist; 5755 LSL_Vector twist;
5689 LSL_Types.Vector3 taper_b; 5756 LSL_Vector taper_b;
5690 LSL_Types.Vector3 topshear; 5757 LSL_Vector topshear;
5691 float revolutions; 5758 float revolutions;
5692 float radiusoffset; 5759 float radiusoffset;
5693 float skew; 5760 float skew;
5694 LSL_Types.Vector3 holesize; 5761 LSL_Vector holesize;
5695 LSL_Types.Vector3 profilecut; 5762 LSL_Vector profilecut;
5696 5763
5697 switch (code) 5764 switch (code)
5698 { 5765 {
@@ -5829,8 +5896,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5829 5896
5830 face=(int)rules.GetLSLIntegerItem(idx++); 5897 face=(int)rules.GetLSLIntegerItem(idx++);
5831 string tex=rules.Data[idx++].ToString(); 5898 string tex=rules.Data[idx++].ToString();
5832 LSL_Types.Vector3 repeats=rules.GetVector3Item(idx++); 5899 LSL_Vector repeats=rules.GetVector3Item(idx++);
5833 LSL_Types.Vector3 offsets=rules.GetVector3Item(idx++); 5900 LSL_Vector offsets=rules.GetVector3Item(idx++);
5834 double rotation=(double)rules.GetLSLFloatItem(idx++); 5901 double rotation=(double)rules.GetLSLFloatItem(idx++);
5835 5902
5836 SetTexture(part, tex, face); 5903 SetTexture(part, tex, face);
@@ -5845,7 +5912,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5845 return; 5912 return;
5846 5913
5847 face=(int)rules.GetLSLIntegerItem(idx++); 5914 face=(int)rules.GetLSLIntegerItem(idx++);
5848 LSL_Types.Vector3 color=rules.GetVector3Item(idx++); 5915 LSL_Vector color=rules.GetVector3Item(idx++);
5849 double alpha=(double)rules.GetLSLFloatItem(idx++); 5916 double alpha=(double)rules.GetLSLFloatItem(idx++);
5850 5917
5851 SetColor(part, color, face); 5918 SetColor(part, color, face);
@@ -5862,7 +5929,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5862 float friction = (float)rules.GetLSLFloatItem(idx++); 5929 float friction = (float)rules.GetLSLFloatItem(idx++);
5863 float wind = (float)rules.GetLSLFloatItem(idx++); 5930 float wind = (float)rules.GetLSLFloatItem(idx++);
5864 float tension = (float)rules.GetLSLFloatItem(idx++); 5931 float tension = (float)rules.GetLSLFloatItem(idx++);
5865 LSL_Types.Vector3 force = rules.GetVector3Item(idx++); 5932 LSL_Vector force = rules.GetVector3Item(idx++);
5866 5933
5867 SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force); 5934 SetFlexi(part, flexi, softness, gravity, friction, wind, tension, force);
5868 5935
@@ -5871,7 +5938,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5871 if (remain < 5) 5938 if (remain < 5)
5872 return; 5939 return;
5873 bool light = rules.GetLSLIntegerItem(idx++); 5940 bool light = rules.GetLSLIntegerItem(idx++);
5874 LSL_Types.Vector3 lightcolor = rules.GetVector3Item(idx++); 5941 LSL_Vector lightcolor = rules.GetVector3Item(idx++);
5875 float intensity = (float)rules.GetLSLFloatItem(idx++); 5942 float intensity = (float)rules.GetLSLFloatItem(idx++);
5876 float radius = (float)rules.GetLSLFloatItem(idx++); 5943 float radius = (float)rules.GetLSLFloatItem(idx++);
5877 float falloff = (float)rules.GetLSLFloatItem(idx++); 5944 float falloff = (float)rules.GetLSLFloatItem(idx++);
@@ -5951,7 +6018,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5951 } 6018 }
5952 } 6019 }
5953 6020
5954 public LSL_Types.LSLString llStringToBase64(string str) 6021 public LSL_String llStringToBase64(string str)
5955 { 6022 {
5956 m_host.AddScriptLPS(1); 6023 m_host.AddScriptLPS(1);
5957 try 6024 try
@@ -5967,7 +6034,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5967 } 6034 }
5968 } 6035 }
5969 6036
5970 public LSL_Types.LSLString llBase64ToString(string str) 6037 public LSL_String llBase64ToString(string str)
5971 { 6038 {
5972 m_host.AddScriptLPS(1); 6039 m_host.AddScriptLPS(1);
5973 UTF8Encoding encoder = new UTF8Encoding(); 6040 UTF8Encoding encoder = new UTF8Encoding();
@@ -6000,23 +6067,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6000 NotImplemented("llRemoteDataSetRegion"); 6067 NotImplemented("llRemoteDataSetRegion");
6001 } 6068 }
6002 6069
6003 public LSL_Types.LSLFloat llLog10(double val) 6070 public LSL_Float llLog10(double val)
6004 { 6071 {
6005 m_host.AddScriptLPS(1); 6072 m_host.AddScriptLPS(1);
6006 return (double)Math.Log10(val); 6073 return (double)Math.Log10(val);
6007 } 6074 }
6008 6075
6009 public LSL_Types.LSLFloat llLog(double val) 6076 public LSL_Float llLog(double val)
6010 { 6077 {
6011 m_host.AddScriptLPS(1); 6078 m_host.AddScriptLPS(1);
6012 return (double)Math.Log(val); 6079 return (double)Math.Log(val);
6013 } 6080 }
6014 6081
6015 public LSL_Types.list llGetAnimationList( string id ) 6082 public LSL_List llGetAnimationList( string id )
6016 { 6083 {
6017 m_host.AddScriptLPS(1); 6084 m_host.AddScriptLPS(1);
6018 6085
6019 LSL_Types.list l = new LSL_Types.list(); 6086 LSL_List l = new LSL_List();
6020 ScenePresence av = World.GetScenePresence(id); 6087 ScenePresence av = World.GetScenePresence(id);
6021 if (av == null) 6088 if (av == null)
6022 return l; 6089 return l;
@@ -6043,19 +6110,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6043 // ScriptSleep(2000); 6110 // ScriptSleep(2000);
6044 } 6111 }
6045 6112
6046 public LSL_Types.Vector3 llGetRootPosition() 6113 public LSL_Vector llGetRootPosition()
6047 { 6114 {
6048 m_host.AddScriptLPS(1); 6115 m_host.AddScriptLPS(1);
6049 return new LSL_Types.Vector3(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, m_host.ParentGroup.AbsolutePosition.Z); 6116 return new LSL_Vector(m_host.ParentGroup.AbsolutePosition.X, m_host.ParentGroup.AbsolutePosition.Y, m_host.ParentGroup.AbsolutePosition.Z);
6050 } 6117 }
6051 6118
6052 public LSL_Types.Quaternion llGetRootRotation() 6119 public LSL_Rotation llGetRootRotation()
6053 { 6120 {
6054 m_host.AddScriptLPS(1); 6121 m_host.AddScriptLPS(1);
6055 return new LSL_Types.Quaternion(m_host.ParentGroup.GroupRotation.X, m_host.ParentGroup.GroupRotation.Y, m_host.ParentGroup.GroupRotation.Z, m_host.ParentGroup.GroupRotation.W); 6122 return new LSL_Rotation(m_host.ParentGroup.GroupRotation.X, m_host.ParentGroup.GroupRotation.Y, m_host.ParentGroup.GroupRotation.Z, m_host.ParentGroup.GroupRotation.W);
6056 } 6123 }
6057 6124
6058 public LSL_Types.LSLString llGetObjectDesc() 6125 public LSL_String llGetObjectDesc()
6059 { 6126 {
6060 return m_host.Description!=null?m_host.Description:String.Empty; 6127 return m_host.Description!=null?m_host.Description:String.Empty;
6061 } 6128 }
@@ -6066,13 +6133,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6066 m_host.Description = desc!=null?desc:String.Empty; 6133 m_host.Description = desc!=null?desc:String.Empty;
6067 } 6134 }
6068 6135
6069 public LSL_Types.LSLString llGetCreator() 6136 public LSL_String llGetCreator()
6070 { 6137 {
6071 m_host.AddScriptLPS(1); 6138 m_host.AddScriptLPS(1);
6072 return m_host.ObjectCreator.ToString(); 6139 return m_host.ObjectCreator.ToString();
6073 } 6140 }
6074 6141
6075 public LSL_Types.LSLString llGetTimestamp() 6142 public LSL_String llGetTimestamp()
6076 { 6143 {
6077 m_host.AddScriptLPS(1); 6144 m_host.AddScriptLPS(1);
6078 return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); 6145 return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
@@ -6156,29 +6223,29 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6156 } 6223 }
6157 } 6224 }
6158 6225
6159 public LSL_Types.LSLInteger llGetNumberOfPrims() 6226 public LSL_Integer llGetNumberOfPrims()
6160 { 6227 {
6161 m_host.AddScriptLPS(1); 6228 m_host.AddScriptLPS(1);
6162 return m_host.ParentGroup.PrimCount; 6229 return m_host.ParentGroup.PrimCount;
6163 } 6230 }
6164 6231
6165 public LSL_Types.list llGetBoundingBox(string obj) 6232 public LSL_List llGetBoundingBox(string obj)
6166 { 6233 {
6167 m_host.AddScriptLPS(1); 6234 m_host.AddScriptLPS(1);
6168 NotImplemented("llGetBoundingBox"); 6235 NotImplemented("llGetBoundingBox");
6169 return new LSL_Types.list(); 6236 return new LSL_List();
6170 } 6237 }
6171 6238
6172 public LSL_Types.Vector3 llGetGeometricCenter() 6239 public LSL_Vector llGetGeometricCenter()
6173 { 6240 {
6174 return new LSL_Types.Vector3(m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z); 6241 return new LSL_Vector(m_host.GetGeometricCenter().X, m_host.GetGeometricCenter().Y, m_host.GetGeometricCenter().Z);
6175 } 6242 }
6176 6243
6177 public LSL_Types.list llGetPrimitiveParams(LSL_Types.list rules) 6244 public LSL_List llGetPrimitiveParams(LSL_List rules)
6178 { 6245 {
6179 m_host.AddScriptLPS(1); 6246 m_host.AddScriptLPS(1);
6180 6247
6181 LSL_Types.list res = new LSL_Types.list(); 6248 LSL_List res = new LSL_List();
6182 int idx=0; 6249 int idx=0;
6183 while (idx < rules.Length) 6250 while (idx < rules.Length)
6184 { 6251 {
@@ -6188,44 +6255,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6188 switch (code) 6255 switch (code)
6189 { 6256 {
6190 case (int)ScriptBaseClass.PRIM_MATERIAL: 6257 case (int)ScriptBaseClass.PRIM_MATERIAL:
6191 res.Add(new LSL_Types.LSLInteger(m_host.Material)); 6258 res.Add(new LSL_Integer(m_host.Material));
6192 break; 6259 break;
6193 6260
6194 case (int)ScriptBaseClass.PRIM_PHYSICS: 6261 case (int)ScriptBaseClass.PRIM_PHYSICS:
6195 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0) 6262 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) != 0)
6196 res.Add(new LSL_Types.LSLInteger(1)); 6263 res.Add(new LSL_Integer(1));
6197 else 6264 else
6198 res.Add(new LSL_Types.LSLInteger(0)); 6265 res.Add(new LSL_Integer(0));
6199 break; 6266 break;
6200 6267
6201 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ: 6268 case (int)ScriptBaseClass.PRIM_TEMP_ON_REZ:
6202 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0) 6269 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) != 0)
6203 res.Add(new LSL_Types.LSLInteger(1)); 6270 res.Add(new LSL_Integer(1));
6204 else 6271 else
6205 res.Add(new LSL_Types.LSLInteger(0)); 6272 res.Add(new LSL_Integer(0));
6206 break; 6273 break;
6207 6274
6208 case (int)ScriptBaseClass.PRIM_PHANTOM: 6275 case (int)ScriptBaseClass.PRIM_PHANTOM:
6209 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0) 6276 if ((m_host.GetEffectiveObjectFlags() & (uint)PrimFlags.Phantom) != 0)
6210 res.Add(new LSL_Types.LSLInteger(1)); 6277 res.Add(new LSL_Integer(1));
6211 else 6278 else
6212 res.Add(new LSL_Types.LSLInteger(0)); 6279 res.Add(new LSL_Integer(0));
6213 break; 6280 break;
6214 6281
6215 case (int)ScriptBaseClass.PRIM_POSITION: 6282 case (int)ScriptBaseClass.PRIM_POSITION:
6216 res.Add(new LSL_Types.Vector3(m_host.AbsolutePosition.X, 6283 res.Add(new LSL_Vector(m_host.AbsolutePosition.X,
6217 m_host.AbsolutePosition.Y, 6284 m_host.AbsolutePosition.Y,
6218 m_host.AbsolutePosition.Z)); 6285 m_host.AbsolutePosition.Z));
6219 break; 6286 break;
6220 6287
6221 case (int)ScriptBaseClass.PRIM_SIZE: 6288 case (int)ScriptBaseClass.PRIM_SIZE:
6222 res.Add(new LSL_Types.Vector3(m_host.Scale.X, 6289 res.Add(new LSL_Vector(m_host.Scale.X,
6223 m_host.Scale.Y, 6290 m_host.Scale.Y,
6224 m_host.Scale.Z)); 6291 m_host.Scale.Z));
6225 break; 6292 break;
6226 6293
6227 case (int)ScriptBaseClass.PRIM_ROTATION: 6294 case (int)ScriptBaseClass.PRIM_ROTATION:
6228 res.Add(new LSL_Types.Quaternion(m_host.RotationOffset.X, 6295 res.Add(new LSL_Rotation(m_host.RotationOffset.X,
6229 m_host.RotationOffset.Y, 6296 m_host.RotationOffset.Y,
6230 m_host.RotationOffset.Z, 6297 m_host.RotationOffset.Z,
6231 m_host.RotationOffset.W)); 6298 m_host.RotationOffset.W));
@@ -6235,69 +6302,69 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6235 // implementing box 6302 // implementing box
6236 PrimitiveBaseShape Shape = m_host.Shape; 6303 PrimitiveBaseShape Shape = m_host.Shape;
6237 int primType = getScriptPrimType(m_host.Shape); 6304 int primType = getScriptPrimType(m_host.Shape);
6238 res.Add(new LSL_Types.LSLInteger(primType)); 6305 res.Add(new LSL_Integer(primType));
6239 switch (primType) 6306 switch (primType)
6240 { 6307 {
6241 case ScriptBaseClass.PRIM_TYPE_BOX: 6308 case ScriptBaseClass.PRIM_TYPE_BOX:
6242 case ScriptBaseClass.PRIM_TYPE_CYLINDER: 6309 case ScriptBaseClass.PRIM_TYPE_CYLINDER:
6243 case ScriptBaseClass.PRIM_TYPE_PRISM: 6310 case ScriptBaseClass.PRIM_TYPE_PRISM:
6244 res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); 6311 res.Add(new LSL_Integer(Shape.ProfileCurve));
6245 res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); 6312 res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0));
6246 res.Add(new LSL_Types.LSLFloat(Shape.ProfileHollow / 50000.0)); 6313 res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0));
6247 res.Add(new LSL_Types.Vector3(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); 6314 res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0));
6248 res.Add(new LSL_Types.Vector3(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); 6315 res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0));
6249 res.Add(new LSL_Types.Vector3(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); 6316 res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0));
6250 break; 6317 break;
6251 6318
6252 case ScriptBaseClass.PRIM_TYPE_SPHERE: 6319 case ScriptBaseClass.PRIM_TYPE_SPHERE:
6253 res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); 6320 res.Add(new LSL_Integer(Shape.ProfileCurve));
6254 res.Add(new LSL_Types.Vector3(Shape.PathBegin / 50000.0, 1 - Shape.PathEnd / 50000.0, 0)); 6321 res.Add(new LSL_Vector(Shape.PathBegin / 50000.0, 1 - Shape.PathEnd / 50000.0, 0));
6255 res.Add(new LSL_Types.LSLFloat(Shape.ProfileHollow / 50000.0)); 6322 res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0));
6256 res.Add(new LSL_Types.Vector3(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); 6323 res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0));
6257 res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); 6324 res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0));
6258 break; 6325 break;
6259 6326
6260 case ScriptBaseClass.PRIM_TYPE_SCULPT: 6327 case ScriptBaseClass.PRIM_TYPE_SCULPT:
6261 res.Add(Shape.SculptTexture.ToString()); 6328 res.Add(Shape.SculptTexture.ToString());
6262 res.Add(new LSL_Types.LSLInteger(Shape.SculptType)); 6329 res.Add(new LSL_Integer(Shape.SculptType));
6263 break; 6330 break;
6264 6331
6265 case ScriptBaseClass.PRIM_TYPE_RING: 6332 case ScriptBaseClass.PRIM_TYPE_RING:
6266 case ScriptBaseClass.PRIM_TYPE_TUBE: 6333 case ScriptBaseClass.PRIM_TYPE_TUBE:
6267 case ScriptBaseClass.PRIM_TYPE_TORUS: 6334 case ScriptBaseClass.PRIM_TYPE_TORUS:
6268 // holeshape 6335 // holeshape
6269 res.Add(new LSL_Types.LSLInteger(Shape.ProfileCurve)); 6336 res.Add(new LSL_Integer(Shape.ProfileCurve));
6270 6337
6271 // cut 6338 // cut
6272 res.Add(new LSL_Types.Vector3(Shape.PathBegin / 50000.0, 1 - Shape.PathEnd / 50000.0, 0)); 6339 res.Add(new LSL_Vector(Shape.PathBegin / 50000.0, 1 - Shape.PathEnd / 50000.0, 0));
6273 6340
6274 // hollow 6341 // hollow
6275 res.Add(new LSL_Types.LSLFloat(Shape.ProfileHollow / 50000.0)); 6342 res.Add(new LSL_Float(Shape.ProfileHollow / 50000.0));
6276 6343
6277 // twist 6344 // twist
6278 res.Add(new LSL_Types.Vector3(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0)); 6345 res.Add(new LSL_Vector(Shape.PathTwistBegin / 100.0, Shape.PathTwist / 100.0, 0));
6279 6346
6280 // vector holesize 6347 // vector holesize
6281 res.Add(new LSL_Types.Vector3(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0)); 6348 res.Add(new LSL_Vector(1 - (Shape.PathScaleX / 100.0 - 1), 1 - (Shape.PathScaleY / 100.0 - 1), 0));
6282 6349
6283 // vector topshear 6350 // vector topshear
6284 res.Add(new LSL_Types.Vector3(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0)); 6351 res.Add(new LSL_Vector(Shape.PathShearX / 100.0, Shape.PathShearY / 100.0, 0));
6285 6352
6286 // vector profilecut 6353 // vector profilecut
6287 res.Add(new LSL_Types.Vector3(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0)); 6354 res.Add(new LSL_Vector(Shape.ProfileBegin / 50000.0, 1 - Shape.ProfileEnd / 50000.0, 0));
6288 6355
6289 6356
6290 // vector tapera 6357 // vector tapera
6291 res.Add(new LSL_Types.Vector3(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0)); 6358 res.Add(new LSL_Vector(Shape.PathTaperX / 100.0, Shape.PathTaperY / 100.0, 0));
6292 6359
6293 // float revolutions, 6360 // float revolutions,
6294 res.Add(new LSL_Types.LSLFloat(Shape.PathRevolutions / 50.0)); // needs fixing :( 6361 res.Add(new LSL_Float(Shape.PathRevolutions / 50.0)); // needs fixing :(
6295 6362
6296 // float radiusoffset, 6363 // float radiusoffset,
6297 res.Add(new LSL_Types.LSLFloat(Shape.PathRadiusOffset / 100.0)); 6364 res.Add(new LSL_Float(Shape.PathRadiusOffset / 100.0));
6298 6365
6299 // float skew 6366 // float skew
6300 res.Add(new LSL_Types.LSLFloat(Shape.PathSkew / 100.0)); 6367 res.Add(new LSL_Float(Shape.PathSkew / 100.0));
6301 break; 6368 break;
6302 6369
6303 } 6370 }
@@ -6315,14 +6382,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6315 { 6382 {
6316 Primitive.TextureEntryFace texface = tex.GetFace((uint)face); 6383 Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
6317 6384
6318 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); 6385 res.Add(new LSL_String(texface.TextureID.ToString()));
6319 res.Add(new LSL_Types.Vector3(texface.RepeatU, 6386 res.Add(new LSL_Vector(texface.RepeatU,
6320 texface.RepeatV, 6387 texface.RepeatV,
6321 0)); 6388 0));
6322 res.Add(new LSL_Types.Vector3(texface.OffsetU, 6389 res.Add(new LSL_Vector(texface.OffsetU,
6323 texface.OffsetV, 6390 texface.OffsetV,
6324 0)); 6391 0));
6325 res.Add(new LSL_Types.LSLFloat(texface.Rotation)); 6392 res.Add(new LSL_Float(texface.Rotation));
6326 } 6393 }
6327 } 6394 }
6328 else 6395 else
@@ -6331,14 +6398,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6331 { 6398 {
6332 Primitive.TextureEntryFace texface = tex.GetFace((uint)face); 6399 Primitive.TextureEntryFace texface = tex.GetFace((uint)face);
6333 6400
6334 res.Add(new LSL_Types.LSLString(texface.TextureID.ToString())); 6401 res.Add(new LSL_String(texface.TextureID.ToString()));
6335 res.Add(new LSL_Types.Vector3(texface.RepeatU, 6402 res.Add(new LSL_Vector(texface.RepeatU,
6336 texface.RepeatV, 6403 texface.RepeatV,
6337 0)); 6404 0));
6338 res.Add(new LSL_Types.Vector3(texface.OffsetU, 6405 res.Add(new LSL_Vector(texface.OffsetU,
6339 texface.OffsetV, 6406 texface.OffsetV,
6340 0)); 6407 0));
6341 res.Add(new LSL_Types.LSLFloat(texface.Rotation)); 6408 res.Add(new LSL_Float(texface.Rotation));
6342 } 6409 }
6343 } 6410 }
6344 break; 6411 break;
@@ -6356,19 +6423,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6356 for (face = 0 ; face < GetNumberOfSides(m_host) ; face++) 6423 for (face = 0 ; face < GetNumberOfSides(m_host) ; face++)
6357 { 6424 {
6358 texcolor = tex.GetFace((uint)face).RGBA; 6425 texcolor = tex.GetFace((uint)face).RGBA;
6359 res.Add(new LSL_Types.Vector3(texcolor.R, 6426 res.Add(new LSL_Vector(texcolor.R,
6360 texcolor.G, 6427 texcolor.G,
6361 texcolor.B)); 6428 texcolor.B));
6362 res.Add(new LSL_Types.LSLFloat(texcolor.A)); 6429 res.Add(new LSL_Float(texcolor.A));
6363 } 6430 }
6364 } 6431 }
6365 else 6432 else
6366 { 6433 {
6367 texcolor = tex.GetFace((uint)face).RGBA; 6434 texcolor = tex.GetFace((uint)face).RGBA;
6368 res.Add(new LSL_Types.Vector3(texcolor.R, 6435 res.Add(new LSL_Vector(texcolor.R,
6369 texcolor.G, 6436 texcolor.G,
6370 texcolor.B)); 6437 texcolor.B));
6371 res.Add(new LSL_Types.LSLFloat(texcolor.A)); 6438 res.Add(new LSL_Float(texcolor.A));
6372 } 6439 }
6373 break; 6440 break;
6374 6441
@@ -6379,8 +6446,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6379 6446
6380 face=(int)rules.GetLSLIntegerItem(idx++); 6447 face=(int)rules.GetLSLIntegerItem(idx++);
6381 6448
6382 res.Add(new LSL_Types.LSLInteger(0)); 6449 res.Add(new LSL_Integer(0));
6383 res.Add(new LSL_Types.LSLInteger(0)); 6450 res.Add(new LSL_Integer(0));
6384 break; 6451 break;
6385 6452
6386 case (int)ScriptBaseClass.PRIM_FULLBRIGHT: 6453 case (int)ScriptBaseClass.PRIM_FULLBRIGHT:
@@ -6390,22 +6457,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6390 6457
6391 face=(int)rules.GetLSLIntegerItem(idx++); 6458 face=(int)rules.GetLSLIntegerItem(idx++);
6392 6459
6393 res.Add(new LSL_Types.LSLInteger(0)); 6460 res.Add(new LSL_Integer(0));
6394 break; 6461 break;
6395 6462
6396 case (int)ScriptBaseClass.PRIM_FLEXIBLE: 6463 case (int)ScriptBaseClass.PRIM_FLEXIBLE:
6397 PrimitiveBaseShape shape = m_host.Shape; 6464 PrimitiveBaseShape shape = m_host.Shape;
6398 6465
6399 if (shape.FlexiEntry) 6466 if (shape.FlexiEntry)
6400 res.Add(new LSL_Types.LSLInteger(1)); // active 6467 res.Add(new LSL_Integer(1)); // active
6401 else 6468 else
6402 res.Add(new LSL_Types.LSLInteger(0)); 6469 res.Add(new LSL_Integer(0));
6403 res.Add(new LSL_Types.LSLInteger(shape.FlexiSoftness));// softness 6470 res.Add(new LSL_Integer(shape.FlexiSoftness));// softness
6404 res.Add(new LSL_Types.LSLFloat(shape.FlexiGravity)); // gravity 6471 res.Add(new LSL_Float(shape.FlexiGravity)); // gravity
6405 res.Add(new LSL_Types.LSLFloat(shape.FlexiDrag)); // friction 6472 res.Add(new LSL_Float(shape.FlexiDrag)); // friction
6406 res.Add(new LSL_Types.LSLFloat(shape.FlexiWind)); // wind 6473 res.Add(new LSL_Float(shape.FlexiWind)); // wind
6407 res.Add(new LSL_Types.LSLFloat(shape.FlexiTension)); // tension 6474 res.Add(new LSL_Float(shape.FlexiTension)); // tension
6408 res.Add(new LSL_Types.Vector3(shape.FlexiForceX, // force 6475 res.Add(new LSL_Vector(shape.FlexiForceX, // force
6409 shape.FlexiForceY, 6476 shape.FlexiForceY,
6410 shape.FlexiForceZ)); 6477 shape.FlexiForceZ));
6411 break; 6478 break;
@@ -6418,22 +6485,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6418 6485
6419 face=(int)rules.GetLSLIntegerItem(idx++); 6486 face=(int)rules.GetLSLIntegerItem(idx++);
6420 6487
6421 res.Add(new LSL_Types.LSLInteger(0)); 6488 res.Add(new LSL_Integer(0));
6422 break; 6489 break;
6423 6490
6424 case (int)ScriptBaseClass.PRIM_POINT_LIGHT: 6491 case (int)ScriptBaseClass.PRIM_POINT_LIGHT:
6425 shape = m_host.Shape; 6492 shape = m_host.Shape;
6426 6493
6427 if (shape.LightEntry) 6494 if (shape.LightEntry)
6428 res.Add(new LSL_Types.LSLInteger(1)); // active 6495 res.Add(new LSL_Integer(1)); // active
6429 else 6496 else
6430 res.Add(new LSL_Types.LSLInteger(0)); 6497 res.Add(new LSL_Integer(0));
6431 res.Add(new LSL_Types.Vector3(shape.LightColorR, // color 6498 res.Add(new LSL_Vector(shape.LightColorR, // color
6432 shape.LightColorG, 6499 shape.LightColorG,
6433 shape.LightColorB)); 6500 shape.LightColorB));
6434 res.Add(new LSL_Types.LSLFloat(shape.LightIntensity)); // intensity 6501 res.Add(new LSL_Float(shape.LightIntensity)); // intensity
6435 res.Add(new LSL_Types.LSLFloat(shape.LightRadius)); // radius 6502 res.Add(new LSL_Float(shape.LightRadius)); // radius
6436 res.Add(new LSL_Types.LSLFloat(shape.LightFalloff)); // falloff 6503 res.Add(new LSL_Float(shape.LightFalloff)); // falloff
6437 break; 6504 break;
6438 6505
6439 case (int)ScriptBaseClass.PRIM_GLOW: 6506 case (int)ScriptBaseClass.PRIM_GLOW:
@@ -6443,7 +6510,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6443 6510
6444 face=(int)rules.GetLSLIntegerItem(idx++); 6511 face=(int)rules.GetLSLIntegerItem(idx++);
6445 6512
6446 res.Add(new LSL_Types.LSLFloat(0)); 6513 res.Add(new LSL_Float(0));
6447 break; 6514 break;
6448 } 6515 }
6449 } 6516 }
@@ -6577,7 +6644,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6577 // characters are padded with "=". 6644 // characters are padded with "=".
6578 // </returns> 6645 // </returns>
6579 6646
6580 public LSL_Types.LSLString llIntegerToBase64(int number) 6647 public LSL_String llIntegerToBase64(int number)
6581 { 6648 {
6582 // uninitialized string 6649 // uninitialized string
6583 6650
@@ -6640,7 +6707,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6640 // </para> 6707 // </para>
6641 // </remarks> 6708 // </remarks>
6642 6709
6643 public LSL_Types.LSLInteger llBase64ToInteger(string str) 6710 public LSL_Integer llBase64ToInteger(string str)
6644 { 6711 {
6645 int number = 0; 6712 int number = 0;
6646 int digit; 6713 int digit;
@@ -6700,19 +6767,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6700 return number; 6767 return number;
6701 } 6768 }
6702 6769
6703 public LSL_Types.LSLFloat llGetGMTclock() 6770 public LSL_Float llGetGMTclock()
6704 { 6771 {
6705 m_host.AddScriptLPS(1); 6772 m_host.AddScriptLPS(1);
6706 return DateTime.UtcNow.TimeOfDay.TotalSeconds; 6773 return DateTime.UtcNow.TimeOfDay.TotalSeconds;
6707 } 6774 }
6708 6775
6709 public LSL_Types.LSLString llGetSimulatorHostname() 6776 public LSL_String llGetSimulatorHostname()
6710 { 6777 {
6711 m_host.AddScriptLPS(1); 6778 m_host.AddScriptLPS(1);
6712 return System.Environment.MachineName; 6779 return System.Environment.MachineName;
6713 } 6780 }
6714 6781
6715 public void llSetLocalRot(LSL_Types.Quaternion rot) 6782 public void llSetLocalRot(LSL_Rotation rot)
6716 { 6783 {
6717 m_host.AddScriptLPS(1); 6784 m_host.AddScriptLPS(1);
6718 m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s); 6785 m_host.RotationOffset = new Quaternion((float)rot.x, (float)rot.y, (float)rot.z, (float)rot.s);
@@ -6767,7 +6834,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6767 // of arrays or other objects. 6834 // of arrays or other objects.
6768 // </remarks> 6835 // </remarks>
6769 6836
6770 public LSL_Types.list llParseStringKeepNulls(string src, LSL_Types.list separators, LSL_Types.list spacers) 6837 public LSL_List llParseStringKeepNulls(string src, LSL_List separators, LSL_List spacers)
6771 { 6838 {
6772 int beginning = 0; 6839 int beginning = 0;
6773 int srclen = src.Length; 6840 int srclen = src.Length;
@@ -6785,7 +6852,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6785 6852
6786 // Initial capacity reduces resize cost 6853 // Initial capacity reduces resize cost
6787 6854
6788 LSL_Types.list tokens = new LSL_Types.list(); 6855 LSL_List tokens = new LSL_List();
6789 6856
6790 m_host.AddScriptLPS(1); 6857 m_host.AddScriptLPS(1);
6791 6858
@@ -6895,7 +6962,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6895 return tokens; 6962 return tokens;
6896 } 6963 }
6897 6964
6898 public LSL_Types.LSLInteger llGetObjectPermMask(int mask) 6965 public LSL_Integer llGetObjectPermMask(int mask)
6899 { 6966 {
6900 m_host.AddScriptLPS(1); 6967 m_host.AddScriptLPS(1);
6901 6968
@@ -6968,7 +7035,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6968 } 7035 }
6969 } 7036 }
6970 7037
6971 public LSL_Types.LSLInteger llGetInventoryPermMask(string item, int mask) 7038 public LSL_Integer llGetInventoryPermMask(string item, int mask)
6972 { 7039 {
6973 m_host.AddScriptLPS(1); 7040 m_host.AddScriptLPS(1);
6974 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 7041 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -6999,7 +7066,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6999 NotImplemented("llSetInventoryPermMask"); 7066 NotImplemented("llSetInventoryPermMask");
7000 } 7067 }
7001 7068
7002 public LSL_Types.LSLString llGetInventoryCreator(string item) 7069 public LSL_String llGetInventoryCreator(string item)
7003 { 7070 {
7004 m_host.AddScriptLPS(1); 7071 m_host.AddScriptLPS(1);
7005 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 7072 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -7022,7 +7089,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7022// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg); 7089// wComm.DeliverMessage(ChatTypeEnum.Owner, 0, m_host.Name, m_host.UUID, msg);
7023 } 7090 }
7024 7091
7025 public LSL_Types.LSLString llRequestSimulatorData(string simulator, int data) 7092 public LSL_String llRequestSimulatorData(string simulator, int data)
7026 { 7093 {
7027 try 7094 try
7028 { 7095 {
@@ -7040,7 +7107,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7040 // ScriptSleep(1000); 7107 // ScriptSleep(1000);
7041 return UUID.Zero.ToString(); 7108 return UUID.Zero.ToString();
7042 } 7109 }
7043 reply = new LSL_Types.Vector3( 7110 reply = new LSL_Vector(
7044 info.RegionLocX * Constants.RegionSize, 7111 info.RegionLocX * Constants.RegionSize,
7045 info.RegionLocY * Constants.RegionSize, 7112 info.RegionLocY * Constants.RegionSize,
7046 0).ToString(); 7113 0).ToString();
@@ -7096,7 +7163,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7096 m_host.SetForceMouselook(mouselook != 0); 7163 m_host.SetForceMouselook(mouselook != 0);
7097 } 7164 }
7098 7165
7099 public LSL_Types.LSLFloat llGetObjectMass(string id) 7166 public LSL_Float llGetObjectMass(string id)
7100 { 7167 {
7101 m_host.AddScriptLPS(1); 7168 m_host.AddScriptLPS(1);
7102 UUID key = new UUID(); 7169 UUID key = new UUID();
@@ -7119,9 +7186,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7119 /// and the source list is added as a suffix. 7186 /// and the source list is added as a suffix.
7120 /// </summary> 7187 /// </summary>
7121 7188
7122 public LSL_Types.list llListReplaceList(LSL_Types.list dest, LSL_Types.list src, int start, int end) 7189 public LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end)
7123 { 7190 {
7124 LSL_Types.list pref = null; 7191 LSL_List pref = null;
7125 7192
7126 m_host.AddScriptLPS(1); 7193 m_host.AddScriptLPS(1);
7127 7194
@@ -7198,7 +7265,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7198 // ScriptSleep(10000); 7265 // ScriptSleep(10000);
7199 } 7266 }
7200 7267
7201 public void llParcelMediaCommandList(LSL_Types.list commandList) 7268 public void llParcelMediaCommandList(LSL_List commandList)
7202 { 7269 {
7203 //TO DO: Implement the missing commands 7270 //TO DO: Implement the missing commands
7204 //PARCEL_MEDIA_COMMAND_STOP Stop the media stream and go back to the first frame. 7271 //PARCEL_MEDIA_COMMAND_STOP Stop the media stream and go back to the first frame.
@@ -7296,10 +7363,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7296 // ScriptSleep(2000); 7363 // ScriptSleep(2000);
7297 } 7364 }
7298 7365
7299 public LSL_Types.list llParcelMediaQuery(LSL_Types.list aList) 7366 public LSL_List llParcelMediaQuery(LSL_List aList)
7300 { 7367 {
7301 m_host.AddScriptLPS(1); 7368 m_host.AddScriptLPS(1);
7302 LSL_Types.list list = new LSL_Types.list(); 7369 LSL_List list = new LSL_List();
7303 //TO DO: make the implementation for the missing commands 7370 //TO DO: make the implementation for the missing commands
7304 //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture. 7371 //PARCEL_MEDIA_COMMAND_TEXTURE key uuid Use this to get or set the parcel's media texture.
7305 //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url. 7372 //PARCEL_MEDIA_COMMAND_URL string url Used to get or set the parcel's media url.
@@ -7315,13 +7382,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7315 switch ((ParcelMediaCommandEnum) aList.Data[i]) 7382 switch ((ParcelMediaCommandEnum) aList.Data[i])
7316 { 7383 {
7317 case ParcelMediaCommandEnum.Url: 7384 case ParcelMediaCommandEnum.Url:
7318 list.Add(new LSL_Types.LSLString(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL)); 7385 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaURL));
7319 break; 7386 break;
7320 case ParcelMediaCommandEnum.Desc: 7387 case ParcelMediaCommandEnum.Desc:
7321 list.Add(new LSL_Types.LSLString(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).Description)); 7388 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).Description));
7322 break; 7389 break;
7323 case ParcelMediaCommandEnum.Texture: 7390 case ParcelMediaCommandEnum.Texture:
7324 list.Add(new LSL_Types.LSLString(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString())); 7391 list.Add(new LSL_String(World.GetLandData(m_host.AbsolutePosition.X, m_host.AbsolutePosition.Y).MediaID.ToString()));
7325 break; 7392 break;
7326 default: 7393 default:
7327 ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url; 7394 ParcelMediaCommandEnum mediaCommandEnum = ParcelMediaCommandEnum.Url;
@@ -7335,7 +7402,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7335 return list; 7402 return list;
7336 } 7403 }
7337 7404
7338 public LSL_Types.LSLInteger llModPow(int a, int b, int c) 7405 public LSL_Integer llModPow(int a, int b, int c)
7339 { 7406 {
7340 m_host.AddScriptLPS(1); 7407 m_host.AddScriptLPS(1);
7341 Int64 tmp = 0; 7408 Int64 tmp = 0;
@@ -7344,7 +7411,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7344 return Convert.ToInt32(tmp); 7411 return Convert.ToInt32(tmp);
7345 } 7412 }
7346 7413
7347 public LSL_Types.LSLInteger llGetInventoryType(string name) 7414 public LSL_Integer llGetInventoryType(string name)
7348 { 7415 {
7349 m_host.AddScriptLPS(1); 7416 m_host.AddScriptLPS(1);
7350 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory) 7417 foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
@@ -7357,7 +7424,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7357 return -1; 7424 return -1;
7358 } 7425 }
7359 7426
7360 public void llSetPayPrice(int price, LSL_Types.list quick_pay_buttons) 7427 public void llSetPayPrice(int price, LSL_List quick_pay_buttons)
7361 { 7428 {
7362 m_host.AddScriptLPS(1); 7429 m_host.AddScriptLPS(1);
7363 7430
@@ -7368,40 +7435,40 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7368 } 7435 }
7369 m_host.ParentGroup.RootPart.PayPrice[0]=price; 7436 m_host.ParentGroup.RootPart.PayPrice[0]=price;
7370 7437
7371 m_host.ParentGroup.RootPart.PayPrice[1]=(LSL_Types.LSLInteger)quick_pay_buttons.Data[0]; 7438 m_host.ParentGroup.RootPart.PayPrice[1]=(LSL_Integer)quick_pay_buttons.Data[0];
7372 m_host.ParentGroup.RootPart.PayPrice[2]=(LSL_Types.LSLInteger)quick_pay_buttons.Data[1]; 7439 m_host.ParentGroup.RootPart.PayPrice[2]=(LSL_Integer)quick_pay_buttons.Data[1];
7373 m_host.ParentGroup.RootPart.PayPrice[3]=(LSL_Types.LSLInteger)quick_pay_buttons.Data[2]; 7440 m_host.ParentGroup.RootPart.PayPrice[3]=(LSL_Integer)quick_pay_buttons.Data[2];
7374 m_host.ParentGroup.RootPart.PayPrice[4]=(LSL_Types.LSLInteger)quick_pay_buttons.Data[3]; 7441 m_host.ParentGroup.RootPart.PayPrice[4]=(LSL_Integer)quick_pay_buttons.Data[3];
7375 m_host.ParentGroup.HasGroupChanged = true; 7442 m_host.ParentGroup.HasGroupChanged = true;
7376 } 7443 }
7377 7444
7378 public LSL_Types.Vector3 llGetCameraPos() 7445 public LSL_Vector llGetCameraPos()
7379 { 7446 {
7380 m_host.AddScriptLPS(1); 7447 m_host.AddScriptLPS(1);
7381 UUID invItemID=InventorySelf(); 7448 UUID invItemID=InventorySelf();
7382 if (invItemID == UUID.Zero) 7449 if (invItemID == UUID.Zero)
7383 return new LSL_Types.Vector3(); 7450 return new LSL_Vector();
7384 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero) 7451 if (m_host.TaskInventory[invItemID].PermsGranter == UUID.Zero)
7385 return new LSL_Types.Vector3(); 7452 return new LSL_Vector();
7386 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0) 7453 if ((m_host.TaskInventory[invItemID].PermsMask & ScriptBaseClass.PERMISSION_TRACK_CAMERA) == 0)
7387 { 7454 {
7388 ShoutError("No permissions to track the camera"); 7455 ShoutError("No permissions to track the camera");
7389 return new LSL_Types.Vector3(); 7456 return new LSL_Vector();
7390 } 7457 }
7391 ScenePresence presence = World.GetScenePresence(m_host.OwnerID); 7458 ScenePresence presence = World.GetScenePresence(m_host.OwnerID);
7392 if (presence != null) 7459 if (presence != null)
7393 { 7460 {
7394 LSL_Types.Vector3 pos = new LSL_Types.Vector3(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z); 7461 LSL_Vector pos = new LSL_Vector(presence.CameraPosition.X, presence.CameraPosition.Y, presence.CameraPosition.Z);
7395 return pos; 7462 return pos;
7396 } 7463 }
7397 return new LSL_Types.Vector3(); 7464 return new LSL_Vector();
7398 } 7465 }
7399 7466
7400 public LSL_Types.Quaternion llGetCameraRot() 7467 public LSL_Rotation llGetCameraRot()
7401 { 7468 {
7402 m_host.AddScriptLPS(1); 7469 m_host.AddScriptLPS(1);
7403 NotImplemented("llGetCameraRot"); 7470 NotImplemented("llGetCameraRot");
7404 return new LSL_Types.Quaternion(); 7471 return new LSL_Rotation();
7405 } 7472 }
7406 7473
7407 public void llSetPrimURL() 7474 public void llSetPrimURL()
@@ -7418,7 +7485,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7418 // ScriptSleep(20000); 7485 // ScriptSleep(20000);
7419 } 7486 }
7420 7487
7421 public LSL_Types.LSLString llEscapeURL(string url) 7488 public LSL_String llEscapeURL(string url)
7422 { 7489 {
7423 m_host.AddScriptLPS(1); 7490 m_host.AddScriptLPS(1);
7424 try 7491 try
@@ -7431,7 +7498,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7431 } 7498 }
7432 } 7499 }
7433 7500
7434 public LSL_Types.LSLString llUnescapeURL(string url) 7501 public LSL_String llUnescapeURL(string url)
7435 { 7502 {
7436 m_host.AddScriptLPS(1); 7503 m_host.AddScriptLPS(1);
7437 try 7504 try
@@ -7444,7 +7511,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7444 } 7511 }
7445 } 7512 }
7446 7513
7447 public void llMapDestination(string simname, LSL_Types.Vector3 pos, LSL_Types.Vector3 look_at) 7514 public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector look_at)
7448 { 7515 {
7449 m_host.AddScriptLPS(1); 7516 m_host.AddScriptLPS(1);
7450 NotImplemented("llMapDestination"); 7517 NotImplemented("llMapDestination");
@@ -7514,7 +7581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7514 // ScriptSleep(100); 7581 // ScriptSleep(100);
7515 } 7582 }
7516 7583
7517 public void llSetCameraParams(LSL_Types.list rules) 7584 public void llSetCameraParams(LSL_List rules)
7518 { 7585 {
7519 m_host.AddScriptLPS(1); 7586 m_host.AddScriptLPS(1);
7520 7587
@@ -7547,17 +7614,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7547 case ScriptBaseClass.CAMERA_FOCUS: 7614 case ScriptBaseClass.CAMERA_FOCUS:
7548 case ScriptBaseClass.CAMERA_FOCUS_OFFSET: 7615 case ScriptBaseClass.CAMERA_FOCUS_OFFSET:
7549 case ScriptBaseClass.CAMERA_POSITION: 7616 case ScriptBaseClass.CAMERA_POSITION:
7550 LSL_Types.Vector3 v = (LSL_Types.Vector3)data[i]; 7617 LSL_Vector v = (LSL_Vector)data[i];
7551 parameters.Add(type + 1, (float)v.x); 7618 parameters.Add(type + 1, (float)v.x);
7552 parameters.Add(type + 2, (float)v.y); 7619 parameters.Add(type + 2, (float)v.y);
7553 parameters.Add(type + 3, (float)v.z); 7620 parameters.Add(type + 3, (float)v.z);
7554 break; 7621 break;
7555 default: 7622 default:
7556 // TODO: clean that up as soon as the implicit casts are in 7623 // TODO: clean that up as soon as the implicit casts are in
7557 if (data[i] is LSL_Types.LSLFloat) 7624 if (data[i] is LSL_Float)
7558 parameters.Add(type, (float)((LSL_Types.LSLFloat)data[i]).value); 7625 parameters.Add(type, (float)((LSL_Float)data[i]).value);
7559 else if (data[i] is LSL_Types.LSLInteger) 7626 else if (data[i] is LSL_Integer)
7560 parameters.Add(type, (float)((LSL_Types.LSLInteger)data[i]).value); 7627 parameters.Add(type, (float)((LSL_Integer)data[i]).value);
7561 else parameters.Add(type, Convert.ToSingle(data[i])); 7628 else parameters.Add(type, Convert.ToSingle(data[i]));
7562 break; 7629 break;
7563 } 7630 }
@@ -7590,10 +7657,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7590 presence.ControllingClient.SendClearFollowCamProperties(objectID); 7657 presence.ControllingClient.SendClearFollowCamProperties(objectID);
7591 } 7658 }
7592 7659
7593 public LSL_Types.LSLFloat llListStatistics(int operation, LSL_Types.list src) 7660 public LSL_Float llListStatistics(int operation, LSL_List src)
7594 { 7661 {
7595 m_host.AddScriptLPS(1); 7662 m_host.AddScriptLPS(1);
7596 LSL_Types.list nums = LSL_Types.list.ToDoubleList(src); 7663 LSL_List nums = LSL_List.ToDoubleList(src);
7597 switch (operation) 7664 switch (operation)
7598 { 7665 {
7599 case ScriptBaseClass.LIST_STAT_RANGE: 7666 case ScriptBaseClass.LIST_STAT_RANGE:
@@ -7623,19 +7690,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7623 } 7690 }
7624 } 7691 }
7625 7692
7626 public LSL_Types.LSLInteger llGetUnixTime() 7693 public LSL_Integer llGetUnixTime()
7627 { 7694 {
7628 m_host.AddScriptLPS(1); 7695 m_host.AddScriptLPS(1);
7629 return Util.UnixTimeSinceEpoch(); 7696 return Util.UnixTimeSinceEpoch();
7630 } 7697 }
7631 7698
7632 public LSL_Types.LSLInteger llGetParcelFlags(LSL_Types.Vector3 pos) 7699 public LSL_Integer llGetParcelFlags(LSL_Vector pos)
7633 { 7700 {
7634 m_host.AddScriptLPS(1); 7701 m_host.AddScriptLPS(1);
7635 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags; 7702 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).landData.Flags;
7636 } 7703 }
7637 7704
7638 public LSL_Types.LSLInteger llGetRegionFlags() 7705 public LSL_Integer llGetRegionFlags()
7639 { 7706 {
7640 m_host.AddScriptLPS(1); 7707 m_host.AddScriptLPS(1);
7641 IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); 7708 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
@@ -7644,7 +7711,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7644 return (int)estate.GetRegionFlags(); 7711 return (int)estate.GetRegionFlags();
7645 } 7712 }
7646 7713
7647 public LSL_Types.LSLString llXorBase64StringsCorrect(string str1, string str2) 7714 public LSL_String llXorBase64StringsCorrect(string str1, string str2)
7648 { 7715 {
7649 m_host.AddScriptLPS(1); 7716 m_host.AddScriptLPS(1);
7650 string ret = String.Empty; 7717 string ret = String.Empty;
@@ -7662,7 +7729,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7662 return llStringToBase64(ret); 7729 return llStringToBase64(ret);
7663 } 7730 }
7664 7731
7665 public LSL_Types.LSLString llHTTPRequest(string url, LSL_Types.list parameters, string body) 7732 public LSL_String llHTTPRequest(string url, LSL_List parameters, string body)
7666 { 7733 {
7667 // Partial implementation: support for parameter flags needed 7734 // Partial implementation: support for parameter flags needed
7668 // see http://wiki.secondlife.com/wiki/LlHTTPRequest 7735 // see http://wiki.secondlife.com/wiki/LlHTTPRequest
@@ -7739,7 +7806,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7739 // ScriptSleep(100); 7806 // ScriptSleep(100);
7740 } 7807 }
7741 7808
7742 public LSL_Types.LSLInteger llGetParcelPrimCount(LSL_Types.Vector3 pos, int category, int sim_wide) 7809 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide)
7743 { 7810 {
7744 m_host.AddScriptLPS(1); 7811 m_host.AddScriptLPS(1);
7745 7812
@@ -7802,11 +7869,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7802 return 0; 7869 return 0;
7803 } 7870 }
7804 7871
7805 public LSL_Types.list llGetParcelPrimOwners(LSL_Types.Vector3 pos) 7872 public LSL_List llGetParcelPrimOwners(LSL_Vector pos)
7806 { 7873 {
7807 m_host.AddScriptLPS(1); 7874 m_host.AddScriptLPS(1);
7808 LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); 7875 LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
7809 LSL_Types.list ret = new LSL_Types.list(); 7876 LSL_List ret = new LSL_List();
7810 if (land != null) 7877 if (land != null)
7811 { 7878 {
7812 foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners()) 7879 foreach (KeyValuePair<UUID, int> d in land.getLandObjectOwners())
@@ -7819,7 +7886,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7819 return ret; 7886 return ret;
7820 } 7887 }
7821 7888
7822 public LSL_Types.LSLInteger llGetObjectPrimCount(string object_id) 7889 public LSL_Integer llGetObjectPrimCount(string object_id)
7823 { 7890 {
7824 m_host.AddScriptLPS(1); 7891 m_host.AddScriptLPS(1);
7825 SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id)); 7892 SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id));
@@ -7833,7 +7900,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7833 } 7900 }
7834 } 7901 }
7835 7902
7836 public LSL_Types.LSLInteger llGetParcelMaxPrims(LSL_Types.Vector3 pos, int sim_wide) 7903 public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide)
7837 { 7904 {
7838 m_host.AddScriptLPS(1); 7905 m_host.AddScriptLPS(1);
7839 // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation 7906 // Alondria: This currently just is utilizing the normal grid's 0.22 prims/m2 calculation
@@ -7863,36 +7930,36 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7863 7930
7864 } 7931 }
7865 7932
7866 public LSL_Types.list llGetParcelDetails(LSL_Types.Vector3 pos, LSL_Types.list param) 7933 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)
7867 { 7934 {
7868 m_host.AddScriptLPS(1); 7935 m_host.AddScriptLPS(1);
7869 LandData land = World.GetLandData((float)pos.x, (float)pos.y); 7936 LandData land = World.GetLandData((float)pos.x, (float)pos.y);
7870 if (land == null) 7937 if (land == null)
7871 { 7938 {
7872 return new LSL_Types.list(0); 7939 return new LSL_List(0);
7873 } 7940 }
7874 LSL_Types.list ret = new LSL_Types.list(); 7941 LSL_List ret = new LSL_List();
7875 foreach (object o in param.Data) 7942 foreach (object o in param.Data)
7876 { 7943 {
7877 switch (o.ToString()) 7944 switch (o.ToString())
7878 { 7945 {
7879 case "0": 7946 case "0":
7880 ret = ret + new LSL_Types.list(land.Name); 7947 ret = ret + new LSL_List(land.Name);
7881 break; 7948 break;
7882 case "1": 7949 case "1":
7883 ret = ret + new LSL_Types.list(land.Description); 7950 ret = ret + new LSL_List(land.Description);
7884 break; 7951 break;
7885 case "2": 7952 case "2":
7886 ret = ret + new LSL_Types.list(land.OwnerID.ToString()); 7953 ret = ret + new LSL_List(land.OwnerID.ToString());
7887 break; 7954 break;
7888 case "3": 7955 case "3":
7889 ret = ret + new LSL_Types.list(land.GroupID.ToString()); 7956 ret = ret + new LSL_List(land.GroupID.ToString());
7890 break; 7957 break;
7891 case "4": 7958 case "4":
7892 ret = ret + new LSL_Types.list(land.Area); 7959 ret = ret + new LSL_List(land.Area);
7893 break; 7960 break;
7894 default: 7961 default:
7895 ret = ret + new LSL_Types.list(0); 7962 ret = ret + new LSL_List(0);
7896 break; 7963 break;
7897 } 7964 }
7898 } 7965 }
@@ -7915,7 +7982,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7915 // ScriptSleep(200); 7982 // ScriptSleep(200);
7916 } 7983 }
7917 7984
7918 public LSL_Types.LSLString llStringTrim(string src, int type) 7985 public LSL_String llStringTrim(string src, int type)
7919 { 7986 {
7920 m_host.AddScriptLPS(1); 7987 m_host.AddScriptLPS(1);
7921 if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } 7988 if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); }
@@ -7924,10 +7991,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7924 return src; 7991 return src;
7925 } 7992 }
7926 7993
7927 public LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args) 7994 public LSL_List llGetObjectDetails(string id, LSL_List args)
7928 { 7995 {
7929 m_host.AddScriptLPS(1); 7996 m_host.AddScriptLPS(1);
7930 LSL_Types.list ret = new LSL_Types.list(); 7997 LSL_List ret = new LSL_List();
7931 UUID key = new UUID(); 7998 UUID key = new UUID();
7932 if (UUID.TryParse(id, out key)) 7999 if (UUID.TryParse(id, out key))
7933 { 8000 {
@@ -7946,13 +8013,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7946 ret.Add(""); 8013 ret.Add("");
7947 break; 8014 break;
7948 case "3": 8015 case "3":
7949 ret.Add(new LSL_Types.Vector3((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z)); 8016 ret.Add(new LSL_Vector((double)av.AbsolutePosition.X, (double)av.AbsolutePosition.Y, (double)av.AbsolutePosition.Z));
7950 break; 8017 break;
7951 case "4": 8018 case "4":
7952 ret.Add(new LSL_Types.Quaternion((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W)); 8019 ret.Add(new LSL_Rotation((double)av.Rotation.X, (double)av.Rotation.Y, (double)av.Rotation.Z, (double)av.Rotation.W));
7953 break; 8020 break;
7954 case "5": 8021 case "5":
7955 ret.Add(new LSL_Types.Vector3(av.Velocity.X, av.Velocity.Y, av.Velocity.Z)); 8022 ret.Add(new LSL_Vector(av.Velocity.X, av.Velocity.Y, av.Velocity.Z));
7956 break; 8023 break;
7957 case "6": 8024 case "6":
7958 ret.Add(id); 8025 ret.Add(id);
@@ -7981,13 +8048,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7981 ret.Add(obj.Description); 8048 ret.Add(obj.Description);
7982 break; 8049 break;
7983 case "3": 8050 case "3":
7984 ret.Add(new LSL_Types.Vector3(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z)); 8051 ret.Add(new LSL_Vector(obj.AbsolutePosition.X, obj.AbsolutePosition.Y, obj.AbsolutePosition.Z));
7985 break; 8052 break;
7986 case "4": 8053 case "4":
7987 ret.Add(new LSL_Types.Quaternion(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W)); 8054 ret.Add(new LSL_Rotation(obj.RotationOffset.X, obj.RotationOffset.Y, obj.RotationOffset.Z, obj.RotationOffset.W));
7988 break; 8055 break;
7989 case "5": 8056 case "5":
7990 ret.Add(new LSL_Types.Vector3(obj.Velocity.X, obj.Velocity.Y, obj.Velocity.Z)); 8057 ret.Add(new LSL_Vector(obj.Velocity.X, obj.Velocity.Y, obj.Velocity.Z));
7991 break; 8058 break;
7992 case "6": 8059 case "6":
7993 ret.Add(obj.OwnerID.ToString()); 8060 ret.Add(obj.OwnerID.ToString());
@@ -8003,7 +8070,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8003 return ret; 8070 return ret;
8004 } 8071 }
8005 } 8072 }
8006 return new LSL_Types.list(); 8073 return new LSL_List();
8007 } 8074 }
8008 8075
8009 8076
@@ -8044,7 +8111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8044 World.AssetCache.GetAsset(assetID, delegate(UUID i, AssetBase a) { cb(i, a); }, false); 8111 World.AssetCache.GetAsset(assetID, delegate(UUID i, AssetBase a) { cb(i, a); }, false);
8045 } 8112 }
8046 8113
8047 public LSL_Types.LSLString llGetNumberOfNotecardLines(string name) 8114 public LSL_String llGetNumberOfNotecardLines(string name)
8048 { 8115 {
8049 m_host.AddScriptLPS(1); 8116 m_host.AddScriptLPS(1);
8050 8117
@@ -8086,7 +8153,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8086 return UUID.Zero.ToString(); 8153 return UUID.Zero.ToString();
8087 } 8154 }
8088 8155
8089 public LSL_Types.LSLString llGetNotecardLine(string name, int line) 8156 public LSL_String llGetNotecardLine(string name, int line)
8090 { 8157 {
8091 m_host.AddScriptLPS(1); 8158 m_host.AddScriptLPS(1);
8092 8159