aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMW2007-09-11 14:18:34 +0000
committerMW2007-09-11 14:18:34 +0000
commit04cf04600c01f2cb328847133430f777bc7f1a7c (patch)
tree2976b99f12f66f86d94a2f23bdc953a8494d8dda /OpenSim/Region/ScriptEngine
parentGet rid of extra green men in minimap on region crossings (they were (diff)
downloadopensim-SC-04cf04600c01f2cb328847133430f777bc7f1a7c.zip
opensim-SC-04cf04600c01f2cb328847133430f777bc7f1a7c.tar.gz
opensim-SC-04cf04600c01f2cb328847133430f777bc7f1a7c.tar.bz2
opensim-SC-04cf04600c01f2cb328847133430f777bc7f1a7c.tar.xz
Applied ldvoipeng's patch [#360], sorry for it taking so long to apply it. If in future anyone's patch hasn't been applied within a few days, please can someone kick one of the developers with svn access.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs137
1 files changed, 116 insertions, 21 deletions
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
index 5d34229..d543eca 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs
@@ -79,9 +79,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
79 79
80 public double llFrand(double mag) 80 public double llFrand(double mag)
81 { 81 {
82 lock (OpenSim.Framework.Utilities.Util.RandomClass) 82 lock (OpenSim.Framework.Util.RandomClass)
83 { 83 {
84 return OpenSim.Framework.Utilities.Util.RandomClass.Next((int)mag); 84 return OpenSim.Framework.Util.RandomClass.Next((int)mag);
85 } 85 }
86 } 86 }
87 87
@@ -217,7 +217,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
217 public void llScaleTexture(double u, double v, int face) { return; } 217 public void llScaleTexture(double u, double v, int face) { return; }
218 public void llOffsetTexture(double u, double v, int face) { return; } 218 public void llOffsetTexture(double u, double v, int face) { return; }
219 public void llRotateTexture(double rotation, int face) { return; } 219 public void llRotateTexture(double rotation, int face) { return; }
220 public string llGetTexture(int face) { return ""; } 220
221 public string llGetTexture(int face)
222 {
223 return "";
224 }
225
221 public void llSetPos(LSL_Types.Vector3 pos) { return; } 226 public void llSetPos(LSL_Types.Vector3 pos) { return; }
222 227
223 public LSL_Types.Vector3 llGetPos() 228 public LSL_Types.Vector3 llGetPos()
@@ -265,11 +270,25 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
265 public void llTriggerSound(string sound, double volume) { } 270 public void llTriggerSound(string sound, double volume) { }
266 public void llStopSound() { } 271 public void llStopSound() { }
267 public void llPreloadSound(string sound) { } 272 public void llPreloadSound(string sound) { }
268 public string llGetSubString(string src, int start, int end) { return src.Substring(start, end); } 273
274 public string llGetSubString(string src, int start, int end)
275 {
276 return src.Substring(start, end);
277 }
278
269 public string llDeleteSubString(string src, int start, int end) {return "";} 279 public string llDeleteSubString(string src, int start, int end) {return "";}
270 public string llInsertString(string dst, int position, string src) { return ""; } 280 public string llInsertString(string dst, int position, string src) { return ""; }
271 public string llToUpper(string src) { return src.ToUpper(); } 281
272 public string llToLower(string src) { return src.ToLower(); } 282 public string llToUpper(string src)
283 {
284 return src.ToUpper();
285 }
286
287 public string llToLower(string src)
288 {
289 return src.ToLower();
290 }
291
273 public int llGiveMoney(string destination, int amount) { return 0; } 292 public int llGiveMoney(string destination, int amount) { return 0; }
274 public void llMakeExplosion() { } 293 public void llMakeExplosion() { }
275 public void llMakeFountain() { } 294 public void llMakeFountain() { }
@@ -285,7 +304,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
285 m_ScriptEngine.myLSLLongCmdHandler.SetTimerEvent(m_localID, m_itemID, sec); 304 m_ScriptEngine.myLSLLongCmdHandler.SetTimerEvent(m_localID, m_itemID, sec);
286 } 305 }
287 306
288 public void llSleep(double sec) { System.Threading.Thread.Sleep((int)(sec * 1000)); } 307 public void llSleep(double sec)
308 {
309 System.Threading.Thread.Sleep((int)(sec * 1000));
310 }
311
289 public double llGetMass() { return 0; } 312 public double llGetMass() { return 0; }
290 public void llCollisionFilter(string name, string id, int accept) { } 313 public void llCollisionFilter(string name, string id, int accept) { }
291 public void llTakeControls(int controls, int accept, int pass_on) { } 314 public void llTakeControls(int controls, int accept, int pass_on) { }
@@ -294,7 +317,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
294 public void llDetachFromAvatar() { } 317 public void llDetachFromAvatar() { }
295 public void llTakeCamera() { } 318 public void llTakeCamera() { }
296 public void llReleaseCamera() { } 319 public void llReleaseCamera() { }
297 public string llGetOwner() { return m_host.ObjectOwner.ToStringHyphenated(); } 320
321 public string llGetOwner()
322 {
323 return m_host.ObjectOwner.ToStringHyphenated();
324 }
325
298 public void llInstantMessage(string user, string message) { } 326 public void llInstantMessage(string user, string message) { }
299 public void llEmail(string address, string subject, string message) { } 327 public void llEmail(string address, string subject, string message) { }
300 public void llGetNextEmail(string address, string subject) { } 328 public void llGetNextEmail(string address, string subject) { }
@@ -368,12 +396,23 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
368 public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) { } 396 public void llPushObject(string target, LSL_Types.Vector3 impulse, LSL_Types.Vector3 ang_impulse, int local) { }
369 public void llPassCollisions(int pass) { } 397 public void llPassCollisions(int pass) { }
370 public string llGetScriptName() { return ""; } 398 public string llGetScriptName() { return ""; }
399
371 public int llGetNumberOfSides() { return 0; } 400 public int llGetNumberOfSides() { return 0; }
401
372 public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) { return new LSL_Types.Quaternion(); } 402 public LSL_Types.Quaternion llAxisAngle2Rot(LSL_Types.Vector3 axis, double angle) { return new LSL_Types.Quaternion(); }
373 public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) { return new LSL_Types.Vector3(); } 403 public LSL_Types.Vector3 llRot2Axis(LSL_Types.Quaternion rot) { return new LSL_Types.Vector3(); }
374 public void llRot2Angle() { } 404 public void llRot2Angle() { }
375 public double llAcos(double val) { return (double)Math.Acos(val); } 405
376 public double llAsin(double val) { return (double)Math.Asin(val); } 406 public double llAcos(double val)
407 {
408 return (double)Math.Acos(val);
409 }
410
411 public double llAsin(double val)
412 {
413 return (double)Math.Asin(val);
414 }
415
377 public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) { return 0; } 416 public double llAngleBetween(LSL_Types.Quaternion a, LSL_Types.Quaternion b) { return 0; }
378 public string llGetInventoryKey(string name) { return ""; } 417 public string llGetInventoryKey(string name) { return ""; }
379 public void llAllowInventoryDrop(int add) { } 418 public void llAllowInventoryDrop(int add) { }
@@ -387,7 +426,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
387 return source.IndexOf(pattern); 426 return source.IndexOf(pattern);
388 } 427 }
389 428
390 public string llGetOwnerKey(string id) { return ""; } 429 public string llGetOwnerKey(string id)
430 {
431 return "";
432 }
433
391 public LSL_Types.Vector3 llGetCenterOfMass() { return new LSL_Types.Vector3(); } 434 public LSL_Types.Vector3 llGetCenterOfMass() { return new LSL_Types.Vector3(); }
392 435
393 public List<string> llListSort(List<string> src, int stride, int ascending) 436 public List<string> llListSort(List<string> src, int stride, int ascending)
@@ -459,8 +502,16 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
459 public List<string> llListInsertList(List<string> dest, List<string> src, int start) 502 public List<string> llListInsertList(List<string> dest, List<string> src, int start)
460 { return new List<string>(); } 503 { return new List<string>(); }
461 public int llListFindList(List<string> src, List<string> test) { return 0; } 504 public int llListFindList(List<string> src, List<string> test) { return 0; }
462 public string llGetObjectName() { return m_host.Name; } 505
463 public void llSetObjectName(string name) { m_host.Name = name; } 506 public string llGetObjectName()
507 {
508 return m_host.Name;
509 }
510
511 public void llSetObjectName(string name)
512 {
513 m_host.Name = name;
514 }
464 515
465 public string llGetDate() 516 public string llGetDate()
466 { 517 {
@@ -478,7 +529,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
478 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) { } 529 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) { }
479 public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, LSL_Types.Vector3 bottom_south_west) { } 530 public void llTriggerSoundLimited(string sound, double volume, LSL_Types.Vector3 top_north_east, LSL_Types.Vector3 bottom_south_west) { }
480 public void llEjectFromLand(string pest) { } 531 public void llEjectFromLand(string pest) { }
532
481 public void llParseString2List() { } 533 public void llParseString2List() { }
534
482 public int llOverMyLand(string id) { return 0; } 535 public int llOverMyLand(string id) { return 0; }
483 public string llGetLandOwnerAt(LSL_Types.Vector3 pos) { return ""; } 536 public string llGetLandOwnerAt(LSL_Types.Vector3 pos) { return ""; }
484 public string llGetNotecardLine(string name, int line) { return ""; } 537 public string llGetNotecardLine(string name, int line) { return ""; }
@@ -490,7 +543,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
490 public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) { return new LSL_Types.Vector3(); } 543 public LSL_Types.Vector3 llGroundContour(LSL_Types.Vector3 offset) { return new LSL_Types.Vector3(); }
491 public int llGetAttached() { return 0; } 544 public int llGetAttached() { return 0; }
492 public int llGetFreeMemory() { return 0; } 545 public int llGetFreeMemory() { return 0; }
493 public string llGetRegionName() { return World.RegionInfo.RegionName; } 546
547 public string llGetRegionName()
548 {
549 return World.RegionInfo.RegionName;
550 }
551
494 public double llGetRegionTimeDilation() { return 1.0f; } 552 public double llGetRegionTimeDilation() { return 1.0f; }
495 public double llGetRegionFPS() { return 10.0f; } 553 public double llGetRegionFPS() { return 10.0f; }
496 public void llParticleSystem(List<Object> rules) { } 554 public void llParticleSystem(List<Object> rules) { }
@@ -505,13 +563,17 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
505 public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) { } 563 public void llSitTarget(LSL_Types.Vector3 offset, LSL_Types.Quaternion rot) { }
506 public string llAvatarOnSitTarget() { return ""; } 564 public string llAvatarOnSitTarget() { return ""; }
507 public void llAddToLandPassList(string avatar, double hours) { } 565 public void llAddToLandPassList(string avatar, double hours) { }
566
508 public void llSetTouchText(string text) 567 public void llSetTouchText(string text)
509 { 568 {
569 m_host.TouchName = text;
510 } 570 }
511 571
512 public void llSetSitText(string text) 572 public void llSetSitText(string text)
513 { 573 {
574 m_host.SitName = text;
514 } 575 }
576
515 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) { } 577 public void llSetCameraEyeOffset(LSL_Types.Vector3 offset) { }
516 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) { } 578 public void llSetCameraAtOffset(LSL_Types.Vector3 offset) { }
517 public void llDumpList2String() { } 579 public void llDumpList2String() { }
@@ -532,10 +594,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
532 public string llSendRemoteData(string channel, string dest, int idata, string sdata) { return ""; } 594 public string llSendRemoteData(string channel, string dest, int idata, string sdata) { return ""; }
533 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) { } 595 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) { }
534 public void llCloseRemoteDataChannel(string channel) { } 596 public void llCloseRemoteDataChannel(string channel) { }
597
535 public string llMD5String(string src, int nonce) 598 public string llMD5String(string src, int nonce)
536 { 599 {
537 return OpenSim.Framework.Utilities.Util.Md5Hash(src + ":" + nonce.ToString()); 600 return OpenSim.Framework.Util.Md5Hash(src + ":" + nonce.ToString());
538 } 601 }
602
539 public void llSetPrimitiveParams(List<string> rules) { } 603 public void llSetPrimitiveParams(List<string> rules) { }
540 public string llStringToBase64(string str) { return ""; } 604 public string llStringToBase64(string str) { return ""; }
541 public string llBase64ToString(string str) { return ""; } 605 public string llBase64ToString(string str) { return ""; }
@@ -557,9 +621,21 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
557 return new LSL_Types.Quaternion(); 621 return new LSL_Types.Quaternion();
558 } 622 }
559 623
560 public string llGetObjectDesc() { return ""; } 624 public string llGetObjectDesc()
561 public void llSetObjectDesc(string desc) { } 625 {
562 public string llGetCreator() { return ""; } 626 return m_host.Description;
627 }
628
629 public void llSetObjectDesc(string desc)
630 {
631 m_host.Description = desc;
632 }
633
634 public string llGetCreator()
635 {
636 return m_host.ObjectCreator.ToStringHyphenated();
637 }
638
563 public string llGetTimestamp() { return ""; } 639 public string llGetTimestamp() { return ""; }
564 public void llSetLinkAlpha(int linknumber, double alpha, int face) { } 640 public void llSetLinkAlpha(int linknumber, double alpha, int face) { }
565 public int llGetNumberOfPrims() { return 0; } 641 public int llGetNumberOfPrims() { return 0; }
@@ -569,14 +645,26 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
569 public void llGetPrimitiveParams() { } 645 public void llGetPrimitiveParams() { }
570 public string llIntegerToBase64(int number) { return ""; } 646 public string llIntegerToBase64(int number) { return ""; }
571 public int llBase64ToInteger(string str) { return 0; } 647 public int llBase64ToInteger(string str) { return 0; }
572 public double llGetGMTclock() { return DateTime.UtcNow.TimeOfDay.TotalSeconds; } 648
573 public string llGetSimulatorHostname() { return System.Environment.MachineName; } 649 public double llGetGMTclock()
650 {
651 return DateTime.UtcNow.TimeOfDay.TotalSeconds;
652 }
653
654 public string llGetSimulatorHostname()
655 {
656 return System.Environment.MachineName;
657 }
658
574 public void llSetLocalRot(LSL_Types.Quaternion rot) { } 659 public void llSetLocalRot(LSL_Types.Quaternion rot) { }
575 public List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers) 660 public List<string> llParseStringKeepNulls(string src, List<string> seperators, List<string> spacers)
576 { return new List<string>(); } 661 { return new List<string>(); }
577 public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Quaternion rot, int param) { } 662 public void llRezAtRoot(string inventory, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Quaternion rot, int param) { }
663
578 public int llGetObjectPermMask(int mask) { return 0; } 664 public int llGetObjectPermMask(int mask) { return 0; }
665
579 public void llSetObjectPermMask(int mask, int value) { } 666 public void llSetObjectPermMask(int mask, int value) { }
667
580 public void llGetInventoryPermMask(string item, int mask) { } 668 public void llGetInventoryPermMask(string item, int mask) { }
581 public void llSetInventoryPermMask(string item, int mask, int value) { } 669 public void llSetInventoryPermMask(string item, int mask, int value) { }
582 public string llGetInventoryCreator(string item) { return ""; } 670 public string llGetInventoryCreator(string item) { return ""; }
@@ -585,11 +673,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
585 public void llForceMouselook(int mouselook) { } 673 public void llForceMouselook(int mouselook) { }
586 public double llGetObjectMass(string id) { return 0; } 674 public double llGetObjectMass(string id) { return 0; }
587 public void llListReplaceList() { } 675 public void llListReplaceList() { }
676
588 public void llLoadURL(string avatar_id, string message, string url) 677 public void llLoadURL(string avatar_id, string message, string url)
589 { 678 {
590 LLUUID avatarId = new LLUUID(avatar_id); 679 LLUUID avatarId = new LLUUID(avatar_id);
591 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url); 680 m_ScriptEngine.World.SendUrlToUser(avatarId, m_host.Name, m_host.UUID, m_host.ObjectOwner, false, message, url);
592 } 681 }
682
593 public void llParcelMediaCommandList(List<string> commandList) { } 683 public void llParcelMediaCommandList(List<string> commandList) { }
594 public void llParcelMediaQuery() { } 684 public void llParcelMediaQuery() { }
595 685
@@ -601,11 +691,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
601 } 691 }
602 692
603 public int llGetInventoryType(string name) { return 0; } 693 public int llGetInventoryType(string name) { return 0; }
694
604 public void llSetPayPrice(int price, List<string> quick_pay_buttons) { } 695 public void llSetPayPrice(int price, List<string> quick_pay_buttons) { }
605 public LSL_Types.Vector3 llGetCameraPos() { return new LSL_Types.Vector3(); } 696 public LSL_Types.Vector3 llGetCameraPos() { return new LSL_Types.Vector3(); }
606 public LSL_Types.Quaternion llGetCameraRot() { return new LSL_Types.Quaternion(); } 697 public LSL_Types.Quaternion llGetCameraRot() { return new LSL_Types.Quaternion(); }
607 public void llSetPrimURL() { } 698 public void llSetPrimURL() { }
608 public void llRefreshPrimURL() { } 699 public void llRefreshPrimURL() { }
700
609 public string llEscapeURL(string url) 701 public string llEscapeURL(string url)
610 { 702 {
611 try 703 try
@@ -617,6 +709,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
617 return "llEscapeURL: " + ex.ToString(); 709 return "llEscapeURL: " + ex.ToString();
618 } 710 }
619 } 711 }
712
620 public string llUnescapeURL(string url) 713 public string llUnescapeURL(string url)
621 { 714 {
622 try 715 try
@@ -635,10 +728,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler
635 public void llSetCameraParams(List<string> rules) { } 728 public void llSetCameraParams(List<string> rules) { }
636 public void llClearCameraParams() { } 729 public void llClearCameraParams() { }
637 public double llListStatistics(int operation, List<string> src) { return 0; } 730 public double llListStatistics(int operation, List<string> src) { return 0; }
731
638 public int llGetUnixTime() 732 public int llGetUnixTime()
639 { 733 {
640 return OpenSim.Framework.Utilities.Util.UnixTimeSinceEpoch(); 734 return OpenSim.Framework.Util.UnixTimeSinceEpoch();
641 } 735 }
736
642 public int llGetParcelFlags(LSL_Types.Vector3 pos) { return 0; } 737 public int llGetParcelFlags(LSL_Types.Vector3 pos) { return 0; }
643 public int llGetRegionFlags() { return 0; } 738 public int llGetRegionFlags() { return 0; }
644 public string llXorBase64StringsCorrect(string str1, string str2) { return ""; } 739 public string llXorBase64StringsCorrect(string str1, string str2) { return ""; }