diff options
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 1005 |
1 files changed, 469 insertions, 536 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 10afe99..993fc6f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -111,7 +111,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
111 | 111 | ||
112 | protected bool throwErrorOnNotImplemented = false; | 112 | protected bool throwErrorOnNotImplemented = false; |
113 | protected AsyncCommandManager AsyncCommands = null; | 113 | protected AsyncCommandManager AsyncCommands = null; |
114 | protected float m_ScriptDelayFactor = 1.0f; | ||
115 | protected float m_ScriptDistanceFactor = 1.0f; | 114 | protected float m_ScriptDistanceFactor = 1.0f; |
116 | protected float m_MinTimerInterval = 0.5f; | 115 | protected float m_MinTimerInterval = 0.5f; |
117 | protected float m_recoilScaleFactor = 0.0f; | 116 | protected float m_recoilScaleFactor = 0.0f; |
@@ -130,64 +129,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
130 | 129 | ||
131 | protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache = new Dictionary<UUID, UserInfoCacheEntry>(); | 130 | protected Dictionary<UUID, UserInfoCacheEntry> m_userInfoCache = new Dictionary<UUID, UserInfoCacheEntry>(); |
132 | protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp. | 131 | protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp. |
133 | protected int m_sleepMsOnSetTexture = 200; | ||
134 | protected int m_sleepMsOnSetLinkTexture = 200; | ||
135 | protected int m_sleepMsOnScaleTexture = 200; | ||
136 | protected int m_sleepMsOnOffsetTexture = 200; | ||
137 | protected int m_sleepMsOnRotateTexture = 200; | ||
138 | protected int m_sleepMsOnSetPos = 200; | ||
139 | protected int m_sleepMsOnSetRot = 200; | ||
140 | protected int m_sleepMsOnSetLocalRot = 200; | ||
141 | protected int m_sleepMsOnPreloadSound = 1000; | ||
142 | protected int m_sleepMsOnMakeExplosion = 100; | ||
143 | protected int m_sleepMsOnMakeFountain = 100; | ||
144 | protected int m_sleepMsOnMakeSmoke = 100; | ||
145 | protected int m_sleepMsOnMakeFire = 100; | ||
146 | protected int m_sleepMsOnRezAtRoot = 100; | ||
147 | protected int m_sleepMsOnInstantMessage = 2000; | ||
148 | protected int m_sleepMsOnEmail = 20000; | ||
149 | protected int m_sleepMsOnCreateLink = 1000; | ||
150 | protected int m_sleepMsOnGiveInventory = 3000; | ||
151 | protected int m_sleepMsOnRequestAgentData = 100; | ||
152 | protected int m_sleepMsOnRequestInventoryData = 1000; | ||
153 | protected int m_sleepMsOnSetDamage = 5000; | ||
154 | protected int m_sleepMsOnTextBox = 1000; | ||
155 | protected int m_sleepMsOnAdjustSoundVolume = 100; | ||
156 | protected int m_sleepMsOnEjectFromLand = 1000; | ||
157 | protected int m_sleepMsOnAddToLandPassList = 100; | ||
158 | protected int m_sleepMsOnDialog = 1000; | ||
159 | protected int m_sleepMsOnRemoteLoadScript = 3000; | ||
160 | protected int m_sleepMsOnRemoteLoadScriptPin = 3000; | ||
161 | protected int m_sleepMsOnOpenRemoteDataChannel = 1000; | ||
162 | protected int m_sleepMsOnSendRemoteData = 3000; | ||
163 | protected int m_sleepMsOnRemoteDataReply = 3000; | ||
164 | protected int m_sleepMsOnCloseRemoteDataChannel = 1000; | ||
165 | protected int m_sleepMsOnSetPrimitiveParams = 200; | ||
166 | protected int m_sleepMsOnSetLinkPrimitiveParams = 200; | ||
167 | protected int m_sleepMsOnXorBase64Strings = 300; | ||
168 | protected int m_sleepMsOnSetParcelMusicURL = 2000; | ||
169 | protected int m_sleepMsOnGetPrimMediaParams = 1000; | ||
170 | protected int m_sleepMsOnGetLinkMedia = 1000; | ||
171 | protected int m_sleepMsOnSetPrimMediaParams = 1000; | ||
172 | protected int m_sleepMsOnSetLinkMedia = 1000; | ||
173 | protected int m_sleepMsOnClearPrimMedia = 1000; | ||
174 | protected int m_sleepMsOnClearLinkMedia = 1000; | ||
175 | protected int m_sleepMsOnRequestSimulatorData = 1000; | ||
176 | protected int m_sleepMsOnLoadURL = 10000; | ||
177 | protected int m_sleepMsOnParcelMediaCommandList = 2000; | ||
178 | protected int m_sleepMsOnParcelMediaQuery = 2000; | ||
179 | protected int m_sleepMsOnModPow = 1000; | ||
180 | protected int m_sleepMsOnSetPrimURL = 2000; | ||
181 | protected int m_sleepMsOnRefreshPrimURL = 20000; | ||
182 | protected int m_sleepMsOnMapDestination = 1000; | ||
183 | protected int m_sleepMsOnAddToLandBanList = 100; | ||
184 | protected int m_sleepMsOnRemoveFromLandPassList = 100; | ||
185 | protected int m_sleepMsOnRemoveFromLandBanList = 100; | ||
186 | protected int m_sleepMsOnResetLandBanList = 100; | ||
187 | protected int m_sleepMsOnResetLandPassList = 100; | ||
188 | protected int m_sleepMsOnGetParcelPrimOwners = 2000; | ||
189 | protected int m_sleepMsOnGetNumberOfNotecardLines = 100; | ||
190 | protected int m_sleepMsOnGetNotecardLine = 100; | ||
191 | protected string m_internalObjectHost = "lsl.opensim.local"; | 132 | protected string m_internalObjectHost = "lsl.opensim.local"; |
192 | protected bool m_restrictEmail = false; | 133 | protected bool m_restrictEmail = false; |
193 | protected ISoundModule m_SoundModule = null; | 134 | protected ISoundModule m_SoundModule = null; |
@@ -326,10 +267,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
326 | 267 | ||
327 | if (seConfig != null) | 268 | if (seConfig != null) |
328 | { | 269 | { |
329 | m_ScriptDelayFactor = | ||
330 | seConfig.GetFloat("ScriptDelayFactor", m_ScriptDelayFactor); | ||
331 | m_ScriptDistanceFactor = | ||
332 | seConfig.GetFloat("ScriptDistanceLimitFactor", m_ScriptDistanceFactor); | ||
333 | m_MinTimerInterval = | 270 | m_MinTimerInterval = |
334 | seConfig.GetFloat("MinTimerInterval", m_MinTimerInterval); | 271 | seConfig.GetFloat("MinTimerInterval", m_MinTimerInterval); |
335 | m_automaticLinkPermission = | 272 | m_automaticLinkPermission = |
@@ -414,7 +351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
414 | m_internalObjectHost = smtpConfig.GetString("internal_object_host", m_internalObjectHost); | 351 | m_internalObjectHost = smtpConfig.GetString("internal_object_host", m_internalObjectHost); |
415 | } | 352 | } |
416 | } | 353 | } |
417 | m_sleepMsOnEmail = EMAIL_PAUSE_TIME * 1000; | 354 | //// m_sleepMsOnEmail = EMAIL_PAUSE_TIME * 1000; |
418 | } | 355 | } |
419 | 356 | ||
420 | public override Object InitializeLifetimeService() | 357 | public override Object InitializeLifetimeService() |
@@ -443,14 +380,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
443 | return p; | 380 | return p; |
444 | } | 381 | } |
445 | 382 | ||
446 | protected virtual void ScriptSleep(int delay) | 383 | //// protected virtual void ScriptSleep(int delay) |
447 | { | 384 | //// { |
448 | delay = (int)(delay * m_ScriptDelayFactor); | 385 | //// delay = (int)(delay * m_ScriptDelayFactor); |
449 | if (delay < 10) | 386 | //// if (delay < 10) |
450 | return; | 387 | //// return; |
451 | 388 | //// | |
452 | Sleep(delay); | 389 | //// Sleep(delay); |
453 | } | 390 | //// } |
454 | 391 | ||
455 | protected virtual void Sleep(int delay) | 392 | protected virtual void Sleep(int delay) |
456 | { | 393 | { |
@@ -483,7 +420,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
483 | [DebuggerNonUserCode] | 420 | [DebuggerNonUserCode] |
484 | public void llResetScript() | 421 | public void llResetScript() |
485 | { | 422 | { |
486 | m_host.AddScriptLPS(1); | 423 | //// m_host.AddScriptLPS(1); |
487 | 424 | ||
488 | // We need to tell the URL module, if we hav one, to release | 425 | // We need to tell the URL module, if we hav one, to release |
489 | // the allocated URLs | 426 | // the allocated URLs |
@@ -499,7 +436,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
499 | 436 | ||
500 | if ((item = GetScriptByName(name)) == UUID.Zero) | 437 | if ((item = GetScriptByName(name)) == UUID.Zero) |
501 | { | 438 | { |
502 | m_host.AddScriptLPS(1); | 439 | //// m_host.AddScriptLPS(1); |
503 | Error("llResetOtherScript", "Can't find script '" + name + "'"); | 440 | Error("llResetOtherScript", "Can't find script '" + name + "'"); |
504 | return; | 441 | return; |
505 | } | 442 | } |
@@ -507,7 +444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
507 | llResetScript(); | 444 | llResetScript(); |
508 | else | 445 | else |
509 | { | 446 | { |
510 | m_host.AddScriptLPS(1); | 447 | //// m_host.AddScriptLPS(1); |
511 | m_ScriptEngine.ResetScript(item); | 448 | m_ScriptEngine.ResetScript(item); |
512 | } | 449 | } |
513 | } | 450 | } |
@@ -516,7 +453,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
516 | { | 453 | { |
517 | UUID item; | 454 | UUID item; |
518 | 455 | ||
519 | m_host.AddScriptLPS(1); | 456 | //// m_host.AddScriptLPS(1); |
520 | 457 | ||
521 | if ((item = GetScriptByName(name)) != UUID.Zero) | 458 | if ((item = GetScriptByName(name)) != UUID.Zero) |
522 | { | 459 | { |
@@ -535,7 +472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
535 | { | 472 | { |
536 | UUID item; | 473 | UUID item; |
537 | 474 | ||
538 | m_host.AddScriptLPS(1); | 475 | //// m_host.AddScriptLPS(1); |
539 | 476 | ||
540 | // These functions are supposed to be robust, | 477 | // These functions are supposed to be robust, |
541 | // so get the state one step at a time. | 478 | // so get the state one step at a time. |
@@ -779,44 +716,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
779 | //These are the implementations of the various ll-functions used by the LSL scripts. | 716 | //These are the implementations of the various ll-functions used by the LSL scripts. |
780 | public LSL_Float llSin(double f) | 717 | public LSL_Float llSin(double f) |
781 | { | 718 | { |
782 | m_host.AddScriptLPS(1); | 719 | //// m_host.AddScriptLPS(1); |
783 | return (double)Math.Sin(f); | 720 | return (double)Math.Sin(f); |
784 | } | 721 | } |
785 | 722 | ||
786 | public LSL_Float llCos(double f) | 723 | public LSL_Float llCos(double f) |
787 | { | 724 | { |
788 | m_host.AddScriptLPS(1); | 725 | //// m_host.AddScriptLPS(1); |
789 | return Math.Cos(f); | 726 | return Math.Cos(f); |
790 | } | 727 | } |
791 | 728 | ||
792 | public LSL_Float llTan(double f) | 729 | public LSL_Float llTan(double f) |
793 | { | 730 | { |
794 | m_host.AddScriptLPS(1); | 731 | //// m_host.AddScriptLPS(1); |
795 | return Math.Tan(f); | 732 | return Math.Tan(f); |
796 | } | 733 | } |
797 | 734 | ||
798 | public LSL_Float llAtan2(LSL_Float x, LSL_Float y) | 735 | public LSL_Float llAtan2(LSL_Float x, LSL_Float y) |
799 | { | 736 | { |
800 | m_host.AddScriptLPS(1); | 737 | //// m_host.AddScriptLPS(1); |
801 | return Math.Atan2(x, y); | 738 | return Math.Atan2(x, y); |
802 | } | 739 | } |
803 | 740 | ||
804 | public LSL_Float llSqrt(double f) | 741 | public LSL_Float llSqrt(double f) |
805 | { | 742 | { |
806 | m_host.AddScriptLPS(1); | 743 | //// m_host.AddScriptLPS(1); |
807 | return Math.Sqrt(f); | 744 | return Math.Sqrt(f); |
808 | } | 745 | } |
809 | 746 | ||
810 | public LSL_Float llPow(double fbase, double fexponent) | 747 | public LSL_Float llPow(double fbase, double fexponent) |
811 | { | 748 | { |
812 | m_host.AddScriptLPS(1); | 749 | //// m_host.AddScriptLPS(1); |
813 | return (double)Math.Pow(fbase, fexponent); | 750 | return (double)Math.Pow(fbase, fexponent); |
814 | } | 751 | } |
815 | 752 | ||
816 | public LSL_Integer llAbs(LSL_Integer i) | 753 | public LSL_Integer llAbs(LSL_Integer i) |
817 | { | 754 | { |
818 | // changed to replicate LSL behaviour whereby minimum int value is returned untouched. | 755 | // changed to replicate LSL behaviour whereby minimum int value is returned untouched. |
819 | m_host.AddScriptLPS(1); | 756 | //// m_host.AddScriptLPS(1); |
820 | if (i == Int32.MinValue) | 757 | if (i == Int32.MinValue) |
821 | return i; | 758 | return i; |
822 | else | 759 | else |
@@ -825,13 +762,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
825 | 762 | ||
826 | public LSL_Float llFabs(double f) | 763 | public LSL_Float llFabs(double f) |
827 | { | 764 | { |
828 | m_host.AddScriptLPS(1); | 765 | //// m_host.AddScriptLPS(1); |
829 | return (double)Math.Abs(f); | 766 | return (double)Math.Abs(f); |
830 | } | 767 | } |
831 | 768 | ||
832 | public LSL_Float llFrand(double mag) | 769 | public LSL_Float llFrand(double mag) |
833 | { | 770 | { |
834 | m_host.AddScriptLPS(1); | 771 | //// m_host.AddScriptLPS(1); |
835 | lock (Util.RandomClass) | 772 | lock (Util.RandomClass) |
836 | { | 773 | { |
837 | return Util.RandomClass.NextDouble() * mag; | 774 | return Util.RandomClass.NextDouble() * mag; |
@@ -840,33 +777,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
840 | 777 | ||
841 | public LSL_Integer llFloor(double f) | 778 | public LSL_Integer llFloor(double f) |
842 | { | 779 | { |
843 | m_host.AddScriptLPS(1); | 780 | //// m_host.AddScriptLPS(1); |
844 | return (int)Math.Floor(f); | 781 | return (int)Math.Floor(f); |
845 | } | 782 | } |
846 | 783 | ||
847 | public LSL_Integer llCeil(double f) | 784 | public LSL_Integer llCeil(double f) |
848 | { | 785 | { |
849 | m_host.AddScriptLPS(1); | 786 | //// m_host.AddScriptLPS(1); |
850 | return (int)Math.Ceiling(f); | 787 | return (int)Math.Ceiling(f); |
851 | } | 788 | } |
852 | 789 | ||
853 | // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven) | 790 | // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven) |
854 | public LSL_Integer llRound(double f) | 791 | public LSL_Integer llRound(double f) |
855 | { | 792 | { |
856 | m_host.AddScriptLPS(1); | 793 | //// m_host.AddScriptLPS(1); |
857 | return (int)Math.Round(f, MidpointRounding.AwayFromZero); | 794 | return (int)Math.Round(f, MidpointRounding.AwayFromZero); |
858 | } | 795 | } |
859 | 796 | ||
860 | //This next group are vector operations involving squaring and square root. ckrinke | 797 | //This next group are vector operations involving squaring and square root. ckrinke |
861 | public LSL_Float llVecMag(LSL_Vector v) | 798 | public LSL_Float llVecMag(LSL_Vector v) |
862 | { | 799 | { |
863 | m_host.AddScriptLPS(1); | 800 | //// m_host.AddScriptLPS(1); |
864 | return LSL_Vector.Mag(v); | 801 | return LSL_Vector.Mag(v); |
865 | } | 802 | } |
866 | 803 | ||
867 | public LSL_Vector llVecNorm(LSL_Vector v) | 804 | public LSL_Vector llVecNorm(LSL_Vector v) |
868 | { | 805 | { |
869 | m_host.AddScriptLPS(1); | 806 | //// m_host.AddScriptLPS(1); |
870 | return LSL_Vector.Norm(v); | 807 | return LSL_Vector.Norm(v); |
871 | } | 808 | } |
872 | 809 | ||
@@ -880,7 +817,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
880 | 817 | ||
881 | public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) | 818 | public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) |
882 | { | 819 | { |
883 | m_host.AddScriptLPS(1); | 820 | //// m_host.AddScriptLPS(1); |
884 | return VecDist(a, b); | 821 | return VecDist(a, b); |
885 | } | 822 | } |
886 | 823 | ||
@@ -890,7 +827,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
890 | 827 | ||
891 | public LSL_Vector llRot2Euler(LSL_Rotation q1) | 828 | public LSL_Vector llRot2Euler(LSL_Rotation q1) |
892 | { | 829 | { |
893 | m_host.AddScriptLPS(1); | 830 | //// m_host.AddScriptLPS(1); |
894 | LSL_Vector eul = new LSL_Vector(); | 831 | LSL_Vector eul = new LSL_Vector(); |
895 | 832 | ||
896 | double sqw = q1.s*q1.s; | 833 | double sqw = q1.s*q1.s; |
@@ -964,7 +901,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
964 | 901 | ||
965 | public LSL_Rotation llEuler2Rot(LSL_Vector v) | 902 | public LSL_Rotation llEuler2Rot(LSL_Vector v) |
966 | { | 903 | { |
967 | m_host.AddScriptLPS(1); | 904 | //// m_host.AddScriptLPS(1); |
968 | 905 | ||
969 | double x,y,z,s; | 906 | double x,y,z,s; |
970 | v.x *= 0.5; | 907 | v.x *= 0.5; |
@@ -991,7 +928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
991 | 928 | ||
992 | public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up) | 929 | public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up) |
993 | { | 930 | { |
994 | m_host.AddScriptLPS(1); | 931 | //// m_host.AddScriptLPS(1); |
995 | double s; | 932 | double s; |
996 | double tr = fwd.x + left.y + up.z + 1.0; | 933 | double tr = fwd.x + left.y + up.z + 1.0; |
997 | 934 | ||
@@ -1046,7 +983,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1046 | 983 | ||
1047 | public LSL_Vector llRot2Fwd(LSL_Rotation r) | 984 | public LSL_Vector llRot2Fwd(LSL_Rotation r) |
1048 | { | 985 | { |
1049 | m_host.AddScriptLPS(1); | 986 | //// m_host.AddScriptLPS(1); |
1050 | 987 | ||
1051 | double x, y, z, m; | 988 | double x, y, z, m; |
1052 | 989 | ||
@@ -1071,7 +1008,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1071 | 1008 | ||
1072 | public LSL_Vector llRot2Left(LSL_Rotation r) | 1009 | public LSL_Vector llRot2Left(LSL_Rotation r) |
1073 | { | 1010 | { |
1074 | m_host.AddScriptLPS(1); | 1011 | //// m_host.AddScriptLPS(1); |
1075 | 1012 | ||
1076 | double x, y, z, m; | 1013 | double x, y, z, m; |
1077 | 1014 | ||
@@ -1096,7 +1033,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1096 | 1033 | ||
1097 | public LSL_Vector llRot2Up(LSL_Rotation r) | 1034 | public LSL_Vector llRot2Up(LSL_Rotation r) |
1098 | { | 1035 | { |
1099 | m_host.AddScriptLPS(1); | 1036 | //// m_host.AddScriptLPS(1); |
1100 | double x, y, z, m; | 1037 | double x, y, z, m; |
1101 | 1038 | ||
1102 | m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; | 1039 | m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; |
@@ -1121,7 +1058,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1121 | public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b) | 1058 | public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b) |
1122 | { | 1059 | { |
1123 | //A and B should both be normalized | 1060 | //A and B should both be normalized |
1124 | m_host.AddScriptLPS(1); | 1061 | //// m_host.AddScriptLPS(1); |
1125 | /* This method is more accurate than the SL one, and thus causes problems | 1062 | /* This method is more accurate than the SL one, and thus causes problems |
1126 | for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. | 1063 | for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. |
1127 | 1064 | ||
@@ -1194,7 +1131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1194 | 1131 | ||
1195 | public void llWhisper(int channelID, string text) | 1132 | public void llWhisper(int channelID, string text) |
1196 | { | 1133 | { |
1197 | m_host.AddScriptLPS(1); | 1134 | //// m_host.AddScriptLPS(1); |
1198 | 1135 | ||
1199 | if (text.Length > 1023) | 1136 | if (text.Length > 1023) |
1200 | text = text.Substring(0, 1023); | 1137 | text = text.Substring(0, 1023); |
@@ -1221,14 +1158,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1221 | 1158 | ||
1222 | public void llSay(int channelID, string text) | 1159 | public void llSay(int channelID, string text) |
1223 | { | 1160 | { |
1224 | m_host.AddScriptLPS(1); | 1161 | //// m_host.AddScriptLPS(1); |
1225 | 1162 | ||
1226 | if (channelID == 0) | 1163 | if (channelID == 0) |
1227 | // m_SayShoutCount++; | 1164 | // m_SayShoutCount++; |
1228 | CheckSayShoutTime(); | 1165 | CheckSayShoutTime(); |
1229 | 1166 | ||
1230 | if (m_SayShoutCount >= 11) | 1167 | //// if (m_SayShoutCount >= 11) |
1231 | ScriptSleep(2000); | 1168 | //// ScriptSleep(2000); |
1232 | 1169 | ||
1233 | if (m_scriptConsoleChannelEnabled && (channelID == m_scriptConsoleChannel)) | 1170 | if (m_scriptConsoleChannelEnabled && (channelID == m_scriptConsoleChannel)) |
1234 | { | 1171 | { |
@@ -1250,14 +1187,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1250 | 1187 | ||
1251 | public void llShout(int channelID, string text) | 1188 | public void llShout(int channelID, string text) |
1252 | { | 1189 | { |
1253 | m_host.AddScriptLPS(1); | 1190 | //// m_host.AddScriptLPS(1); |
1254 | 1191 | ||
1255 | if (channelID == 0) | 1192 | if (channelID == 0) |
1256 | // m_SayShoutCount++; | 1193 | // m_SayShoutCount++; |
1257 | CheckSayShoutTime(); | 1194 | CheckSayShoutTime(); |
1258 | 1195 | ||
1259 | if (m_SayShoutCount >= 11) | 1196 | //// if (m_SayShoutCount >= 11) |
1260 | ScriptSleep(2000); | 1197 | //// ScriptSleep(2000); |
1261 | 1198 | ||
1262 | if (text.Length > 1023) | 1199 | if (text.Length > 1023) |
1263 | text = text.Substring(0, 1023); | 1200 | text = text.Substring(0, 1023); |
@@ -1281,7 +1218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1281 | if (text.Length > 1023) | 1218 | if (text.Length > 1023) |
1282 | text = text.Substring(0, 1023); | 1219 | text = text.Substring(0, 1023); |
1283 | 1220 | ||
1284 | m_host.AddScriptLPS(1); | 1221 | //// m_host.AddScriptLPS(1); |
1285 | 1222 | ||
1286 | // debug channel is also sent to avatars | 1223 | // debug channel is also sent to avatars |
1287 | if (channelID == ScriptBaseClass.DEBUG_CHANNEL) | 1224 | if (channelID == ScriptBaseClass.DEBUG_CHANNEL) |
@@ -1301,7 +1238,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1301 | if (msg.Length > 1023) | 1238 | if (msg.Length > 1023) |
1302 | msg = msg.Substring(0, 1023); | 1239 | msg = msg.Substring(0, 1023); |
1303 | 1240 | ||
1304 | m_host.AddScriptLPS(1); | 1241 | //// m_host.AddScriptLPS(1); |
1305 | 1242 | ||
1306 | if (channel == ScriptBaseClass.DEBUG_CHANNEL) | 1243 | if (channel == ScriptBaseClass.DEBUG_CHANNEL) |
1307 | return; | 1244 | return; |
@@ -1316,7 +1253,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1316 | 1253 | ||
1317 | public LSL_Integer llListen(int channelID, string name, string ID, string msg) | 1254 | public LSL_Integer llListen(int channelID, string name, string ID, string msg) |
1318 | { | 1255 | { |
1319 | m_host.AddScriptLPS(1); | 1256 | //// m_host.AddScriptLPS(1); |
1320 | UUID keyID; | 1257 | UUID keyID; |
1321 | UUID.TryParse(ID, out keyID); | 1258 | UUID.TryParse(ID, out keyID); |
1322 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 1259 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
@@ -1328,7 +1265,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1328 | 1265 | ||
1329 | public void llListenControl(int number, int active) | 1266 | public void llListenControl(int number, int active) |
1330 | { | 1267 | { |
1331 | m_host.AddScriptLPS(1); | 1268 | //// m_host.AddScriptLPS(1); |
1332 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 1269 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
1333 | if (wComm != null) | 1270 | if (wComm != null) |
1334 | wComm.ListenControl(m_item.ItemID, number, active); | 1271 | wComm.ListenControl(m_item.ItemID, number, active); |
@@ -1336,7 +1273,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1336 | 1273 | ||
1337 | public void llListenRemove(int number) | 1274 | public void llListenRemove(int number) |
1338 | { | 1275 | { |
1339 | m_host.AddScriptLPS(1); | 1276 | //// m_host.AddScriptLPS(1); |
1340 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 1277 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
1341 | if (wComm != null) | 1278 | if (wComm != null) |
1342 | wComm.ListenRemove(m_item.ItemID, number); | 1279 | wComm.ListenRemove(m_item.ItemID, number); |
@@ -1344,7 +1281,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1344 | 1281 | ||
1345 | public void llSensor(string name, string id, int type, double range, double arc) | 1282 | public void llSensor(string name, string id, int type, double range, double arc) |
1346 | { | 1283 | { |
1347 | m_host.AddScriptLPS(1); | 1284 | //// m_host.AddScriptLPS(1); |
1348 | UUID keyID = UUID.Zero; | 1285 | UUID keyID = UUID.Zero; |
1349 | UUID.TryParse(id, out keyID); | 1286 | UUID.TryParse(id, out keyID); |
1350 | 1287 | ||
@@ -1353,7 +1290,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1353 | 1290 | ||
1354 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) | 1291 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) |
1355 | { | 1292 | { |
1356 | m_host.AddScriptLPS(1); | 1293 | //// m_host.AddScriptLPS(1); |
1357 | UUID keyID = UUID.Zero; | 1294 | UUID keyID = UUID.Zero; |
1358 | UUID.TryParse(id, out keyID); | 1295 | UUID.TryParse(id, out keyID); |
1359 | 1296 | ||
@@ -1362,7 +1299,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1362 | 1299 | ||
1363 | public void llSensorRemove() | 1300 | public void llSensorRemove() |
1364 | { | 1301 | { |
1365 | m_host.AddScriptLPS(1); | 1302 | //// m_host.AddScriptLPS(1); |
1366 | AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID); | 1303 | AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID); |
1367 | } | 1304 | } |
1368 | 1305 | ||
@@ -1403,7 +1340,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1403 | 1340 | ||
1404 | public LSL_String llDetectedName(int number) | 1341 | public LSL_String llDetectedName(int number) |
1405 | { | 1342 | { |
1406 | m_host.AddScriptLPS(1); | 1343 | //// m_host.AddScriptLPS(1); |
1407 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1344 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1408 | if (detectedParams == null) | 1345 | if (detectedParams == null) |
1409 | return String.Empty; | 1346 | return String.Empty; |
@@ -1412,7 +1349,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1412 | 1349 | ||
1413 | public LSL_Key llDetectedKey(int number) | 1350 | public LSL_Key llDetectedKey(int number) |
1414 | { | 1351 | { |
1415 | m_host.AddScriptLPS(1); | 1352 | //// m_host.AddScriptLPS(1); |
1416 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1353 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1417 | if (detectedParams == null) | 1354 | if (detectedParams == null) |
1418 | return String.Empty; | 1355 | return String.Empty; |
@@ -1421,7 +1358,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1421 | 1358 | ||
1422 | public LSL_Key llDetectedOwner(int number) | 1359 | public LSL_Key llDetectedOwner(int number) |
1423 | { | 1360 | { |
1424 | m_host.AddScriptLPS(1); | 1361 | //// m_host.AddScriptLPS(1); |
1425 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1362 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1426 | if (detectedParams == null) | 1363 | if (detectedParams == null) |
1427 | return String.Empty; | 1364 | return String.Empty; |
@@ -1430,7 +1367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1430 | 1367 | ||
1431 | public LSL_Integer llDetectedType(int number) | 1368 | public LSL_Integer llDetectedType(int number) |
1432 | { | 1369 | { |
1433 | m_host.AddScriptLPS(1); | 1370 | //// m_host.AddScriptLPS(1); |
1434 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1371 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1435 | if (detectedParams == null) | 1372 | if (detectedParams == null) |
1436 | return 0; | 1373 | return 0; |
@@ -1439,7 +1376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1439 | 1376 | ||
1440 | public LSL_Vector llDetectedPos(int number) | 1377 | public LSL_Vector llDetectedPos(int number) |
1441 | { | 1378 | { |
1442 | m_host.AddScriptLPS(1); | 1379 | //// m_host.AddScriptLPS(1); |
1443 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1380 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1444 | if (detectedParams == null) | 1381 | if (detectedParams == null) |
1445 | return new LSL_Vector(); | 1382 | return new LSL_Vector(); |
@@ -1448,7 +1385,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1448 | 1385 | ||
1449 | public LSL_Vector llDetectedVel(int number) | 1386 | public LSL_Vector llDetectedVel(int number) |
1450 | { | 1387 | { |
1451 | m_host.AddScriptLPS(1); | 1388 | //// m_host.AddScriptLPS(1); |
1452 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1389 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1453 | if (detectedParams == null) | 1390 | if (detectedParams == null) |
1454 | return new LSL_Vector(); | 1391 | return new LSL_Vector(); |
@@ -1457,7 +1394,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1457 | 1394 | ||
1458 | public LSL_Vector llDetectedGrab(int number) | 1395 | public LSL_Vector llDetectedGrab(int number) |
1459 | { | 1396 | { |
1460 | m_host.AddScriptLPS(1); | 1397 | //// m_host.AddScriptLPS(1); |
1461 | DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1398 | DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1462 | if (parms == null) | 1399 | if (parms == null) |
1463 | return new LSL_Vector(0, 0, 0); | 1400 | return new LSL_Vector(0, 0, 0); |
@@ -1467,7 +1404,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1467 | 1404 | ||
1468 | public LSL_Rotation llDetectedRot(int number) | 1405 | public LSL_Rotation llDetectedRot(int number) |
1469 | { | 1406 | { |
1470 | m_host.AddScriptLPS(1); | 1407 | //// m_host.AddScriptLPS(1); |
1471 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1408 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1472 | if (detectedParams == null) | 1409 | if (detectedParams == null) |
1473 | return new LSL_Rotation(); | 1410 | return new LSL_Rotation(); |
@@ -1476,7 +1413,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1476 | 1413 | ||
1477 | public LSL_Integer llDetectedGroup(int number) | 1414 | public LSL_Integer llDetectedGroup(int number) |
1478 | { | 1415 | { |
1479 | m_host.AddScriptLPS(1); | 1416 | //// m_host.AddScriptLPS(1); |
1480 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1417 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1481 | if (detectedParams == null) | 1418 | if (detectedParams == null) |
1482 | return new LSL_Integer(0); | 1419 | return new LSL_Integer(0); |
@@ -1487,7 +1424,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1487 | 1424 | ||
1488 | public LSL_Integer llDetectedLinkNumber(int number) | 1425 | public LSL_Integer llDetectedLinkNumber(int number) |
1489 | { | 1426 | { |
1490 | m_host.AddScriptLPS(1); | 1427 | //// m_host.AddScriptLPS(1); |
1491 | DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1428 | DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1492 | if (parms == null) | 1429 | if (parms == null) |
1493 | return new LSL_Integer(0); | 1430 | return new LSL_Integer(0); |
@@ -1500,7 +1437,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1500 | /// </summary> | 1437 | /// </summary> |
1501 | public LSL_Vector llDetectedTouchBinormal(int index) | 1438 | public LSL_Vector llDetectedTouchBinormal(int index) |
1502 | { | 1439 | { |
1503 | m_host.AddScriptLPS(1); | 1440 | //// m_host.AddScriptLPS(1); |
1504 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1441 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1505 | if (detectedParams == null) | 1442 | if (detectedParams == null) |
1506 | return new LSL_Vector(); | 1443 | return new LSL_Vector(); |
@@ -1512,7 +1449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1512 | /// </summary> | 1449 | /// </summary> |
1513 | public LSL_Integer llDetectedTouchFace(int index) | 1450 | public LSL_Integer llDetectedTouchFace(int index) |
1514 | { | 1451 | { |
1515 | m_host.AddScriptLPS(1); | 1452 | //// m_host.AddScriptLPS(1); |
1516 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1453 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1517 | if (detectedParams == null) | 1454 | if (detectedParams == null) |
1518 | return new LSL_Integer(-1); | 1455 | return new LSL_Integer(-1); |
@@ -1524,7 +1461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1524 | /// </summary> | 1461 | /// </summary> |
1525 | public LSL_Vector llDetectedTouchNormal(int index) | 1462 | public LSL_Vector llDetectedTouchNormal(int index) |
1526 | { | 1463 | { |
1527 | m_host.AddScriptLPS(1); | 1464 | //// m_host.AddScriptLPS(1); |
1528 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1465 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1529 | if (detectedParams == null) | 1466 | if (detectedParams == null) |
1530 | return new LSL_Vector(); | 1467 | return new LSL_Vector(); |
@@ -1536,7 +1473,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1536 | /// </summary> | 1473 | /// </summary> |
1537 | public LSL_Vector llDetectedTouchPos(int index) | 1474 | public LSL_Vector llDetectedTouchPos(int index) |
1538 | { | 1475 | { |
1539 | m_host.AddScriptLPS(1); | 1476 | //// m_host.AddScriptLPS(1); |
1540 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1477 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1541 | if (detectedParams == null) | 1478 | if (detectedParams == null) |
1542 | return new LSL_Vector(); | 1479 | return new LSL_Vector(); |
@@ -1548,7 +1485,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1548 | /// </summary> | 1485 | /// </summary> |
1549 | public LSL_Vector llDetectedTouchST(int index) | 1486 | public LSL_Vector llDetectedTouchST(int index) |
1550 | { | 1487 | { |
1551 | m_host.AddScriptLPS(1); | 1488 | //// m_host.AddScriptLPS(1); |
1552 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1489 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1553 | if (detectedParams == null) | 1490 | if (detectedParams == null) |
1554 | return new LSL_Vector(-1.0, -1.0, 0.0); | 1491 | return new LSL_Vector(-1.0, -1.0, 0.0); |
@@ -1560,7 +1497,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1560 | /// </summary> | 1497 | /// </summary> |
1561 | public LSL_Vector llDetectedTouchUV(int index) | 1498 | public LSL_Vector llDetectedTouchUV(int index) |
1562 | { | 1499 | { |
1563 | m_host.AddScriptLPS(1); | 1500 | //// m_host.AddScriptLPS(1); |
1564 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1501 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1565 | if (detectedParams == null) | 1502 | if (detectedParams == null) |
1566 | return new LSL_Vector(-1.0, -1.0, 0.0); | 1503 | return new LSL_Vector(-1.0, -1.0, 0.0); |
@@ -1570,13 +1507,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1570 | [DebuggerNonUserCode] | 1507 | [DebuggerNonUserCode] |
1571 | public virtual void llDie() | 1508 | public virtual void llDie() |
1572 | { | 1509 | { |
1573 | m_host.AddScriptLPS(1); | 1510 | //// m_host.AddScriptLPS(1); |
1574 | if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException(); | 1511 | if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException(); |
1575 | } | 1512 | } |
1576 | 1513 | ||
1577 | public LSL_Float llGround(LSL_Vector offset) | 1514 | public LSL_Float llGround(LSL_Vector offset) |
1578 | { | 1515 | { |
1579 | m_host.AddScriptLPS(1); | 1516 | //// m_host.AddScriptLPS(1); |
1580 | Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; | 1517 | Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; |
1581 | 1518 | ||
1582 | //Get the slope normal. This gives us the equation of the plane tangent to the slope. | 1519 | //Get the slope normal. This gives us the equation of the plane tangent to the slope. |
@@ -1606,7 +1543,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1606 | 1543 | ||
1607 | public LSL_Float llCloud(LSL_Vector offset) | 1544 | public LSL_Float llCloud(LSL_Vector offset) |
1608 | { | 1545 | { |
1609 | m_host.AddScriptLPS(1); | 1546 | //// m_host.AddScriptLPS(1); |
1610 | float cloudCover = 0f; | 1547 | float cloudCover = 0f; |
1611 | ICloudModule module = World.RequestModuleInterface<ICloudModule>(); | 1548 | ICloudModule module = World.RequestModuleInterface<ICloudModule>(); |
1612 | if (module != null) | 1549 | if (module != null) |
@@ -1623,7 +1560,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1623 | 1560 | ||
1624 | public LSL_Vector llWind(LSL_Vector offset) | 1561 | public LSL_Vector llWind(LSL_Vector offset) |
1625 | { | 1562 | { |
1626 | m_host.AddScriptLPS(1); | 1563 | //// m_host.AddScriptLPS(1); |
1627 | LSL_Vector wind = new LSL_Vector(0, 0, 0); | 1564 | LSL_Vector wind = new LSL_Vector(0, 0, 0); |
1628 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | 1565 | IWindModule module = World.RequestModuleInterface<IWindModule>(); |
1629 | if (module != null) | 1566 | if (module != null) |
@@ -1644,7 +1581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1644 | { | 1581 | { |
1645 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) | 1582 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) |
1646 | return; | 1583 | return; |
1647 | m_host.AddScriptLPS(1); | 1584 | //// m_host.AddScriptLPS(1); |
1648 | 1585 | ||
1649 | int statusrotationaxis = 0; | 1586 | int statusrotationaxis = 0; |
1650 | 1587 | ||
@@ -1761,7 +1698,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1761 | 1698 | ||
1762 | public LSL_Integer llGetStatus(int status) | 1699 | public LSL_Integer llGetStatus(int status) |
1763 | { | 1700 | { |
1764 | m_host.AddScriptLPS(1); | 1701 | //// m_host.AddScriptLPS(1); |
1765 | // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); | 1702 | // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); |
1766 | switch (status) | 1703 | switch (status) |
1767 | { | 1704 | { |
@@ -1830,7 +1767,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1830 | 1767 | ||
1831 | public LSL_Integer llScaleByFactor(double scaling_factor) | 1768 | public LSL_Integer llScaleByFactor(double scaling_factor) |
1832 | { | 1769 | { |
1833 | m_host.AddScriptLPS(1); | 1770 | //// m_host.AddScriptLPS(1); |
1834 | SceneObjectGroup group = m_host.ParentGroup; | 1771 | SceneObjectGroup group = m_host.ParentGroup; |
1835 | 1772 | ||
1836 | if(scaling_factor < 1e-6) | 1773 | if(scaling_factor < 1e-6) |
@@ -1855,7 +1792,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1855 | 1792 | ||
1856 | public LSL_Float llGetMaxScaleFactor() | 1793 | public LSL_Float llGetMaxScaleFactor() |
1857 | { | 1794 | { |
1858 | m_host.AddScriptLPS(1); | 1795 | //// m_host.AddScriptLPS(1); |
1859 | SceneObjectGroup group = m_host.ParentGroup; | 1796 | SceneObjectGroup group = m_host.ParentGroup; |
1860 | 1797 | ||
1861 | if (group == null || group.IsDeleted || group.inTransit) | 1798 | if (group == null || group.IsDeleted || group.inTransit) |
@@ -1866,7 +1803,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1866 | 1803 | ||
1867 | public LSL_Float llGetMinScaleFactor() | 1804 | public LSL_Float llGetMinScaleFactor() |
1868 | { | 1805 | { |
1869 | m_host.AddScriptLPS(1); | 1806 | //// m_host.AddScriptLPS(1); |
1870 | SceneObjectGroup group = m_host.ParentGroup; | 1807 | SceneObjectGroup group = m_host.ParentGroup; |
1871 | 1808 | ||
1872 | if (group == null || group.IsDeleted || group.inTransit) | 1809 | if (group == null || group.IsDeleted || group.inTransit) |
@@ -1877,7 +1814,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1877 | 1814 | ||
1878 | public void llSetScale(LSL_Vector scale) | 1815 | public void llSetScale(LSL_Vector scale) |
1879 | { | 1816 | { |
1880 | m_host.AddScriptLPS(1); | 1817 | //// m_host.AddScriptLPS(1); |
1881 | SetScale(m_host, scale); | 1818 | SetScale(m_host, scale); |
1882 | } | 1819 | } |
1883 | 1820 | ||
@@ -1913,13 +1850,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1913 | 1850 | ||
1914 | public LSL_Vector llGetScale() | 1851 | public LSL_Vector llGetScale() |
1915 | { | 1852 | { |
1916 | m_host.AddScriptLPS(1); | 1853 | //// m_host.AddScriptLPS(1); |
1917 | return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); | 1854 | return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); |
1918 | } | 1855 | } |
1919 | 1856 | ||
1920 | public void llSetClickAction(int action) | 1857 | public void llSetClickAction(int action) |
1921 | { | 1858 | { |
1922 | m_host.AddScriptLPS(1); | 1859 | //// m_host.AddScriptLPS(1); |
1923 | m_host.ClickAction = (byte)action; | 1860 | m_host.ClickAction = (byte)action; |
1924 | m_host.ParentGroup.HasGroupChanged = true; | 1861 | m_host.ParentGroup.HasGroupChanged = true; |
1925 | m_host.ScheduleFullUpdate(); | 1862 | m_host.ScheduleFullUpdate(); |
@@ -1928,7 +1865,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1928 | 1865 | ||
1929 | public void llSetColor(LSL_Vector color, int face) | 1866 | public void llSetColor(LSL_Vector color, int face) |
1930 | { | 1867 | { |
1931 | m_host.AddScriptLPS(1); | 1868 | //// m_host.AddScriptLPS(1); |
1932 | 1869 | ||
1933 | SetColor(m_host, color, face); | 1870 | SetColor(m_host, color, face); |
1934 | } | 1871 | } |
@@ -1943,7 +1880,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1943 | 1880 | ||
1944 | public void llSetContentType(LSL_Key reqid, LSL_Integer type) | 1881 | public void llSetContentType(LSL_Key reqid, LSL_Integer type) |
1945 | { | 1882 | { |
1946 | m_host.AddScriptLPS(1); | 1883 | //// m_host.AddScriptLPS(1); |
1947 | 1884 | ||
1948 | if (m_UrlModule == null) | 1885 | if (m_UrlModule == null) |
1949 | return; | 1886 | return; |
@@ -2165,7 +2102,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2165 | 2102 | ||
2166 | public LSL_Float llGetAlpha(int face) | 2103 | public LSL_Float llGetAlpha(int face) |
2167 | { | 2104 | { |
2168 | m_host.AddScriptLPS(1); | 2105 | //// m_host.AddScriptLPS(1); |
2169 | 2106 | ||
2170 | return GetAlpha(m_host, face); | 2107 | return GetAlpha(m_host, face); |
2171 | } | 2108 | } |
@@ -2191,14 +2128,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2191 | 2128 | ||
2192 | public void llSetAlpha(double alpha, int face) | 2129 | public void llSetAlpha(double alpha, int face) |
2193 | { | 2130 | { |
2194 | m_host.AddScriptLPS(1); | 2131 | //// m_host.AddScriptLPS(1); |
2195 | 2132 | ||
2196 | SetAlpha(m_host, alpha, face); | 2133 | SetAlpha(m_host, alpha, face); |
2197 | } | 2134 | } |
2198 | 2135 | ||
2199 | public void llSetLinkAlpha(int linknumber, double alpha, int face) | 2136 | public void llSetLinkAlpha(int linknumber, double alpha, int face) |
2200 | { | 2137 | { |
2201 | m_host.AddScriptLPS(1); | 2138 | //// m_host.AddScriptLPS(1); |
2202 | 2139 | ||
2203 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 2140 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
2204 | if (parts.Count > 0) | 2141 | if (parts.Count > 0) |
@@ -2336,7 +2273,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2336 | 2273 | ||
2337 | public LSL_Vector llGetColor(int face) | 2274 | public LSL_Vector llGetColor(int face) |
2338 | { | 2275 | { |
2339 | m_host.AddScriptLPS(1); | 2276 | //// m_host.AddScriptLPS(1); |
2340 | return GetColor(m_host, face); | 2277 | return GetColor(m_host, face); |
2341 | } | 2278 | } |
2342 | 2279 | ||
@@ -2383,14 +2320,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2383 | 2320 | ||
2384 | public void llSetTexture(string texture, int face) | 2321 | public void llSetTexture(string texture, int face) |
2385 | { | 2322 | { |
2386 | m_host.AddScriptLPS(1); | 2323 | //// m_host.AddScriptLPS(1); |
2387 | SetTexture(m_host, texture, face); | 2324 | SetTexture(m_host, texture, face); |
2388 | ScriptSleep(m_sleepMsOnSetTexture); | 2325 | //// ScriptSleep(m_sleepMsOnSetTexture); |
2389 | } | 2326 | } |
2390 | 2327 | ||
2391 | public void llSetLinkTexture(int linknumber, string texture, int face) | 2328 | public void llSetLinkTexture(int linknumber, string texture, int face) |
2392 | { | 2329 | { |
2393 | m_host.AddScriptLPS(1); | 2330 | //// m_host.AddScriptLPS(1); |
2394 | 2331 | ||
2395 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 2332 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
2396 | if (parts.Count > 0) | 2333 | if (parts.Count > 0) |
@@ -2402,7 +2339,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2402 | } | 2339 | } |
2403 | finally { } | 2340 | finally { } |
2404 | } | 2341 | } |
2405 | ScriptSleep(m_sleepMsOnSetLinkTexture); | 2342 | //// ScriptSleep(m_sleepMsOnSetLinkTexture); |
2406 | } | 2343 | } |
2407 | 2344 | ||
2408 | protected void SetTextureParams(SceneObjectPart part, string texture, double scaleU, double ScaleV, | 2345 | protected void SetTextureParams(SceneObjectPart part, string texture, double scaleU, double ScaleV, |
@@ -2511,10 +2448,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2511 | 2448 | ||
2512 | public void llScaleTexture(double u, double v, int face) | 2449 | public void llScaleTexture(double u, double v, int face) |
2513 | { | 2450 | { |
2514 | m_host.AddScriptLPS(1); | 2451 | //// m_host.AddScriptLPS(1); |
2515 | 2452 | ||
2516 | ScaleTexture(m_host, u, v, face); | 2453 | ScaleTexture(m_host, u, v, face); |
2517 | ScriptSleep(m_sleepMsOnScaleTexture); | 2454 | //// ScriptSleep(m_sleepMsOnScaleTexture); |
2518 | } | 2455 | } |
2519 | 2456 | ||
2520 | protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) | 2457 | protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) |
@@ -2553,9 +2490,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2553 | 2490 | ||
2554 | public void llOffsetTexture(double u, double v, int face) | 2491 | public void llOffsetTexture(double u, double v, int face) |
2555 | { | 2492 | { |
2556 | m_host.AddScriptLPS(1); | 2493 | //// m_host.AddScriptLPS(1); |
2557 | OffsetTexture(m_host, u, v, face); | 2494 | OffsetTexture(m_host, u, v, face); |
2558 | ScriptSleep(m_sleepMsOnOffsetTexture); | 2495 | //// ScriptSleep(m_sleepMsOnOffsetTexture); |
2559 | } | 2496 | } |
2560 | 2497 | ||
2561 | protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) | 2498 | protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) |
@@ -2594,9 +2531,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2594 | 2531 | ||
2595 | public void llRotateTexture(double rotation, int face) | 2532 | public void llRotateTexture(double rotation, int face) |
2596 | { | 2533 | { |
2597 | m_host.AddScriptLPS(1); | 2534 | //// m_host.AddScriptLPS(1); |
2598 | RotateTexture(m_host, rotation, face); | 2535 | RotateTexture(m_host, rotation, face); |
2599 | ScriptSleep(m_sleepMsOnRotateTexture); | 2536 | //// ScriptSleep(m_sleepMsOnRotateTexture); |
2600 | } | 2537 | } |
2601 | 2538 | ||
2602 | protected void RotateTexture(SceneObjectPart part, double rotation, int face) | 2539 | protected void RotateTexture(SceneObjectPart part, double rotation, int face) |
@@ -2632,7 +2569,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2632 | 2569 | ||
2633 | public LSL_String llGetTexture(int face) | 2570 | public LSL_String llGetTexture(int face) |
2634 | { | 2571 | { |
2635 | m_host.AddScriptLPS(1); | 2572 | //// m_host.AddScriptLPS(1); |
2636 | return GetTexture(m_host, face); | 2573 | return GetTexture(m_host, face); |
2637 | } | 2574 | } |
2638 | 2575 | ||
@@ -2674,11 +2611,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2674 | 2611 | ||
2675 | public void llSetPos(LSL_Vector pos) | 2612 | public void llSetPos(LSL_Vector pos) |
2676 | { | 2613 | { |
2677 | m_host.AddScriptLPS(1); | 2614 | //// m_host.AddScriptLPS(1); |
2678 | 2615 | ||
2679 | SetPos(m_host, pos, true); | 2616 | SetPos(m_host, pos, true); |
2680 | 2617 | ||
2681 | ScriptSleep(m_sleepMsOnSetPos); | 2618 | //// ScriptSleep(m_sleepMsOnSetPos); |
2682 | } | 2619 | } |
2683 | 2620 | ||
2684 | /// <summary> | 2621 | /// <summary> |
@@ -2690,7 +2627,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2690 | /// <returns>1 if successful, 0 otherwise.</returns> | 2627 | /// <returns>1 if successful, 0 otherwise.</returns> |
2691 | public LSL_Integer llSetRegionPos(LSL_Vector pos) | 2628 | public LSL_Integer llSetRegionPos(LSL_Vector pos) |
2692 | { | 2629 | { |
2693 | m_host.AddScriptLPS(1); | 2630 | //// m_host.AddScriptLPS(1); |
2694 | 2631 | ||
2695 | // BEGIN WORKAROUND | 2632 | // BEGIN WORKAROUND |
2696 | // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND. | 2633 | // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND. |
@@ -2805,19 +2742,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2805 | 2742 | ||
2806 | public LSL_Vector llGetPos() | 2743 | public LSL_Vector llGetPos() |
2807 | { | 2744 | { |
2808 | m_host.AddScriptLPS(1); | 2745 | //// m_host.AddScriptLPS(1); |
2809 | return m_host.GetWorldPosition(); | 2746 | return m_host.GetWorldPosition(); |
2810 | } | 2747 | } |
2811 | 2748 | ||
2812 | public LSL_Vector llGetLocalPos() | 2749 | public LSL_Vector llGetLocalPos() |
2813 | { | 2750 | { |
2814 | m_host.AddScriptLPS(1); | 2751 | //// m_host.AddScriptLPS(1); |
2815 | return GetPartLocalPos(m_host); | 2752 | return GetPartLocalPos(m_host); |
2816 | } | 2753 | } |
2817 | 2754 | ||
2818 | protected LSL_Vector GetPartLocalPos(SceneObjectPart part) | 2755 | protected LSL_Vector GetPartLocalPos(SceneObjectPart part) |
2819 | { | 2756 | { |
2820 | m_host.AddScriptLPS(1); | 2757 | //// m_host.AddScriptLPS(1); |
2821 | 2758 | ||
2822 | Vector3 pos; | 2759 | Vector3 pos; |
2823 | 2760 | ||
@@ -2840,7 +2777,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2840 | 2777 | ||
2841 | public void llSetRot(LSL_Rotation rot) | 2778 | public void llSetRot(LSL_Rotation rot) |
2842 | { | 2779 | { |
2843 | m_host.AddScriptLPS(1); | 2780 | //// m_host.AddScriptLPS(1); |
2844 | 2781 | ||
2845 | // try to let this work as in SL... | 2782 | // try to let this work as in SL... |
2846 | if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) | 2783 | if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) |
@@ -2858,14 +2795,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2858 | } | 2795 | } |
2859 | } | 2796 | } |
2860 | 2797 | ||
2861 | ScriptSleep(m_sleepMsOnSetRot); | 2798 | //// ScriptSleep(m_sleepMsOnSetRot); |
2862 | } | 2799 | } |
2863 | 2800 | ||
2864 | public void llSetLocalRot(LSL_Rotation rot) | 2801 | public void llSetLocalRot(LSL_Rotation rot) |
2865 | { | 2802 | { |
2866 | m_host.AddScriptLPS(1); | 2803 | //// m_host.AddScriptLPS(1); |
2867 | SetRot(m_host, rot); | 2804 | SetRot(m_host, rot); |
2868 | ScriptSleep(m_sleepMsOnSetLocalRot); | 2805 | //// ScriptSleep(m_sleepMsOnSetLocalRot); |
2869 | } | 2806 | } |
2870 | 2807 | ||
2871 | protected void SetRot(SceneObjectPart part, Quaternion rot) | 2808 | protected void SetRot(SceneObjectPart part, Quaternion rot) |
@@ -2925,7 +2862,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2925 | return llGetRootRotation(); | 2862 | return llGetRootRotation(); |
2926 | } | 2863 | } |
2927 | 2864 | ||
2928 | m_host.AddScriptLPS(1); | 2865 | //// m_host.AddScriptLPS(1); |
2929 | Quaternion q = m_host.GetWorldRotation(); | 2866 | Quaternion q = m_host.GetWorldRotation(); |
2930 | 2867 | ||
2931 | if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0) | 2868 | if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0) |
@@ -2990,14 +2927,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2990 | 2927 | ||
2991 | private LSL_Rotation GetPartLocalRot(SceneObjectPart part) | 2928 | private LSL_Rotation GetPartLocalRot(SceneObjectPart part) |
2992 | { | 2929 | { |
2993 | m_host.AddScriptLPS(1); | 2930 | //// m_host.AddScriptLPS(1); |
2994 | Quaternion rot = part.RotationOffset; | 2931 | Quaternion rot = part.RotationOffset; |
2995 | return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); | 2932 | return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); |
2996 | } | 2933 | } |
2997 | 2934 | ||
2998 | public void llSetForce(LSL_Vector force, int local) | 2935 | public void llSetForce(LSL_Vector force, int local) |
2999 | { | 2936 | { |
3000 | m_host.AddScriptLPS(1); | 2937 | //// m_host.AddScriptLPS(1); |
3001 | 2938 | ||
3002 | if (!m_host.ParentGroup.IsDeleted) | 2939 | if (!m_host.ParentGroup.IsDeleted) |
3003 | { | 2940 | { |
@@ -3012,7 +2949,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3012 | { | 2949 | { |
3013 | LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0); | 2950 | LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0); |
3014 | 2951 | ||
3015 | m_host.AddScriptLPS(1); | 2952 | //// m_host.AddScriptLPS(1); |
3016 | 2953 | ||
3017 | if (!m_host.ParentGroup.IsDeleted) | 2954 | if (!m_host.ParentGroup.IsDeleted) |
3018 | { | 2955 | { |
@@ -3024,55 +2961,55 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3024 | 2961 | ||
3025 | public void llSetVelocity(LSL_Vector vel, int local) | 2962 | public void llSetVelocity(LSL_Vector vel, int local) |
3026 | { | 2963 | { |
3027 | m_host.AddScriptLPS(1); | 2964 | //// m_host.AddScriptLPS(1); |
3028 | m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0); | 2965 | m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0); |
3029 | } | 2966 | } |
3030 | 2967 | ||
3031 | public void llSetAngularVelocity(LSL_Vector avel, int local) | 2968 | public void llSetAngularVelocity(LSL_Vector avel, int local) |
3032 | { | 2969 | { |
3033 | m_host.AddScriptLPS(1); | 2970 | //// m_host.AddScriptLPS(1); |
3034 | m_host.SetAngularVelocity(new Vector3((float)avel.x, (float)avel.y, (float)avel.z), local != 0); | 2971 | m_host.SetAngularVelocity(new Vector3((float)avel.x, (float)avel.y, (float)avel.z), local != 0); |
3035 | } | 2972 | } |
3036 | public LSL_Integer llTarget(LSL_Vector position, double range) | 2973 | public LSL_Integer llTarget(LSL_Vector position, double range) |
3037 | { | 2974 | { |
3038 | m_host.AddScriptLPS(1); | 2975 | //// m_host.AddScriptLPS(1); |
3039 | return m_host.ParentGroup.registerTargetWaypoint(position, | 2976 | return m_host.ParentGroup.registerTargetWaypoint(position, |
3040 | (float)range); | 2977 | (float)range); |
3041 | } | 2978 | } |
3042 | 2979 | ||
3043 | public void llTargetRemove(int number) | 2980 | public void llTargetRemove(int number) |
3044 | { | 2981 | { |
3045 | m_host.AddScriptLPS(1); | 2982 | //// m_host.AddScriptLPS(1); |
3046 | m_host.ParentGroup.unregisterTargetWaypoint(number); | 2983 | m_host.ParentGroup.unregisterTargetWaypoint(number); |
3047 | } | 2984 | } |
3048 | 2985 | ||
3049 | public LSL_Integer llRotTarget(LSL_Rotation rot, double error) | 2986 | public LSL_Integer llRotTarget(LSL_Rotation rot, double error) |
3050 | { | 2987 | { |
3051 | m_host.AddScriptLPS(1); | 2988 | //// m_host.AddScriptLPS(1); |
3052 | return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error); | 2989 | return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error); |
3053 | } | 2990 | } |
3054 | 2991 | ||
3055 | public void llRotTargetRemove(int number) | 2992 | public void llRotTargetRemove(int number) |
3056 | { | 2993 | { |
3057 | m_host.AddScriptLPS(1); | 2994 | //// m_host.AddScriptLPS(1); |
3058 | m_host.ParentGroup.unregisterRotTargetWaypoint(number); | 2995 | m_host.ParentGroup.unregisterRotTargetWaypoint(number); |
3059 | } | 2996 | } |
3060 | 2997 | ||
3061 | public void llMoveToTarget(LSL_Vector target, double tau) | 2998 | public void llMoveToTarget(LSL_Vector target, double tau) |
3062 | { | 2999 | { |
3063 | m_host.AddScriptLPS(1); | 3000 | //// m_host.AddScriptLPS(1); |
3064 | m_host.ParentGroup.MoveToTarget(target, (float)tau); | 3001 | m_host.ParentGroup.MoveToTarget(target, (float)tau); |
3065 | } | 3002 | } |
3066 | 3003 | ||
3067 | public void llStopMoveToTarget() | 3004 | public void llStopMoveToTarget() |
3068 | { | 3005 | { |
3069 | m_host.AddScriptLPS(1); | 3006 | //// m_host.AddScriptLPS(1); |
3070 | m_host.ParentGroup.StopMoveToTarget(); | 3007 | m_host.ParentGroup.StopMoveToTarget(); |
3071 | } | 3008 | } |
3072 | 3009 | ||
3073 | public void llApplyImpulse(LSL_Vector force, LSL_Integer local) | 3010 | public void llApplyImpulse(LSL_Vector force, LSL_Integer local) |
3074 | { | 3011 | { |
3075 | m_host.AddScriptLPS(1); | 3012 | //// m_host.AddScriptLPS(1); |
3076 | //No energy force yet | 3013 | //No energy force yet |
3077 | Vector3 v = force; | 3014 | Vector3 v = force; |
3078 | if (v.Length() > 20000.0f) | 3015 | if (v.Length() > 20000.0f) |
@@ -3086,26 +3023,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3086 | 3023 | ||
3087 | public void llApplyRotationalImpulse(LSL_Vector force, int local) | 3024 | public void llApplyRotationalImpulse(LSL_Vector force, int local) |
3088 | { | 3025 | { |
3089 | m_host.AddScriptLPS(1); | 3026 | //// m_host.AddScriptLPS(1); |
3090 | m_host.ParentGroup.RootPart.ApplyAngularImpulse(force, local != 0); | 3027 | m_host.ParentGroup.RootPart.ApplyAngularImpulse(force, local != 0); |
3091 | } | 3028 | } |
3092 | 3029 | ||
3093 | public void llSetTorque(LSL_Vector torque, int local) | 3030 | public void llSetTorque(LSL_Vector torque, int local) |
3094 | { | 3031 | { |
3095 | m_host.AddScriptLPS(1); | 3032 | //// m_host.AddScriptLPS(1); |
3096 | m_host.ParentGroup.RootPart.SetAngularImpulse(torque, local != 0); | 3033 | m_host.ParentGroup.RootPart.SetAngularImpulse(torque, local != 0); |
3097 | } | 3034 | } |
3098 | 3035 | ||
3099 | public LSL_Vector llGetTorque() | 3036 | public LSL_Vector llGetTorque() |
3100 | { | 3037 | { |
3101 | m_host.AddScriptLPS(1); | 3038 | //// m_host.AddScriptLPS(1); |
3102 | 3039 | ||
3103 | return new LSL_Vector(m_host.ParentGroup.GetTorque()); | 3040 | return new LSL_Vector(m_host.ParentGroup.GetTorque()); |
3104 | } | 3041 | } |
3105 | 3042 | ||
3106 | public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) | 3043 | public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) |
3107 | { | 3044 | { |
3108 | m_host.AddScriptLPS(1); | 3045 | //// m_host.AddScriptLPS(1); |
3109 | llSetForce(force, local); | 3046 | llSetForce(force, local); |
3110 | llSetTorque(torque, local); | 3047 | llSetTorque(torque, local); |
3111 | } | 3048 | } |
@@ -3113,7 +3050,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3113 | 3050 | ||
3114 | public LSL_Vector llGetVel() | 3051 | public LSL_Vector llGetVel() |
3115 | { | 3052 | { |
3116 | m_host.AddScriptLPS(1); | 3053 | //// m_host.AddScriptLPS(1); |
3117 | 3054 | ||
3118 | Vector3 vel = Vector3.Zero; | 3055 | Vector3 vel = Vector3.Zero; |
3119 | 3056 | ||
@@ -3133,46 +3070,46 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3133 | 3070 | ||
3134 | public LSL_Vector llGetAccel() | 3071 | public LSL_Vector llGetAccel() |
3135 | { | 3072 | { |
3136 | m_host.AddScriptLPS(1); | 3073 | //// m_host.AddScriptLPS(1); |
3137 | 3074 | ||
3138 | return new LSL_Vector(m_host.Acceleration); | 3075 | return new LSL_Vector(m_host.Acceleration); |
3139 | } | 3076 | } |
3140 | 3077 | ||
3141 | public LSL_Vector llGetOmega() | 3078 | public LSL_Vector llGetOmega() |
3142 | { | 3079 | { |
3143 | m_host.AddScriptLPS(1); | 3080 | //// m_host.AddScriptLPS(1); |
3144 | Vector3 avel = m_host.AngularVelocity; | 3081 | Vector3 avel = m_host.AngularVelocity; |
3145 | return new LSL_Vector(avel.X, avel.Y, avel.Z); | 3082 | return new LSL_Vector(avel.X, avel.Y, avel.Z); |
3146 | } | 3083 | } |
3147 | 3084 | ||
3148 | public LSL_Float llGetTimeOfDay() | 3085 | public LSL_Float llGetTimeOfDay() |
3149 | { | 3086 | { |
3150 | m_host.AddScriptLPS(1); | 3087 | //// m_host.AddScriptLPS(1); |
3151 | return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); | 3088 | return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); |
3152 | } | 3089 | } |
3153 | 3090 | ||
3154 | public LSL_Float llGetWallclock() | 3091 | public LSL_Float llGetWallclock() |
3155 | { | 3092 | { |
3156 | m_host.AddScriptLPS(1); | 3093 | //// m_host.AddScriptLPS(1); |
3157 | return DateTime.Now.TimeOfDay.TotalSeconds; | 3094 | return DateTime.Now.TimeOfDay.TotalSeconds; |
3158 | } | 3095 | } |
3159 | 3096 | ||
3160 | public LSL_Float llGetTime() | 3097 | public LSL_Float llGetTime() |
3161 | { | 3098 | { |
3162 | m_host.AddScriptLPS(1); | 3099 | //// m_host.AddScriptLPS(1); |
3163 | double ScriptTime = Util.GetTimeStampMS() - m_timer; | 3100 | double ScriptTime = Util.GetTimeStampMS() - m_timer; |
3164 | return (float)Math.Round((ScriptTime / 1000.0), 3); | 3101 | return (float)Math.Round((ScriptTime / 1000.0), 3); |
3165 | } | 3102 | } |
3166 | 3103 | ||
3167 | public void llResetTime() | 3104 | public void llResetTime() |
3168 | { | 3105 | { |
3169 | m_host.AddScriptLPS(1); | 3106 | //// m_host.AddScriptLPS(1); |
3170 | m_timer = Util.GetTimeStampMS(); | 3107 | m_timer = Util.GetTimeStampMS(); |
3171 | } | 3108 | } |
3172 | 3109 | ||
3173 | public LSL_Float llGetAndResetTime() | 3110 | public LSL_Float llGetAndResetTime() |
3174 | { | 3111 | { |
3175 | m_host.AddScriptLPS(1); | 3112 | //// m_host.AddScriptLPS(1); |
3176 | double now = Util.GetTimeStampMS(); | 3113 | double now = Util.GetTimeStampMS(); |
3177 | double ScriptTime = now - m_timer; | 3114 | double ScriptTime = now - m_timer; |
3178 | m_timer = now; | 3115 | m_timer = now; |
@@ -3181,7 +3118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3181 | 3118 | ||
3182 | public void llSound(string sound, double volume, int queue, int loop) | 3119 | public void llSound(string sound, double volume, int queue, int loop) |
3183 | { | 3120 | { |
3184 | m_host.AddScriptLPS(1); | 3121 | //// m_host.AddScriptLPS(1); |
3185 | Deprecated("llSound", "Use llPlaySound instead"); | 3122 | Deprecated("llSound", "Use llPlaySound instead"); |
3186 | } | 3123 | } |
3187 | 3124 | ||
@@ -3189,7 +3126,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3189 | // 20080530 Updated to remove code duplication | 3126 | // 20080530 Updated to remove code duplication |
3190 | public void llPlaySound(string sound, double volume) | 3127 | public void llPlaySound(string sound, double volume) |
3191 | { | 3128 | { |
3192 | m_host.AddScriptLPS(1); | 3129 | //// m_host.AddScriptLPS(1); |
3193 | 3130 | ||
3194 | if (m_SoundModule == null) | 3131 | if (m_SoundModule == null) |
3195 | return; | 3132 | return; |
@@ -3204,7 +3141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3204 | 3141 | ||
3205 | public void llLoopSound(string sound, double volume) | 3142 | public void llLoopSound(string sound, double volume) |
3206 | { | 3143 | { |
3207 | m_host.AddScriptLPS(1); | 3144 | //// m_host.AddScriptLPS(1); |
3208 | 3145 | ||
3209 | if (m_SoundModule == null) | 3146 | if (m_SoundModule == null) |
3210 | return; | 3147 | return; |
@@ -3218,7 +3155,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3218 | 3155 | ||
3219 | public void llLoopSoundMaster(string sound, double volume) | 3156 | public void llLoopSoundMaster(string sound, double volume) |
3220 | { | 3157 | { |
3221 | m_host.AddScriptLPS(1); | 3158 | //// m_host.AddScriptLPS(1); |
3222 | 3159 | ||
3223 | if (m_SoundModule == null) | 3160 | if (m_SoundModule == null) |
3224 | return; | 3161 | return; |
@@ -3232,7 +3169,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3232 | 3169 | ||
3233 | public void llLoopSoundSlave(string sound, double volume) | 3170 | public void llLoopSoundSlave(string sound, double volume) |
3234 | { | 3171 | { |
3235 | m_host.AddScriptLPS(1); | 3172 | //// m_host.AddScriptLPS(1); |
3236 | 3173 | ||
3237 | if (m_SoundModule == null) | 3174 | if (m_SoundModule == null) |
3238 | return; | 3175 | return; |
@@ -3246,7 +3183,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3246 | 3183 | ||
3247 | public void llPlaySoundSlave(string sound, double volume) | 3184 | public void llPlaySoundSlave(string sound, double volume) |
3248 | { | 3185 | { |
3249 | m_host.AddScriptLPS(1); | 3186 | //// m_host.AddScriptLPS(1); |
3250 | 3187 | ||
3251 | if (m_SoundModule == null) | 3188 | if (m_SoundModule == null) |
3252 | return; | 3189 | return; |
@@ -3261,7 +3198,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3261 | 3198 | ||
3262 | public void llTriggerSound(string sound, double volume) | 3199 | public void llTriggerSound(string sound, double volume) |
3263 | { | 3200 | { |
3264 | m_host.AddScriptLPS(1); | 3201 | //// m_host.AddScriptLPS(1); |
3265 | 3202 | ||
3266 | if (m_SoundModule == null) | 3203 | if (m_SoundModule == null) |
3267 | return; | 3204 | return; |
@@ -3276,7 +3213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3276 | 3213 | ||
3277 | public void llStopSound() | 3214 | public void llStopSound() |
3278 | { | 3215 | { |
3279 | m_host.AddScriptLPS(1); | 3216 | //// m_host.AddScriptLPS(1); |
3280 | 3217 | ||
3281 | if (m_SoundModule != null) | 3218 | if (m_SoundModule != null) |
3282 | m_SoundModule.StopSound(m_host.UUID); | 3219 | m_SoundModule.StopSound(m_host.UUID); |
@@ -3284,7 +3221,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3284 | 3221 | ||
3285 | public void llPreloadSound(string sound) | 3222 | public void llPreloadSound(string sound) |
3286 | { | 3223 | { |
3287 | m_host.AddScriptLPS(1); | 3224 | //// m_host.AddScriptLPS(1); |
3288 | 3225 | ||
3289 | if (m_SoundModule == null) | 3226 | if (m_SoundModule == null) |
3290 | return; | 3227 | return; |
@@ -3294,7 +3231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3294 | return; | 3231 | return; |
3295 | 3232 | ||
3296 | m_SoundModule.PreloadSound(m_host.UUID, soundID); | 3233 | m_SoundModule.PreloadSound(m_host.UUID, soundID); |
3297 | ScriptSleep(m_sleepMsOnPreloadSound); | 3234 | //// ScriptSleep(m_sleepMsOnPreloadSound); |
3298 | } | 3235 | } |
3299 | 3236 | ||
3300 | /// <summary> | 3237 | /// <summary> |
@@ -3305,7 +3242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3305 | /// </summary> | 3242 | /// </summary> |
3306 | public LSL_String llGetSubString(string src, int start, int end) | 3243 | public LSL_String llGetSubString(string src, int start, int end) |
3307 | { | 3244 | { |
3308 | m_host.AddScriptLPS(1); | 3245 | //// m_host.AddScriptLPS(1); |
3309 | 3246 | ||
3310 | // Normalize indices (if negative). | 3247 | // Normalize indices (if negative). |
3311 | // After normlaization they may still be | 3248 | // After normlaization they may still be |
@@ -3399,7 +3336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3399 | /// </summary> | 3336 | /// </summary> |
3400 | public LSL_String llDeleteSubString(string src, int start, int end) | 3337 | public LSL_String llDeleteSubString(string src, int start, int end) |
3401 | { | 3338 | { |
3402 | m_host.AddScriptLPS(1); | 3339 | //// m_host.AddScriptLPS(1); |
3403 | 3340 | ||
3404 | // Normalize indices (if negative). | 3341 | // Normalize indices (if negative). |
3405 | // After normlaization they may still be | 3342 | // After normlaization they may still be |
@@ -3480,7 +3417,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3480 | /// </summary> | 3417 | /// </summary> |
3481 | public LSL_String llInsertString(string dest, int index, string src) | 3418 | public LSL_String llInsertString(string dest, int index, string src) |
3482 | { | 3419 | { |
3483 | m_host.AddScriptLPS(1); | 3420 | //// m_host.AddScriptLPS(1); |
3484 | 3421 | ||
3485 | // Normalize indices (if negative). | 3422 | // Normalize indices (if negative). |
3486 | // After normlaization they may still be | 3423 | // After normlaization they may still be |
@@ -3517,13 +3454,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3517 | 3454 | ||
3518 | public LSL_String llToUpper(string src) | 3455 | public LSL_String llToUpper(string src) |
3519 | { | 3456 | { |
3520 | m_host.AddScriptLPS(1); | 3457 | //// m_host.AddScriptLPS(1); |
3521 | return src.ToUpper(); | 3458 | return src.ToUpper(); |
3522 | } | 3459 | } |
3523 | 3460 | ||
3524 | public LSL_String llToLower(string src) | 3461 | public LSL_String llToLower(string src) |
3525 | { | 3462 | { |
3526 | m_host.AddScriptLPS(1); | 3463 | //// m_host.AddScriptLPS(1); |
3527 | return src.ToLower(); | 3464 | return src.ToLower(); |
3528 | } | 3465 | } |
3529 | 3466 | ||
@@ -3531,7 +3468,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3531 | { | 3468 | { |
3532 | Util.FireAndForget(x => | 3469 | Util.FireAndForget(x => |
3533 | { | 3470 | { |
3534 | m_host.AddScriptLPS(1); | 3471 | //// m_host.AddScriptLPS(1); |
3535 | 3472 | ||
3536 | if (m_item.PermsGranter == UUID.Zero) | 3473 | if (m_item.PermsGranter == UUID.Zero) |
3537 | return; | 3474 | return; |
@@ -3569,30 +3506,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3569 | 3506 | ||
3570 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 3507 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
3571 | { | 3508 | { |
3572 | m_host.AddScriptLPS(1); | 3509 | //// m_host.AddScriptLPS(1); |
3573 | Deprecated("llMakeExplosion", "Use llParticleSystem instead"); | 3510 | Deprecated("llMakeExplosion", "Use llParticleSystem instead"); |
3574 | ScriptSleep(m_sleepMsOnMakeExplosion); | 3511 | //// ScriptSleep(m_sleepMsOnMakeExplosion); |
3575 | } | 3512 | } |
3576 | 3513 | ||
3577 | public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) | 3514 | public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) |
3578 | { | 3515 | { |
3579 | m_host.AddScriptLPS(1); | 3516 | //// m_host.AddScriptLPS(1); |
3580 | Deprecated("llMakeFountain", "Use llParticleSystem instead"); | 3517 | Deprecated("llMakeFountain", "Use llParticleSystem instead"); |
3581 | ScriptSleep(m_sleepMsOnMakeFountain); | 3518 | //// ScriptSleep(m_sleepMsOnMakeFountain); |
3582 | } | 3519 | } |
3583 | 3520 | ||
3584 | public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 3521 | public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
3585 | { | 3522 | { |
3586 | m_host.AddScriptLPS(1); | 3523 | //// m_host.AddScriptLPS(1); |
3587 | Deprecated("llMakeSmoke", "Use llParticleSystem instead"); | 3524 | Deprecated("llMakeSmoke", "Use llParticleSystem instead"); |
3588 | ScriptSleep(m_sleepMsOnMakeSmoke); | 3525 | //// ScriptSleep(m_sleepMsOnMakeSmoke); |
3589 | } | 3526 | } |
3590 | 3527 | ||
3591 | public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 3528 | public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
3592 | { | 3529 | { |
3593 | m_host.AddScriptLPS(1); | 3530 | //// m_host.AddScriptLPS(1); |
3594 | Deprecated("llMakeFire", "Use llParticleSystem instead"); | 3531 | Deprecated("llMakeFire", "Use llParticleSystem instead"); |
3595 | ScriptSleep(m_sleepMsOnMakeFire); | 3532 | //// ScriptSleep(m_sleepMsOnMakeFire); |
3596 | } | 3533 | } |
3597 | 3534 | ||
3598 | public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) | 3535 | public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) |
@@ -3602,7 +3539,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3602 | 3539 | ||
3603 | public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) | 3540 | public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) |
3604 | { | 3541 | { |
3605 | m_host.AddScriptLPS(1); | 3542 | //// m_host.AddScriptLPS(1); |
3606 | if (string.IsNullOrEmpty(inventory) || Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) | 3543 | if (string.IsNullOrEmpty(inventory) || Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) |
3607 | return; | 3544 | return; |
3608 | 3545 | ||
@@ -3667,8 +3604,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3667 | } | 3604 | } |
3668 | }, null, "LSL_Api.doObjectRez"); | 3605 | }, null, "LSL_Api.doObjectRez"); |
3669 | 3606 | ||
3670 | //ScriptSleep((int)((groupmass * velmag) / 10)); | 3607 | //// //ScriptSleep((int)((groupmass * velmag) / 10)); |
3671 | ScriptSleep(m_sleepMsOnRezAtRoot); | 3608 | //// ScriptSleep(m_sleepMsOnRezAtRoot); |
3672 | } | 3609 | } |
3673 | 3610 | ||
3674 | public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) | 3611 | public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) |
@@ -3678,7 +3615,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3678 | 3615 | ||
3679 | public void llLookAt(LSL_Vector target, double strength, double damping) | 3616 | public void llLookAt(LSL_Vector target, double strength, double damping) |
3680 | { | 3617 | { |
3681 | m_host.AddScriptLPS(1); | 3618 | //// m_host.AddScriptLPS(1); |
3682 | 3619 | ||
3683 | // Get the normalized vector to the target | 3620 | // Get the normalized vector to the target |
3684 | LSL_Vector from = llGetPos(); | 3621 | LSL_Vector from = llGetPos(); |
@@ -3726,7 +3663,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3726 | 3663 | ||
3727 | public void llStopLookAt() | 3664 | public void llStopLookAt() |
3728 | { | 3665 | { |
3729 | m_host.AddScriptLPS(1); | 3666 | //// m_host.AddScriptLPS(1); |
3730 | m_host.StopLookAt(); | 3667 | m_host.StopLookAt(); |
3731 | } | 3668 | } |
3732 | 3669 | ||
@@ -3734,7 +3671,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3734 | { | 3671 | { |
3735 | if (sec != 0.0 && sec < m_MinTimerInterval) | 3672 | if (sec != 0.0 && sec < m_MinTimerInterval) |
3736 | sec = m_MinTimerInterval; | 3673 | sec = m_MinTimerInterval; |
3737 | m_host.AddScriptLPS(1); | 3674 | //// m_host.AddScriptLPS(1); |
3738 | // Setting timer repeat | 3675 | // Setting timer repeat |
3739 | AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec); | 3676 | AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec); |
3740 | } | 3677 | } |
@@ -3742,14 +3679,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3742 | public virtual void llSleep(double sec) | 3679 | public virtual void llSleep(double sec) |
3743 | { | 3680 | { |
3744 | // m_log.Info("llSleep snoozing " + sec + "s."); | 3681 | // m_log.Info("llSleep snoozing " + sec + "s."); |
3745 | m_host.AddScriptLPS(1); | 3682 | //// m_host.AddScriptLPS(1); |
3746 | 3683 | ||
3747 | Sleep((int)(sec * 1000)); | 3684 | Sleep((int)(sec * 1000)); |
3748 | } | 3685 | } |
3749 | 3686 | ||
3750 | public LSL_Float llGetMass() | 3687 | public LSL_Float llGetMass() |
3751 | { | 3688 | { |
3752 | m_host.AddScriptLPS(1); | 3689 | //// m_host.AddScriptLPS(1); |
3753 | 3690 | ||
3754 | if (m_host.ParentGroup.IsAttachment) | 3691 | if (m_host.ParentGroup.IsAttachment) |
3755 | { | 3692 | { |
@@ -3785,7 +3722,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3785 | 3722 | ||
3786 | public void llCollisionFilter(LSL_String name, LSL_Key id, LSL_Integer accept) | 3723 | public void llCollisionFilter(LSL_String name, LSL_Key id, LSL_Integer accept) |
3787 | { | 3724 | { |
3788 | m_host.AddScriptLPS(1); | 3725 | //// m_host.AddScriptLPS(1); |
3789 | m_host.CollisionFilter.Clear(); | 3726 | m_host.CollisionFilter.Clear(); |
3790 | UUID objectID; | 3727 | UUID objectID; |
3791 | 3728 | ||
@@ -3813,12 +3750,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3813 | } | 3750 | } |
3814 | } | 3751 | } |
3815 | 3752 | ||
3816 | m_host.AddScriptLPS(1); | 3753 | //// m_host.AddScriptLPS(1); |
3817 | } | 3754 | } |
3818 | 3755 | ||
3819 | public void llReleaseControls() | 3756 | public void llReleaseControls() |
3820 | { | 3757 | { |
3821 | m_host.AddScriptLPS(1); | 3758 | //// m_host.AddScriptLPS(1); |
3822 | 3759 | ||
3823 | if (m_item.PermsGranter != UUID.Zero) | 3760 | if (m_item.PermsGranter != UUID.Zero) |
3824 | { | 3761 | { |
@@ -3839,7 +3776,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3839 | 3776 | ||
3840 | public void llReleaseURL(string url) | 3777 | public void llReleaseURL(string url) |
3841 | { | 3778 | { |
3842 | m_host.AddScriptLPS(1); | 3779 | //// m_host.AddScriptLPS(1); |
3843 | if (m_UrlModule != null) | 3780 | if (m_UrlModule != null) |
3844 | m_UrlModule.ReleaseURL(url); | 3781 | m_UrlModule.ReleaseURL(url); |
3845 | } | 3782 | } |
@@ -3887,7 +3824,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3887 | 3824 | ||
3888 | public void llAttachToAvatar(LSL_Integer attachmentPoint) | 3825 | public void llAttachToAvatar(LSL_Integer attachmentPoint) |
3889 | { | 3826 | { |
3890 | m_host.AddScriptLPS(1); | 3827 | //// m_host.AddScriptLPS(1); |
3891 | 3828 | ||
3892 | if (m_item.PermsGranter != m_host.OwnerID) | 3829 | if (m_item.PermsGranter != m_host.OwnerID) |
3893 | return; | 3830 | return; |
@@ -3950,7 +3887,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3950 | 3887 | ||
3951 | public void llDetachFromAvatar() | 3888 | public void llDetachFromAvatar() |
3952 | { | 3889 | { |
3953 | m_host.AddScriptLPS(1); | 3890 | //// m_host.AddScriptLPS(1); |
3954 | 3891 | ||
3955 | if (m_host.ParentGroup.AttachmentPoint == 0) | 3892 | if (m_host.ParentGroup.AttachmentPoint == 0) |
3956 | return; | 3893 | return; |
@@ -3964,31 +3901,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3964 | 3901 | ||
3965 | public void llTakeCamera(string avatar) | 3902 | public void llTakeCamera(string avatar) |
3966 | { | 3903 | { |
3967 | m_host.AddScriptLPS(1); | 3904 | //// m_host.AddScriptLPS(1); |
3968 | Deprecated("llTakeCamera", "Use llSetCameraParams instead"); | 3905 | Deprecated("llTakeCamera", "Use llSetCameraParams instead"); |
3969 | } | 3906 | } |
3970 | 3907 | ||
3971 | public void llReleaseCamera(string avatar) | 3908 | public void llReleaseCamera(string avatar) |
3972 | { | 3909 | { |
3973 | m_host.AddScriptLPS(1); | 3910 | //// m_host.AddScriptLPS(1); |
3974 | Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); | 3911 | Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); |
3975 | } | 3912 | } |
3976 | 3913 | ||
3977 | public LSL_Key llGetOwner() | 3914 | public LSL_Key llGetOwner() |
3978 | { | 3915 | { |
3979 | m_host.AddScriptLPS(1); | 3916 | //// m_host.AddScriptLPS(1); |
3980 | 3917 | ||
3981 | return m_host.OwnerID.ToString(); | 3918 | return m_host.OwnerID.ToString(); |
3982 | } | 3919 | } |
3983 | 3920 | ||
3984 | public void llInstantMessage(string user, string message) | 3921 | public void llInstantMessage(string user, string message) |
3985 | { | 3922 | { |
3986 | m_host.AddScriptLPS(1); | 3923 | //// m_host.AddScriptLPS(1); |
3987 | UUID result; | 3924 | UUID result; |
3988 | if (!UUID.TryParse(user, out result) || result == UUID.Zero) | 3925 | if (!UUID.TryParse(user, out result) || result == UUID.Zero) |
3989 | { | 3926 | { |
3990 | Error("llInstantMessage","An invalid key was passed to llInstantMessage"); | 3927 | Error("llInstantMessage","An invalid key was passed to llInstantMessage"); |
3991 | ScriptSleep(2000); | 3928 | //// ScriptSleep(2000); |
3992 | return; | 3929 | return; |
3993 | } | 3930 | } |
3994 | 3931 | ||
@@ -4036,13 +3973,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4036 | { | 3973 | { |
4037 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 3974 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
4038 | } | 3975 | } |
4039 | 3976 | //// ScriptSleep(m_sleepMsOnInstantMessage); | |
4040 | ScriptSleep(m_sleepMsOnInstantMessage); | ||
4041 | } | 3977 | } |
4042 | 3978 | ||
4043 | public void llEmail(string address, string subject, string message) | 3979 | public void llEmail(string address, string subject, string message) |
4044 | { | 3980 | { |
4045 | m_host.AddScriptLPS(1); | 3981 | //// m_host.AddScriptLPS(1); |
4046 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); | 3982 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); |
4047 | if (emailModule == null) | 3983 | if (emailModule == null) |
4048 | { | 3984 | { |
@@ -4075,12 +4011,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4075 | } | 4011 | } |
4076 | 4012 | ||
4077 | emailModule.SendEmail(m_host.UUID, address, subject, message); | 4013 | emailModule.SendEmail(m_host.UUID, address, subject, message); |
4078 | ScriptSleep(m_sleepMsOnEmail); | 4014 | //// ScriptSleep(m_sleepMsOnEmail); |
4079 | } | 4015 | } |
4080 | 4016 | ||
4081 | public void llGetNextEmail(string address, string subject) | 4017 | public void llGetNextEmail(string address, string subject) |
4082 | { | 4018 | { |
4083 | m_host.AddScriptLPS(1); | 4019 | //// m_host.AddScriptLPS(1); |
4084 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); | 4020 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); |
4085 | if (emailModule == null) | 4021 | if (emailModule == null) |
4086 | { | 4022 | { |
@@ -4108,19 +4044,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4108 | 4044 | ||
4109 | public LSL_Key llGetKey() | 4045 | public LSL_Key llGetKey() |
4110 | { | 4046 | { |
4111 | m_host.AddScriptLPS(1); | 4047 | //// m_host.AddScriptLPS(1); |
4112 | return m_host.UUID.ToString(); | 4048 | return m_host.UUID.ToString(); |
4113 | } | 4049 | } |
4114 | 4050 | ||
4115 | public LSL_Key llGenerateKey() | 4051 | public LSL_Key llGenerateKey() |
4116 | { | 4052 | { |
4117 | m_host.AddScriptLPS(1); | 4053 | //// m_host.AddScriptLPS(1); |
4118 | return UUID.Random().ToString(); | 4054 | return UUID.Random().ToString(); |
4119 | } | 4055 | } |
4120 | 4056 | ||
4121 | public void llSetBuoyancy(double buoyancy) | 4057 | public void llSetBuoyancy(double buoyancy) |
4122 | { | 4058 | { |
4123 | m_host.AddScriptLPS(1); | 4059 | //// m_host.AddScriptLPS(1); |
4124 | 4060 | ||
4125 | if (!m_host.ParentGroup.IsDeleted) | 4061 | if (!m_host.ParentGroup.IsDeleted) |
4126 | { | 4062 | { |
@@ -4136,7 +4072,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4136 | /// <param name="tau">Number of seconds over which to reach target</param> | 4072 | /// <param name="tau">Number of seconds over which to reach target</param> |
4137 | public void llSetHoverHeight(double height, int water, double tau) | 4073 | public void llSetHoverHeight(double height, int water, double tau) |
4138 | { | 4074 | { |
4139 | m_host.AddScriptLPS(1); | 4075 | //// m_host.AddScriptLPS(1); |
4140 | 4076 | ||
4141 | PIDHoverType hoverType = PIDHoverType.Ground; | 4077 | PIDHoverType hoverType = PIDHoverType.Ground; |
4142 | if (water != 0) | 4078 | if (water != 0) |
@@ -4148,13 +4084,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4148 | 4084 | ||
4149 | public void llStopHover() | 4085 | public void llStopHover() |
4150 | { | 4086 | { |
4151 | m_host.AddScriptLPS(1); | 4087 | //// m_host.AddScriptLPS(1); |
4152 | m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f); | 4088 | m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f); |
4153 | } | 4089 | } |
4154 | 4090 | ||
4155 | public void llMinEventDelay(double delay) | 4091 | public void llMinEventDelay(double delay) |
4156 | { | 4092 | { |
4157 | m_host.AddScriptLPS(1); | 4093 | //// m_host.AddScriptLPS(1); |
4158 | try | 4094 | try |
4159 | { | 4095 | { |
4160 | m_ScriptEngine.SetMinEventDelay(m_item.ItemID, delay); | 4096 | m_ScriptEngine.SetMinEventDelay(m_item.ItemID, delay); |
@@ -4168,13 +4104,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4168 | 4104 | ||
4169 | public void llSoundPreload(string sound) | 4105 | public void llSoundPreload(string sound) |
4170 | { | 4106 | { |
4171 | m_host.AddScriptLPS(1); | 4107 | //// m_host.AddScriptLPS(1); |
4172 | Deprecated("llSoundPreload", "Use llPreloadSound instead"); | 4108 | Deprecated("llSoundPreload", "Use llPreloadSound instead"); |
4173 | } | 4109 | } |
4174 | 4110 | ||
4175 | public void llRotLookAt(LSL_Rotation target, double strength, double damping) | 4111 | public void llRotLookAt(LSL_Rotation target, double strength, double damping) |
4176 | { | 4112 | { |
4177 | m_host.AddScriptLPS(1); | 4113 | //// m_host.AddScriptLPS(1); |
4178 | 4114 | ||
4179 | // Per discussion with Melanie, for non-physical objects llLookAt appears to simply | 4115 | // Per discussion with Melanie, for non-physical objects llLookAt appears to simply |
4180 | // set the rotation of the object, copy that behavior | 4116 | // set the rotation of the object, copy that behavior |
@@ -4194,7 +4130,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4194 | 4130 | ||
4195 | public LSL_Integer llStringLength(string str) | 4131 | public LSL_Integer llStringLength(string str) |
4196 | { | 4132 | { |
4197 | m_host.AddScriptLPS(1); | 4133 | //// m_host.AddScriptLPS(1); |
4198 | if (str.Length > 0) | 4134 | if (str.Length > 0) |
4199 | { | 4135 | { |
4200 | return str.Length; | 4136 | return str.Length; |
@@ -4207,7 +4143,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4207 | 4143 | ||
4208 | public void llStartAnimation(string anim) | 4144 | public void llStartAnimation(string anim) |
4209 | { | 4145 | { |
4210 | m_host.AddScriptLPS(1); | 4146 | //// m_host.AddScriptLPS(1); |
4211 | 4147 | ||
4212 | if (m_item.PermsGranter == UUID.Zero) | 4148 | if (m_item.PermsGranter == UUID.Zero) |
4213 | return; | 4149 | return; |
@@ -4230,7 +4166,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4230 | 4166 | ||
4231 | public void llStopAnimation(string anim) | 4167 | public void llStopAnimation(string anim) |
4232 | { | 4168 | { |
4233 | m_host.AddScriptLPS(1); | 4169 | //// m_host.AddScriptLPS(1); |
4234 | 4170 | ||
4235 | if (m_item.PermsGranter == UUID.Zero) | 4171 | if (m_item.PermsGranter == UUID.Zero) |
4236 | return; | 4172 | return; |
@@ -4253,7 +4189,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4253 | 4189 | ||
4254 | public void llStartObjectAnimation(string anim) | 4190 | public void llStartObjectAnimation(string anim) |
4255 | { | 4191 | { |
4256 | m_host.AddScriptLPS(1); | 4192 | //// m_host.AddScriptLPS(1); |
4257 | 4193 | ||
4258 | // Do NOT try to parse UUID, animations cannot be triggered by ID | 4194 | // Do NOT try to parse UUID, animations cannot be triggered by ID |
4259 | UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); | 4195 | UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); |
@@ -4264,7 +4200,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4264 | 4200 | ||
4265 | public void llStopObjectAnimation(string anim) | 4201 | public void llStopObjectAnimation(string anim) |
4266 | { | 4202 | { |
4267 | m_host.AddScriptLPS(1); | 4203 | //// m_host.AddScriptLPS(1); |
4268 | UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation); | 4204 | UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation); |
4269 | if (animID != UUID.Zero) | 4205 | if (animID != UUID.Zero) |
4270 | m_host.RemoveAnimation(animID); | 4206 | m_host.RemoveAnimation(animID); |
@@ -4272,7 +4208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4272 | 4208 | ||
4273 | public LSL_List llGetObjectAnimationNames() | 4209 | public LSL_List llGetObjectAnimationNames() |
4274 | { | 4210 | { |
4275 | m_host.AddScriptLPS(1); | 4211 | //// m_host.AddScriptLPS(1); |
4276 | LSL_List ret = new LSL_List(); | 4212 | LSL_List ret = new LSL_List(); |
4277 | 4213 | ||
4278 | if(m_host.AnimationsNames == null || m_host.AnimationsNames.Count == 0) | 4214 | if(m_host.AnimationsNames == null || m_host.AnimationsNames.Count == 0) |
@@ -4285,17 +4221,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4285 | 4221 | ||
4286 | public void llPointAt(LSL_Vector pos) | 4222 | public void llPointAt(LSL_Vector pos) |
4287 | { | 4223 | { |
4288 | m_host.AddScriptLPS(1); | 4224 | //// m_host.AddScriptLPS(1); |
4289 | } | 4225 | } |
4290 | 4226 | ||
4291 | public void llStopPointAt() | 4227 | public void llStopPointAt() |
4292 | { | 4228 | { |
4293 | m_host.AddScriptLPS(1); | 4229 | //// m_host.AddScriptLPS(1); |
4294 | } | 4230 | } |
4295 | 4231 | ||
4296 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) | 4232 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) |
4297 | { | 4233 | { |
4298 | m_host.AddScriptLPS(1); | 4234 | //// m_host.AddScriptLPS(1); |
4299 | TargetOmega(m_host, axis, spinrate, gain); | 4235 | TargetOmega(m_host, axis, spinrate, gain); |
4300 | } | 4236 | } |
4301 | 4237 | ||
@@ -4309,7 +4245,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4309 | 4245 | ||
4310 | public LSL_Integer llGetStartParameter() | 4246 | public LSL_Integer llGetStartParameter() |
4311 | { | 4247 | { |
4312 | m_host.AddScriptLPS(1); | 4248 | //// m_host.AddScriptLPS(1); |
4313 | return m_ScriptEngine.GetStartParameter(m_item.ItemID); | 4249 | return m_ScriptEngine.GetStartParameter(m_item.ItemID); |
4314 | } | 4250 | } |
4315 | 4251 | ||
@@ -4338,7 +4274,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4338 | if (m_item.PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) | 4274 | if (m_item.PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) |
4339 | llReleaseControls(); | 4275 | llReleaseControls(); |
4340 | 4276 | ||
4341 | m_host.AddScriptLPS(1); | 4277 | //// m_host.AddScriptLPS(1); |
4342 | 4278 | ||
4343 | int implicitPerms = 0; | 4279 | int implicitPerms = 0; |
4344 | 4280 | ||
@@ -4466,14 +4402,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4466 | 4402 | ||
4467 | public LSL_Key llGetPermissionsKey() | 4403 | public LSL_Key llGetPermissionsKey() |
4468 | { | 4404 | { |
4469 | m_host.AddScriptLPS(1); | 4405 | //// m_host.AddScriptLPS(1); |
4470 | 4406 | ||
4471 | return m_item.PermsGranter.ToString(); | 4407 | return m_item.PermsGranter.ToString(); |
4472 | } | 4408 | } |
4473 | 4409 | ||
4474 | public LSL_Integer llGetPermissions() | 4410 | public LSL_Integer llGetPermissions() |
4475 | { | 4411 | { |
4476 | m_host.AddScriptLPS(1); | 4412 | //// m_host.AddScriptLPS(1); |
4477 | 4413 | ||
4478 | int perms = m_item.PermsMask; | 4414 | int perms = m_item.PermsMask; |
4479 | 4415 | ||
@@ -4485,7 +4421,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4485 | 4421 | ||
4486 | public LSL_Integer llGetLinkNumber() | 4422 | public LSL_Integer llGetLinkNumber() |
4487 | { | 4423 | { |
4488 | m_host.AddScriptLPS(1); | 4424 | //// m_host.AddScriptLPS(1); |
4489 | 4425 | ||
4490 | if (m_host.ParentGroup.PrimCount > 1) | 4426 | if (m_host.ParentGroup.PrimCount > 1) |
4491 | { | 4427 | { |
@@ -4513,7 +4449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4513 | 4449 | ||
4514 | public void llCreateLink(LSL_Key target, LSL_Integer parent) | 4450 | public void llCreateLink(LSL_Key target, LSL_Integer parent) |
4515 | { | 4451 | { |
4516 | m_host.AddScriptLPS(1); | 4452 | //// m_host.AddScriptLPS(1); |
4517 | 4453 | ||
4518 | UUID targetID; | 4454 | UUID targetID; |
4519 | 4455 | ||
@@ -4578,12 +4514,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4578 | if (client != null) | 4514 | if (client != null) |
4579 | parentPrim.SendPropertiesToClient(client); | 4515 | parentPrim.SendPropertiesToClient(client); |
4580 | 4516 | ||
4581 | ScriptSleep(m_sleepMsOnCreateLink); | 4517 | //// ScriptSleep(m_sleepMsOnCreateLink); |
4582 | } | 4518 | } |
4583 | 4519 | ||
4584 | public void llBreakLink(int linknum) | 4520 | public void llBreakLink(int linknum) |
4585 | { | 4521 | { |
4586 | m_host.AddScriptLPS(1); | 4522 | //// m_host.AddScriptLPS(1); |
4587 | 4523 | ||
4588 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 | 4524 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 |
4589 | && !m_automaticLinkPermission) | 4525 | && !m_automaticLinkPermission) |
@@ -4684,7 +4620,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4684 | 4620 | ||
4685 | public void llBreakAllLinks() | 4621 | public void llBreakAllLinks() |
4686 | { | 4622 | { |
4687 | m_host.AddScriptLPS(1); | 4623 | //// m_host.AddScriptLPS(1); |
4688 | 4624 | ||
4689 | TaskInventoryItem item = m_item; | 4625 | TaskInventoryItem item = m_item; |
4690 | 4626 | ||
@@ -4717,7 +4653,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4717 | 4653 | ||
4718 | public LSL_Key llGetLinkKey(int linknum) | 4654 | public LSL_Key llGetLinkKey(int linknum) |
4719 | { | 4655 | { |
4720 | m_host.AddScriptLPS(1); | 4656 | //// m_host.AddScriptLPS(1); |
4721 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); | 4657 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); |
4722 | if (part != null) | 4658 | if (part != null) |
4723 | { | 4659 | { |
@@ -4783,7 +4719,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4783 | /// </remarks> | 4719 | /// </remarks> |
4784 | public LSL_String llGetLinkName(int linknum) | 4720 | public LSL_String llGetLinkName(int linknum) |
4785 | { | 4721 | { |
4786 | m_host.AddScriptLPS(1); | 4722 | //// m_host.AddScriptLPS(1); |
4787 | 4723 | ||
4788 | ISceneEntity entity = GetLinkEntity(m_host, linknum); | 4724 | ISceneEntity entity = GetLinkEntity(m_host, linknum); |
4789 | 4725 | ||
@@ -4795,7 +4731,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4795 | 4731 | ||
4796 | public LSL_Integer llGetInventoryNumber(int type) | 4732 | public LSL_Integer llGetInventoryNumber(int type) |
4797 | { | 4733 | { |
4798 | m_host.AddScriptLPS(1); | 4734 | //// m_host.AddScriptLPS(1); |
4799 | int count = 0; | 4735 | int count = 0; |
4800 | 4736 | ||
4801 | m_host.TaskInventory.LockItemsForRead(true); | 4737 | m_host.TaskInventory.LockItemsForRead(true); |
@@ -4813,7 +4749,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4813 | 4749 | ||
4814 | public LSL_String llGetInventoryName(int type, int number) | 4750 | public LSL_String llGetInventoryName(int type, int number) |
4815 | { | 4751 | { |
4816 | m_host.AddScriptLPS(1); | 4752 | //// m_host.AddScriptLPS(1); |
4817 | ArrayList keys = new ArrayList(); | 4753 | ArrayList keys = new ArrayList(); |
4818 | 4754 | ||
4819 | m_host.TaskInventory.LockItemsForRead(true); | 4755 | m_host.TaskInventory.LockItemsForRead(true); |
@@ -4840,14 +4776,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4840 | 4776 | ||
4841 | public LSL_Float llGetEnergy() | 4777 | public LSL_Float llGetEnergy() |
4842 | { | 4778 | { |
4843 | m_host.AddScriptLPS(1); | 4779 | //// m_host.AddScriptLPS(1); |
4844 | // TODO: figure out real energy value | 4780 | // TODO: figure out real energy value |
4845 | return 1.0f; | 4781 | return 1.0f; |
4846 | } | 4782 | } |
4847 | 4783 | ||
4848 | public void llGiveInventory(LSL_Key destination, LSL_String inventory) | 4784 | public void llGiveInventory(LSL_Key destination, LSL_String inventory) |
4849 | { | 4785 | { |
4850 | m_host.AddScriptLPS(1); | 4786 | //// m_host.AddScriptLPS(1); |
4851 | 4787 | ||
4852 | UUID destId = UUID.Zero; | 4788 | UUID destId = UUID.Zero; |
4853 | 4789 | ||
@@ -4931,15 +4867,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4931 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); | 4867 | m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); |
4932 | } | 4868 | } |
4933 | 4869 | ||
4934 | //This delay should only occur when giving inventory to avatars. | 4870 | //// //This delay should only occur when giving inventory to avatars. |
4935 | ScriptSleep(m_sleepMsOnGiveInventory); | 4871 | //// ScriptSleep(m_sleepMsOnGiveInventory); |
4936 | } | 4872 | } |
4937 | } | 4873 | } |
4938 | 4874 | ||
4939 | [DebuggerNonUserCode] | 4875 | [DebuggerNonUserCode] |
4940 | public void llRemoveInventory(string name) | 4876 | public void llRemoveInventory(string name) |
4941 | { | 4877 | { |
4942 | m_host.AddScriptLPS(1); | 4878 | //// m_host.AddScriptLPS(1); |
4943 | 4879 | ||
4944 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); | 4880 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
4945 | 4881 | ||
@@ -4954,7 +4890,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4954 | 4890 | ||
4955 | public void llSetText(string text, LSL_Vector color, double alpha) | 4891 | public void llSetText(string text, LSL_Vector color, double alpha) |
4956 | { | 4892 | { |
4957 | m_host.AddScriptLPS(1); | 4893 | //// m_host.AddScriptLPS(1); |
4958 | Vector3 av3 = Util.Clip(color, 0.0f, 1.0f); | 4894 | Vector3 av3 = Util.Clip(color, 0.0f, 1.0f); |
4959 | byte[] data; | 4895 | byte[] data; |
4960 | data = Util.StringToBytes256(text); | 4896 | data = Util.StringToBytes256(text); |
@@ -4964,13 +4900,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4964 | 4900 | ||
4965 | public LSL_Float llWater(LSL_Vector offset) | 4901 | public LSL_Float llWater(LSL_Vector offset) |
4966 | { | 4902 | { |
4967 | m_host.AddScriptLPS(1); | 4903 | //// m_host.AddScriptLPS(1); |
4968 | return World.RegionInfo.RegionSettings.WaterHeight; | 4904 | return World.RegionInfo.RegionSettings.WaterHeight; |
4969 | } | 4905 | } |
4970 | 4906 | ||
4971 | public void llPassTouches(int pass) | 4907 | public void llPassTouches(int pass) |
4972 | { | 4908 | { |
4973 | m_host.AddScriptLPS(1); | 4909 | //// m_host.AddScriptLPS(1); |
4974 | if (pass != 0) | 4910 | if (pass != 0) |
4975 | m_host.PassTouches = true; | 4911 | m_host.PassTouches = true; |
4976 | else | 4912 | else |
@@ -4979,7 +4915,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4979 | 4915 | ||
4980 | public LSL_Key llRequestAgentData(string id, int data) | 4916 | public LSL_Key llRequestAgentData(string id, int data) |
4981 | { | 4917 | { |
4982 | m_host.AddScriptLPS(1); | 4918 | //// m_host.AddScriptLPS(1); |
4983 | 4919 | ||
4984 | UUID uuid; | 4920 | UUID uuid; |
4985 | if (UUID.TryParse(id, out uuid)) | 4921 | if (UUID.TryParse(id, out uuid)) |
@@ -5085,7 +5021,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5085 | AsyncCommands. | 5021 | AsyncCommands. |
5086 | DataserverPlugin.DataserverReply(rq.ToString(), reply); | 5022 | DataserverPlugin.DataserverReply(rq.ToString(), reply); |
5087 | 5023 | ||
5088 | ScriptSleep(m_sleepMsOnRequestAgentData); | 5024 | //// ScriptSleep(m_sleepMsOnRequestAgentData); |
5089 | return tid.ToString(); | 5025 | return tid.ToString(); |
5090 | } | 5026 | } |
5091 | else | 5027 | else |
@@ -5097,7 +5033,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5097 | 5033 | ||
5098 | public LSL_Key llRequestInventoryData(string name) | 5034 | public LSL_Key llRequestInventoryData(string name) |
5099 | { | 5035 | { |
5100 | m_host.AddScriptLPS(1); | 5036 | //// m_host.AddScriptLPS(1); |
5101 | 5037 | ||
5102 | foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems()) | 5038 | foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems()) |
5103 | { | 5039 | { |
@@ -5124,24 +5060,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5124 | reply); | 5060 | reply); |
5125 | }); | 5061 | }); |
5126 | 5062 | ||
5127 | ScriptSleep(m_sleepMsOnRequestInventoryData); | 5063 | //// ScriptSleep(m_sleepMsOnRequestInventoryData); |
5128 | return tid.ToString(); | 5064 | return tid.ToString(); |
5129 | } | 5065 | } |
5130 | } | 5066 | } |
5131 | 5067 | ||
5132 | ScriptSleep(m_sleepMsOnRequestInventoryData); | 5068 | //// ScriptSleep(m_sleepMsOnRequestInventoryData); |
5133 | return String.Empty; | 5069 | return String.Empty; |
5134 | } | 5070 | } |
5135 | 5071 | ||
5136 | public void llSetDamage(double damage) | 5072 | public void llSetDamage(double damage) |
5137 | { | 5073 | { |
5138 | m_host.AddScriptLPS(1); | 5074 | //// m_host.AddScriptLPS(1); |
5139 | m_host.ParentGroup.Damage = (float)damage; | 5075 | m_host.ParentGroup.Damage = (float)damage; |
5140 | } | 5076 | } |
5141 | 5077 | ||
5142 | public void llTeleportAgentHome(string agent) | 5078 | public void llTeleportAgentHome(string agent) |
5143 | { | 5079 | { |
5144 | m_host.AddScriptLPS(1); | 5080 | //// m_host.AddScriptLPS(1); |
5145 | UUID agentId = new UUID(); | 5081 | UUID agentId = new UUID(); |
5146 | if (UUID.TryParse(agent, out agentId)) | 5082 | if (UUID.TryParse(agent, out agentId)) |
5147 | { | 5083 | { |
@@ -5169,12 +5105,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5169 | } | 5105 | } |
5170 | } | 5106 | } |
5171 | 5107 | ||
5172 | ScriptSleep(m_sleepMsOnSetDamage); | 5108 | //// ScriptSleep(m_sleepMsOnSetDamage); |
5173 | } | 5109 | } |
5174 | 5110 | ||
5175 | public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) | 5111 | public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) |
5176 | { | 5112 | { |
5177 | m_host.AddScriptLPS(1); | 5113 | //// m_host.AddScriptLPS(1); |
5178 | UUID agentId = new UUID(); | 5114 | UUID agentId = new UUID(); |
5179 | 5115 | ||
5180 | if (UUID.TryParse(agent, out agentId)) | 5116 | if (UUID.TryParse(agent, out agentId)) |
@@ -5217,7 +5153,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5217 | 5153 | ||
5218 | public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global_coords, LSL_Vector targetPos, LSL_Vector targetLookAt) | 5154 | public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global_coords, LSL_Vector targetPos, LSL_Vector targetLookAt) |
5219 | { | 5155 | { |
5220 | m_host.AddScriptLPS(1); | 5156 | //// m_host.AddScriptLPS(1); |
5221 | UUID agentId = new UUID(); | 5157 | UUID agentId = new UUID(); |
5222 | 5158 | ||
5223 | ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y); | 5159 | ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y); |
@@ -5282,7 +5218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5282 | if (dm == null) | 5218 | if (dm == null) |
5283 | return; | 5219 | return; |
5284 | 5220 | ||
5285 | m_host.AddScriptLPS(1); | 5221 | //// m_host.AddScriptLPS(1); |
5286 | UUID av = new UUID(); | 5222 | UUID av = new UUID(); |
5287 | if (!UUID.TryParse(agent,out av)) | 5223 | if (!UUID.TryParse(agent,out av)) |
5288 | { | 5224 | { |
@@ -5301,13 +5237,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5301 | else | 5237 | else |
5302 | { | 5238 | { |
5303 | dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); | 5239 | dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); |
5304 | ScriptSleep(m_sleepMsOnTextBox); | 5240 | //// ScriptSleep(m_sleepMsOnTextBox); |
5305 | } | 5241 | } |
5306 | } | 5242 | } |
5307 | 5243 | ||
5308 | public void llModifyLand(int action, int brush) | 5244 | public void llModifyLand(int action, int brush) |
5309 | { | 5245 | { |
5310 | m_host.AddScriptLPS(1); | 5246 | //// m_host.AddScriptLPS(1); |
5311 | ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface<ITerrainModule>(); | 5247 | ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface<ITerrainModule>(); |
5312 | if (tm != null) | 5248 | if (tm != null) |
5313 | { | 5249 | { |
@@ -5317,7 +5253,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5317 | 5253 | ||
5318 | public void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume) | 5254 | public void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume) |
5319 | { | 5255 | { |
5320 | m_host.AddScriptLPS(1); | 5256 | //// m_host.AddScriptLPS(1); |
5321 | 5257 | ||
5322 | if(impact_sound == "") | 5258 | if(impact_sound == "") |
5323 | { | 5259 | { |
@@ -5345,7 +5281,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5345 | public LSL_String llGetAnimation(LSL_Key id) | 5281 | public LSL_String llGetAnimation(LSL_Key id) |
5346 | { | 5282 | { |
5347 | // This should only return a value if the avatar is in the same region | 5283 | // This should only return a value if the avatar is in the same region |
5348 | m_host.AddScriptLPS(1); | 5284 | //// m_host.AddScriptLPS(1); |
5349 | UUID avatar; | 5285 | UUID avatar; |
5350 | if(!UUID.TryParse(id, out avatar)) | 5286 | if(!UUID.TryParse(id, out avatar)) |
5351 | return ""; | 5287 | return ""; |
@@ -5375,7 +5311,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5375 | 5311 | ||
5376 | public void llMessageLinked(int linknumber, int num, string msg, string id) | 5312 | public void llMessageLinked(int linknumber, int num, string msg, string id) |
5377 | { | 5313 | { |
5378 | m_host.AddScriptLPS(1); | 5314 | //// m_host.AddScriptLPS(1); |
5379 | 5315 | ||
5380 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 5316 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
5381 | 5317 | ||
@@ -5406,7 +5342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5406 | 5342 | ||
5407 | public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) | 5343 | public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) |
5408 | { | 5344 | { |
5409 | m_host.AddScriptLPS(1); | 5345 | //// m_host.AddScriptLPS(1); |
5410 | bool pushrestricted = World.RegionInfo.RegionSettings.RestrictPushing; | 5346 | bool pushrestricted = World.RegionInfo.RegionSettings.RestrictPushing; |
5411 | bool pushAllowed = false; | 5347 | bool pushAllowed = false; |
5412 | 5348 | ||
@@ -5573,7 +5509,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5573 | 5509 | ||
5574 | public void llPassCollisions(int pass) | 5510 | public void llPassCollisions(int pass) |
5575 | { | 5511 | { |
5576 | m_host.AddScriptLPS(1); | 5512 | //// m_host.AddScriptLPS(1); |
5577 | if (pass == 0) | 5513 | if (pass == 0) |
5578 | { | 5514 | { |
5579 | m_host.PassCollisions = false; | 5515 | m_host.PassCollisions = false; |
@@ -5586,14 +5522,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5586 | 5522 | ||
5587 | public LSL_String llGetScriptName() | 5523 | public LSL_String llGetScriptName() |
5588 | { | 5524 | { |
5589 | m_host.AddScriptLPS(1); | 5525 | //// m_host.AddScriptLPS(1); |
5590 | 5526 | ||
5591 | return m_item.Name != null ? m_item.Name : String.Empty; | 5527 | return m_item.Name != null ? m_item.Name : String.Empty; |
5592 | } | 5528 | } |
5593 | 5529 | ||
5594 | public LSL_Integer llGetLinkNumberOfSides(int link) | 5530 | public LSL_Integer llGetLinkNumberOfSides(int link) |
5595 | { | 5531 | { |
5596 | m_host.AddScriptLPS(1); | 5532 | //// m_host.AddScriptLPS(1); |
5597 | 5533 | ||
5598 | SceneObjectPart linkedPart; | 5534 | SceneObjectPart linkedPart; |
5599 | 5535 | ||
@@ -5609,7 +5545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5609 | 5545 | ||
5610 | public LSL_Integer llGetNumberOfSides() | 5546 | public LSL_Integer llGetNumberOfSides() |
5611 | { | 5547 | { |
5612 | m_host.AddScriptLPS(1); | 5548 | //// m_host.AddScriptLPS(1); |
5613 | 5549 | ||
5614 | return m_host.GetNumberOfSides(); | 5550 | return m_host.GetNumberOfSides(); |
5615 | } | 5551 | } |
@@ -5648,7 +5584,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5648 | // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) | 5584 | // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) |
5649 | public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle) | 5585 | public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle) |
5650 | { | 5586 | { |
5651 | m_host.AddScriptLPS(1); | 5587 | //// m_host.AddScriptLPS(1); |
5652 | 5588 | ||
5653 | double x, y, z, s, t; | 5589 | double x, y, z, s, t; |
5654 | 5590 | ||
@@ -5669,7 +5605,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5669 | /// <param name='rot'></param> | 5605 | /// <param name='rot'></param> |
5670 | public LSL_Vector llRot2Axis(LSL_Rotation rot) | 5606 | public LSL_Vector llRot2Axis(LSL_Rotation rot) |
5671 | { | 5607 | { |
5672 | m_host.AddScriptLPS(1); | 5608 | //// m_host.AddScriptLPS(1); |
5673 | 5609 | ||
5674 | rot.Normalize(); | 5610 | rot.Normalize(); |
5675 | 5611 | ||
@@ -5687,7 +5623,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5687 | // Returns the angle of a quaternion (see llRot2Axis for the axis) | 5623 | // Returns the angle of a quaternion (see llRot2Axis for the axis) |
5688 | public LSL_Float llRot2Angle(LSL_Rotation rot) | 5624 | public LSL_Float llRot2Angle(LSL_Rotation rot) |
5689 | { | 5625 | { |
5690 | m_host.AddScriptLPS(1); | 5626 | //// m_host.AddScriptLPS(1); |
5691 | 5627 | ||
5692 | rot.Normalize(); | 5628 | rot.Normalize(); |
5693 | 5629 | ||
@@ -5700,20 +5636,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5700 | 5636 | ||
5701 | public LSL_Float llAcos(LSL_Float val) | 5637 | public LSL_Float llAcos(LSL_Float val) |
5702 | { | 5638 | { |
5703 | m_host.AddScriptLPS(1); | 5639 | //// m_host.AddScriptLPS(1); |
5704 | return (double)Math.Acos(val); | 5640 | return (double)Math.Acos(val); |
5705 | } | 5641 | } |
5706 | 5642 | ||
5707 | public LSL_Float llAsin(LSL_Float val) | 5643 | public LSL_Float llAsin(LSL_Float val) |
5708 | { | 5644 | { |
5709 | m_host.AddScriptLPS(1); | 5645 | //// m_host.AddScriptLPS(1); |
5710 | return (double)Math.Asin(val); | 5646 | return (double)Math.Asin(val); |
5711 | } | 5647 | } |
5712 | 5648 | ||
5713 | // jcochran 5/jan/2012 | 5649 | // jcochran 5/jan/2012 |
5714 | public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b) | 5650 | public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b) |
5715 | { | 5651 | { |
5716 | m_host.AddScriptLPS(1); | 5652 | //// m_host.AddScriptLPS(1); |
5717 | 5653 | ||
5718 | double aa = (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s); | 5654 | double aa = (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s); |
5719 | double bb = (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s); | 5655 | double bb = (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s); |
@@ -5727,7 +5663,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5727 | 5663 | ||
5728 | public LSL_Key llGetInventoryKey(string name) | 5664 | public LSL_Key llGetInventoryKey(string name) |
5729 | { | 5665 | { |
5730 | m_host.AddScriptLPS(1); | 5666 | //// m_host.AddScriptLPS(1); |
5731 | 5667 | ||
5732 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); | 5668 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
5733 | 5669 | ||
@@ -5746,7 +5682,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5746 | 5682 | ||
5747 | public void llAllowInventoryDrop(LSL_Integer add) | 5683 | public void llAllowInventoryDrop(LSL_Integer add) |
5748 | { | 5684 | { |
5749 | m_host.AddScriptLPS(1); | 5685 | //// m_host.AddScriptLPS(1); |
5750 | 5686 | ||
5751 | if (add != 0) | 5687 | if (add != 0) |
5752 | m_host.ParentGroup.RootPart.AllowedDrop = true; | 5688 | m_host.ParentGroup.RootPart.AllowedDrop = true; |
@@ -5759,7 +5695,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5759 | 5695 | ||
5760 | public LSL_Vector llGetSunDirection() | 5696 | public LSL_Vector llGetSunDirection() |
5761 | { | 5697 | { |
5762 | m_host.AddScriptLPS(1); | 5698 | //// m_host.AddScriptLPS(1); |
5763 | 5699 | ||
5764 | Vector3 sun = World.RegionInfo.RegionSettings.SunVector; | 5700 | Vector3 sun = World.RegionInfo.RegionSettings.SunVector; |
5765 | return new LSL_Vector(sun); | 5701 | return new LSL_Vector(sun); |
@@ -5767,7 +5703,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5767 | 5703 | ||
5768 | public LSL_Vector llGetTextureOffset(int face) | 5704 | public LSL_Vector llGetTextureOffset(int face) |
5769 | { | 5705 | { |
5770 | m_host.AddScriptLPS(1); | 5706 | //// m_host.AddScriptLPS(1); |
5771 | return GetTextureOffset(m_host, face); | 5707 | return GetTextureOffset(m_host, face); |
5772 | } | 5708 | } |
5773 | 5709 | ||
@@ -5794,7 +5730,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5794 | 5730 | ||
5795 | public LSL_Vector llGetTextureScale(int side) | 5731 | public LSL_Vector llGetTextureScale(int side) |
5796 | { | 5732 | { |
5797 | m_host.AddScriptLPS(1); | 5733 | //// m_host.AddScriptLPS(1); |
5798 | Primitive.TextureEntry tex = m_host.Shape.Textures; | 5734 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
5799 | LSL_Vector scale; | 5735 | LSL_Vector scale; |
5800 | if (side == -1) | 5736 | if (side == -1) |
@@ -5809,7 +5745,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5809 | 5745 | ||
5810 | public LSL_Float llGetTextureRot(int face) | 5746 | public LSL_Float llGetTextureRot(int face) |
5811 | { | 5747 | { |
5812 | m_host.AddScriptLPS(1); | 5748 | //// m_host.AddScriptLPS(1); |
5813 | return GetTextureRot(m_host, face); | 5749 | return GetTextureRot(m_host, face); |
5814 | } | 5750 | } |
5815 | 5751 | ||
@@ -5832,7 +5768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5832 | 5768 | ||
5833 | public LSL_Integer llSubStringIndex(string source, string pattern) | 5769 | public LSL_Integer llSubStringIndex(string source, string pattern) |
5834 | { | 5770 | { |
5835 | m_host.AddScriptLPS(1); | 5771 | //// m_host.AddScriptLPS(1); |
5836 | if (string.IsNullOrEmpty(source)) | 5772 | if (string.IsNullOrEmpty(source)) |
5837 | return -1; | 5773 | return -1; |
5838 | if (string.IsNullOrEmpty(pattern)) | 5774 | if (string.IsNullOrEmpty(pattern)) |
@@ -5842,7 +5778,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5842 | 5778 | ||
5843 | public LSL_Key llGetOwnerKey(string id) | 5779 | public LSL_Key llGetOwnerKey(string id) |
5844 | { | 5780 | { |
5845 | m_host.AddScriptLPS(1); | 5781 | //// m_host.AddScriptLPS(1); |
5846 | UUID key = new UUID(); | 5782 | UUID key = new UUID(); |
5847 | if (UUID.TryParse(id, out key)) | 5783 | if (UUID.TryParse(id, out key)) |
5848 | { | 5784 | { |
@@ -5867,14 +5803,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5867 | 5803 | ||
5868 | public LSL_Vector llGetCenterOfMass() | 5804 | public LSL_Vector llGetCenterOfMass() |
5869 | { | 5805 | { |
5870 | m_host.AddScriptLPS(1); | 5806 | //// m_host.AddScriptLPS(1); |
5871 | 5807 | ||
5872 | return new LSL_Vector(m_host.GetCenterOfMass()); | 5808 | return new LSL_Vector(m_host.GetCenterOfMass()); |
5873 | } | 5809 | } |
5874 | 5810 | ||
5875 | public LSL_List llListSort(LSL_List src, int stride, int ascending) | 5811 | public LSL_List llListSort(LSL_List src, int stride, int ascending) |
5876 | { | 5812 | { |
5877 | m_host.AddScriptLPS(1); | 5813 | //// m_host.AddScriptLPS(1); |
5878 | 5814 | ||
5879 | if (stride <= 0) | 5815 | if (stride <= 0) |
5880 | { | 5816 | { |
@@ -5885,14 +5821,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5885 | 5821 | ||
5886 | public LSL_Integer llGetListLength(LSL_List src) | 5822 | public LSL_Integer llGetListLength(LSL_List src) |
5887 | { | 5823 | { |
5888 | m_host.AddScriptLPS(1); | 5824 | //// m_host.AddScriptLPS(1); |
5889 | 5825 | ||
5890 | return src.Length; | 5826 | return src.Length; |
5891 | } | 5827 | } |
5892 | 5828 | ||
5893 | public LSL_Integer llList2Integer(LSL_List src, int index) | 5829 | public LSL_Integer llList2Integer(LSL_List src, int index) |
5894 | { | 5830 | { |
5895 | m_host.AddScriptLPS(1); | 5831 | //// m_host.AddScriptLPS(1); |
5896 | if (index < 0) | 5832 | if (index < 0) |
5897 | index = src.Length + index; | 5833 | index = src.Length + index; |
5898 | 5834 | ||
@@ -5922,7 +5858,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5922 | 5858 | ||
5923 | public LSL_Float llList2Float(LSL_List src, int index) | 5859 | public LSL_Float llList2Float(LSL_List src, int index) |
5924 | { | 5860 | { |
5925 | m_host.AddScriptLPS(1); | 5861 | //// m_host.AddScriptLPS(1); |
5926 | if (index < 0) | 5862 | if (index < 0) |
5927 | index = src.Length + index; | 5863 | index = src.Length + index; |
5928 | 5864 | ||
@@ -5977,7 +5913,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5977 | 5913 | ||
5978 | public LSL_String llList2String(LSL_List src, int index) | 5914 | public LSL_String llList2String(LSL_List src, int index) |
5979 | { | 5915 | { |
5980 | m_host.AddScriptLPS(1); | 5916 | //// m_host.AddScriptLPS(1); |
5981 | if (index < 0) | 5917 | if (index < 0) |
5982 | index = src.Length + index; | 5918 | index = src.Length + index; |
5983 | 5919 | ||
@@ -5989,7 +5925,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5989 | 5925 | ||
5990 | public LSL_Key llList2Key(LSL_List src, int index) | 5926 | public LSL_Key llList2Key(LSL_List src, int index) |
5991 | { | 5927 | { |
5992 | m_host.AddScriptLPS(1); | 5928 | //// m_host.AddScriptLPS(1); |
5993 | if (index < 0) | 5929 | if (index < 0) |
5994 | index = src.Length + index; | 5930 | index = src.Length + index; |
5995 | 5931 | ||
@@ -6017,7 +5953,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6017 | 5953 | ||
6018 | public LSL_Vector llList2Vector(LSL_List src, int index) | 5954 | public LSL_Vector llList2Vector(LSL_List src, int index) |
6019 | { | 5955 | { |
6020 | m_host.AddScriptLPS(1); | 5956 | //// m_host.AddScriptLPS(1); |
6021 | if (index < 0) | 5957 | if (index < 0) |
6022 | index = src.Length + index; | 5958 | index = src.Length + index; |
6023 | 5959 | ||
@@ -6046,7 +5982,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6046 | 5982 | ||
6047 | public LSL_Rotation llList2Rot(LSL_List src, int index) | 5983 | public LSL_Rotation llList2Rot(LSL_List src, int index) |
6048 | { | 5984 | { |
6049 | m_host.AddScriptLPS(1); | 5985 | //// m_host.AddScriptLPS(1); |
6050 | if (index < 0) | 5986 | if (index < 0) |
6051 | index = src.Length + index; | 5987 | index = src.Length + index; |
6052 | 5988 | ||
@@ -6073,7 +6009,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6073 | 6009 | ||
6074 | public LSL_List llList2List(LSL_List src, int start, int end) | 6010 | public LSL_List llList2List(LSL_List src, int start, int end) |
6075 | { | 6011 | { |
6076 | m_host.AddScriptLPS(1); | 6012 | //// m_host.AddScriptLPS(1); |
6077 | return src.GetSublist(start, end); | 6013 | return src.GetSublist(start, end); |
6078 | } | 6014 | } |
6079 | 6015 | ||
@@ -6084,7 +6020,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6084 | 6020 | ||
6085 | public LSL_Integer llGetListEntryType(LSL_List src, int index) | 6021 | public LSL_Integer llGetListEntryType(LSL_List src, int index) |
6086 | { | 6022 | { |
6087 | m_host.AddScriptLPS(1); | 6023 | //// m_host.AddScriptLPS(1); |
6088 | if (index < 0) | 6024 | if (index < 0) |
6089 | { | 6025 | { |
6090 | index = src.Length + index; | 6026 | index = src.Length + index; |
@@ -6128,7 +6064,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6128 | /// </summary> | 6064 | /// </summary> |
6129 | public LSL_String llList2CSV(LSL_List src) | 6065 | public LSL_String llList2CSV(LSL_List src) |
6130 | { | 6066 | { |
6131 | m_host.AddScriptLPS(1); | 6067 | //// m_host.AddScriptLPS(1); |
6132 | 6068 | ||
6133 | return string.Join(", ", | 6069 | return string.Join(", ", |
6134 | (new List<object>(src.Data)).ConvertAll<string>(o => | 6070 | (new List<object>(src.Data)).ConvertAll<string>(o => |
@@ -6153,7 +6089,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6153 | int start = 0; | 6089 | int start = 0; |
6154 | int length = 0; | 6090 | int length = 0; |
6155 | 6091 | ||
6156 | m_host.AddScriptLPS(1); | 6092 | //// m_host.AddScriptLPS(1); |
6157 | 6093 | ||
6158 | for (int i = 0; i < src.Length; i++) | 6094 | for (int i = 0; i < src.Length; i++) |
6159 | { | 6095 | { |
@@ -6210,7 +6146,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6210 | int chunkk; | 6146 | int chunkk; |
6211 | int[] chunks; | 6147 | int[] chunks; |
6212 | 6148 | ||
6213 | m_host.AddScriptLPS(1); | 6149 | //// m_host.AddScriptLPS(1); |
6214 | 6150 | ||
6215 | if (stride <= 0) | 6151 | if (stride <= 0) |
6216 | { | 6152 | { |
@@ -6282,7 +6218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6282 | int[] ei = new int[2]; | 6218 | int[] ei = new int[2]; |
6283 | bool twopass = false; | 6219 | bool twopass = false; |
6284 | 6220 | ||
6285 | m_host.AddScriptLPS(1); | 6221 | //// m_host.AddScriptLPS(1); |
6286 | 6222 | ||
6287 | // First step is always to deal with negative indices | 6223 | // First step is always to deal with negative indices |
6288 | 6224 | ||
@@ -6363,7 +6299,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6363 | 6299 | ||
6364 | public LSL_Integer llGetRegionAgentCount() | 6300 | public LSL_Integer llGetRegionAgentCount() |
6365 | { | 6301 | { |
6366 | m_host.AddScriptLPS(1); | 6302 | //// m_host.AddScriptLPS(1); |
6367 | 6303 | ||
6368 | int count = 0; | 6304 | int count = 0; |
6369 | World.ForEachRootScenePresence(delegate(ScenePresence sp) { | 6305 | World.ForEachRootScenePresence(delegate(ScenePresence sp) { |
@@ -6375,13 +6311,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6375 | 6311 | ||
6376 | public LSL_Vector llGetRegionCorner() | 6312 | public LSL_Vector llGetRegionCorner() |
6377 | { | 6313 | { |
6378 | m_host.AddScriptLPS(1); | 6314 | //// m_host.AddScriptLPS(1); |
6379 | return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); | 6315 | return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); |
6380 | } | 6316 | } |
6381 | 6317 | ||
6382 | public LSL_String llGetEnv(LSL_String name) | 6318 | public LSL_String llGetEnv(LSL_String name) |
6383 | { | 6319 | { |
6384 | m_host.AddScriptLPS(1); | 6320 | //// m_host.AddScriptLPS(1); |
6385 | switch(name) | 6321 | switch(name) |
6386 | { | 6322 | { |
6387 | case "agent_limit": | 6323 | case "agent_limit": |
@@ -6454,7 +6390,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6454 | LSL_List pref; | 6390 | LSL_List pref; |
6455 | LSL_List suff; | 6391 | LSL_List suff; |
6456 | 6392 | ||
6457 | m_host.AddScriptLPS(1); | 6393 | //// m_host.AddScriptLPS(1); |
6458 | 6394 | ||
6459 | if (index < 0) | 6395 | if (index < 0) |
6460 | { | 6396 | { |
@@ -6508,7 +6444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6508 | int index = -1; | 6444 | int index = -1; |
6509 | int length = src.Length - test.Length + 1; | 6445 | int length = src.Length - test.Length + 1; |
6510 | 6446 | ||
6511 | m_host.AddScriptLPS(1); | 6447 | //// m_host.AddScriptLPS(1); |
6512 | 6448 | ||
6513 | // If either list is empty, do not match | 6449 | // If either list is empty, do not match |
6514 | if (src.Length != 0 && test.Length != 0) | 6450 | if (src.Length != 0 && test.Length != 0) |
@@ -6553,19 +6489,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6553 | 6489 | ||
6554 | public LSL_String llGetObjectName() | 6490 | public LSL_String llGetObjectName() |
6555 | { | 6491 | { |
6556 | m_host.AddScriptLPS(1); | 6492 | //// m_host.AddScriptLPS(1); |
6557 | return m_host.Name !=null ? m_host.Name : String.Empty; | 6493 | return m_host.Name !=null ? m_host.Name : String.Empty; |
6558 | } | 6494 | } |
6559 | 6495 | ||
6560 | public void llSetObjectName(string name) | 6496 | public void llSetObjectName(string name) |
6561 | { | 6497 | { |
6562 | m_host.AddScriptLPS(1); | 6498 | //// m_host.AddScriptLPS(1); |
6563 | m_host.Name = name != null ? name : String.Empty; | 6499 | m_host.Name = name != null ? name : String.Empty; |
6564 | } | 6500 | } |
6565 | 6501 | ||
6566 | public LSL_String llGetDate() | 6502 | public LSL_String llGetDate() |
6567 | { | 6503 | { |
6568 | m_host.AddScriptLPS(1); | 6504 | //// m_host.AddScriptLPS(1); |
6569 | DateTime date = DateTime.Now.ToUniversalTime(); | 6505 | DateTime date = DateTime.Now.ToUniversalTime(); |
6570 | string result = date.ToString("yyyy-MM-dd"); | 6506 | string result = date.ToString("yyyy-MM-dd"); |
6571 | return result; | 6507 | return result; |
@@ -6573,7 +6509,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6573 | 6509 | ||
6574 | public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir) | 6510 | public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir) |
6575 | { | 6511 | { |
6576 | m_host.AddScriptLPS(1); | 6512 | //// m_host.AddScriptLPS(1); |
6577 | 6513 | ||
6578 | if(dir.x == 0 && dir.y == 0) | 6514 | if(dir.x == 0 && dir.y == 0) |
6579 | return 1; // SL wiki | 6515 | return 1; // SL wiki |
@@ -6640,7 +6576,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6640 | /// </summary> | 6576 | /// </summary> |
6641 | public LSL_Integer llGetAgentInfo(LSL_Key id) | 6577 | public LSL_Integer llGetAgentInfo(LSL_Key id) |
6642 | { | 6578 | { |
6643 | m_host.AddScriptLPS(1); | 6579 | //// m_host.AddScriptLPS(1); |
6644 | 6580 | ||
6645 | UUID key = new UUID(); | 6581 | UUID key = new UUID(); |
6646 | if (!UUID.TryParse(id, out key)) | 6582 | if (!UUID.TryParse(id, out key)) |
@@ -6748,7 +6684,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6748 | public LSL_String llGetAgentLanguage(LSL_Key id) | 6684 | public LSL_String llGetAgentLanguage(LSL_Key id) |
6749 | { | 6685 | { |
6750 | // This should only return a value if the avatar is in the same region, but eh. idc. | 6686 | // This should only return a value if the avatar is in the same region, but eh. idc. |
6751 | m_host.AddScriptLPS(1); | 6687 | //// m_host.AddScriptLPS(1); |
6752 | if (World.AgentPreferencesService == null) | 6688 | if (World.AgentPreferencesService == null) |
6753 | { | 6689 | { |
6754 | Error("llGetAgentLanguage", "No AgentPreferencesService present"); | 6690 | Error("llGetAgentLanguage", "No AgentPreferencesService present"); |
@@ -6775,7 +6711,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6775 | /// </summary> | 6711 | /// </summary> |
6776 | public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) | 6712 | public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) |
6777 | { | 6713 | { |
6778 | m_host.AddScriptLPS(1); | 6714 | //// m_host.AddScriptLPS(1); |
6779 | 6715 | ||
6780 | // do our bit masks part | 6716 | // do our bit masks part |
6781 | bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0; | 6717 | bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0; |
@@ -6858,20 +6794,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6858 | 6794 | ||
6859 | public void llAdjustSoundVolume(LSL_Float volume) | 6795 | public void llAdjustSoundVolume(LSL_Float volume) |
6860 | { | 6796 | { |
6861 | m_host.AddScriptLPS(1); | 6797 | //// m_host.AddScriptLPS(1); |
6862 | m_host.AdjustSoundGain(volume); | 6798 | m_host.AdjustSoundGain(volume); |
6863 | ScriptSleep(m_sleepMsOnAdjustSoundVolume); | 6799 | //// ScriptSleep(m_sleepMsOnAdjustSoundVolume); |
6864 | } | 6800 | } |
6865 | 6801 | ||
6866 | public void llSetSoundRadius(double radius) | 6802 | public void llSetSoundRadius(double radius) |
6867 | { | 6803 | { |
6868 | m_host.AddScriptLPS(1); | 6804 | //// m_host.AddScriptLPS(1); |
6869 | m_host.SoundRadius = radius; | 6805 | m_host.SoundRadius = radius; |
6870 | } | 6806 | } |
6871 | 6807 | ||
6872 | public LSL_String llKey2Name(LSL_Key id) | 6808 | public LSL_String llKey2Name(LSL_Key id) |
6873 | { | 6809 | { |
6874 | m_host.AddScriptLPS(1); | 6810 | //// m_host.AddScriptLPS(1); |
6875 | UUID key = new UUID(); | 6811 | UUID key = new UUID(); |
6876 | if (UUID.TryParse(id,out key)) | 6812 | if (UUID.TryParse(id,out key)) |
6877 | { | 6813 | { |
@@ -6893,7 +6829,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6893 | 6829 | ||
6894 | public LSL_Key llName2Key(LSL_String name) | 6830 | public LSL_Key llName2Key(LSL_String name) |
6895 | { | 6831 | { |
6896 | m_host.AddScriptLPS(1); | 6832 | //// m_host.AddScriptLPS(1); |
6897 | 6833 | ||
6898 | foreach (ScenePresence sp in World.GetScenePresences()) | 6834 | foreach (ScenePresence sp in World.GetScenePresences()) |
6899 | { | 6835 | { |
@@ -6913,14 +6849,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6913 | 6849 | ||
6914 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) | 6850 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) |
6915 | { | 6851 | { |
6916 | m_host.AddScriptLPS(1); | 6852 | //// m_host.AddScriptLPS(1); |
6917 | 6853 | ||
6918 | SetTextureAnim(m_host, mode, face, sizex, sizey, start, length, rate); | 6854 | SetTextureAnim(m_host, mode, face, sizex, sizey, start, length, rate); |
6919 | } | 6855 | } |
6920 | 6856 | ||
6921 | public void llSetLinkTextureAnim(int linknumber, int mode, int face, int sizex, int sizey, double start, double length, double rate) | 6857 | public void llSetLinkTextureAnim(int linknumber, int mode, int face, int sizex, int sizey, double start, double length, double rate) |
6922 | { | 6858 | { |
6923 | m_host.AddScriptLPS(1); | 6859 | //// m_host.AddScriptLPS(1); |
6924 | 6860 | ||
6925 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 6861 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
6926 | 6862 | ||
@@ -6961,7 +6897,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6961 | public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, | 6897 | public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, |
6962 | LSL_Vector bottom_south_west) | 6898 | LSL_Vector bottom_south_west) |
6963 | { | 6899 | { |
6964 | m_host.AddScriptLPS(1); | 6900 | //// m_host.AddScriptLPS(1); |
6965 | if (m_SoundModule != null) | 6901 | if (m_SoundModule != null) |
6966 | { | 6902 | { |
6967 | m_SoundModule.TriggerSoundLimited(m_host.UUID, | 6903 | m_SoundModule.TriggerSoundLimited(m_host.UUID, |
@@ -6972,7 +6908,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6972 | 6908 | ||
6973 | public void llEjectFromLand(LSL_Key pest) | 6909 | public void llEjectFromLand(LSL_Key pest) |
6974 | { | 6910 | { |
6975 | m_host.AddScriptLPS(1); | 6911 | //// m_host.AddScriptLPS(1); |
6976 | UUID agentID = new UUID(); | 6912 | UUID agentID = new UUID(); |
6977 | if (UUID.TryParse(pest, out agentID)) | 6913 | if (UUID.TryParse(pest, out agentID)) |
6978 | { | 6914 | { |
@@ -6992,7 +6928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6992 | } | 6928 | } |
6993 | } | 6929 | } |
6994 | } | 6930 | } |
6995 | ScriptSleep(m_sleepMsOnEjectFromLand); | 6931 | //// ScriptSleep(m_sleepMsOnEjectFromLand); |
6996 | } | 6932 | } |
6997 | 6933 | ||
6998 | public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) | 6934 | public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) |
@@ -7002,7 +6938,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7002 | 6938 | ||
7003 | public LSL_Integer llOverMyLand(string id) | 6939 | public LSL_Integer llOverMyLand(string id) |
7004 | { | 6940 | { |
7005 | m_host.AddScriptLPS(1); | 6941 | //// m_host.AddScriptLPS(1); |
7006 | UUID key = new UUID(); | 6942 | UUID key = new UUID(); |
7007 | if (UUID.TryParse(id, out key)) | 6943 | if (UUID.TryParse(id, out key)) |
7008 | { | 6944 | { |
@@ -7031,7 +6967,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7031 | 6967 | ||
7032 | public LSL_Key llGetLandOwnerAt(LSL_Vector pos) | 6968 | public LSL_Key llGetLandOwnerAt(LSL_Vector pos) |
7033 | { | 6969 | { |
7034 | m_host.AddScriptLPS(1); | 6970 | //// m_host.AddScriptLPS(1); |
7035 | ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | 6971 | ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
7036 | if (land == null) | 6972 | if (land == null) |
7037 | return UUID.Zero.ToString(); | 6973 | return UUID.Zero.ToString(); |
@@ -7045,7 +6981,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7045 | /// </summary> | 6981 | /// </summary> |
7046 | public LSL_Vector llGetAgentSize(LSL_Key id) | 6982 | public LSL_Vector llGetAgentSize(LSL_Key id) |
7047 | { | 6983 | { |
7048 | m_host.AddScriptLPS(1); | 6984 | //// m_host.AddScriptLPS(1); |
7049 | UUID avID; | 6985 | UUID avID; |
7050 | if(!UUID.TryParse(id, out avID)) | 6986 | if(!UUID.TryParse(id, out avID)) |
7051 | return ScriptBaseClass.ZERO_VECTOR; | 6987 | return ScriptBaseClass.ZERO_VECTOR; |
@@ -7061,7 +6997,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7061 | 6997 | ||
7062 | public LSL_Integer llSameGroup(string id) | 6998 | public LSL_Integer llSameGroup(string id) |
7063 | { | 6999 | { |
7064 | m_host.AddScriptLPS(1); | 7000 | //// m_host.AddScriptLPS(1); |
7065 | UUID uuid = new UUID(); | 7001 | UUID uuid = new UUID(); |
7066 | if (!UUID.TryParse(id, out uuid)) | 7002 | if (!UUID.TryParse(id, out uuid)) |
7067 | return new LSL_Integer(0); | 7003 | return new LSL_Integer(0); |
@@ -7109,7 +7045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7109 | 7045 | ||
7110 | public void llUnSit(string id) | 7046 | public void llUnSit(string id) |
7111 | { | 7047 | { |
7112 | m_host.AddScriptLPS(1); | 7048 | //// m_host.AddScriptLPS(1); |
7113 | 7049 | ||
7114 | UUID key = new UUID(); | 7050 | UUID key = new UUID(); |
7115 | if (UUID.TryParse(id, out key)) | 7051 | if (UUID.TryParse(id, out key)) |
@@ -7150,7 +7086,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7150 | 7086 | ||
7151 | public LSL_Vector llGroundSlope(LSL_Vector offset) | 7087 | public LSL_Vector llGroundSlope(LSL_Vector offset) |
7152 | { | 7088 | { |
7153 | m_host.AddScriptLPS(1); | 7089 | //// m_host.AddScriptLPS(1); |
7154 | 7090 | ||
7155 | //Get the slope normal. This gives us the equation of the plane tangent to the slope. | 7091 | //Get the slope normal. This gives us the equation of the plane tangent to the slope. |
7156 | LSL_Vector vsn = llGroundNormal(offset); | 7092 | LSL_Vector vsn = llGroundNormal(offset); |
@@ -7171,7 +7107,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7171 | 7107 | ||
7172 | public LSL_Vector llGroundNormal(LSL_Vector offset) | 7108 | public LSL_Vector llGroundNormal(LSL_Vector offset) |
7173 | { | 7109 | { |
7174 | m_host.AddScriptLPS(1); | 7110 | //// m_host.AddScriptLPS(1); |
7175 | Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; | 7111 | Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; |
7176 | // Clamp to valid position | 7112 | // Clamp to valid position |
7177 | if (pos.X < 0) | 7113 | if (pos.X < 0) |
@@ -7221,20 +7157,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7221 | 7157 | ||
7222 | public LSL_Vector llGroundContour(LSL_Vector offset) | 7158 | public LSL_Vector llGroundContour(LSL_Vector offset) |
7223 | { | 7159 | { |
7224 | m_host.AddScriptLPS(1); | 7160 | //// m_host.AddScriptLPS(1); |
7225 | LSL_Vector x = llGroundSlope(offset); | 7161 | LSL_Vector x = llGroundSlope(offset); |
7226 | return new LSL_Vector(-x.y, x.x, 0.0); | 7162 | return new LSL_Vector(-x.y, x.x, 0.0); |
7227 | } | 7163 | } |
7228 | 7164 | ||
7229 | public LSL_Integer llGetAttached() | 7165 | public LSL_Integer llGetAttached() |
7230 | { | 7166 | { |
7231 | m_host.AddScriptLPS(1); | 7167 | //// m_host.AddScriptLPS(1); |
7232 | return m_host.ParentGroup.AttachmentPoint; | 7168 | return m_host.ParentGroup.AttachmentPoint; |
7233 | } | 7169 | } |
7234 | 7170 | ||
7235 | public LSL_List llGetAttachedList(LSL_Key id) | 7171 | public LSL_List llGetAttachedList(LSL_Key id) |
7236 | { | 7172 | { |
7237 | m_host.AddScriptLPS(1); | 7173 | //// m_host.AddScriptLPS(1); |
7238 | 7174 | ||
7239 | UUID avID; | 7175 | UUID avID; |
7240 | if(!UUID.TryParse(id, out avID)) | 7176 | if(!UUID.TryParse(id, out avID)) |
@@ -7264,14 +7200,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7264 | 7200 | ||
7265 | public virtual LSL_Integer llGetFreeMemory() | 7201 | public virtual LSL_Integer llGetFreeMemory() |
7266 | { | 7202 | { |
7267 | m_host.AddScriptLPS(1); | 7203 | //// m_host.AddScriptLPS(1); |
7268 | // Make scripts designed for Mono happy | 7204 | // Make scripts designed for Mono happy |
7269 | return 65536; | 7205 | return 65536; |
7270 | } | 7206 | } |
7271 | 7207 | ||
7272 | public LSL_Integer llGetFreeURLs() | 7208 | public LSL_Integer llGetFreeURLs() |
7273 | { | 7209 | { |
7274 | m_host.AddScriptLPS(1); | 7210 | //// m_host.AddScriptLPS(1); |
7275 | if (m_UrlModule != null) | 7211 | if (m_UrlModule != null) |
7276 | return new LSL_Integer(m_UrlModule.GetFreeUrls()); | 7212 | return new LSL_Integer(m_UrlModule.GetFreeUrls()); |
7277 | return new LSL_Integer(0); | 7213 | return new LSL_Integer(0); |
@@ -7280,13 +7216,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7280 | 7216 | ||
7281 | public LSL_String llGetRegionName() | 7217 | public LSL_String llGetRegionName() |
7282 | { | 7218 | { |
7283 | m_host.AddScriptLPS(1); | 7219 | //// m_host.AddScriptLPS(1); |
7284 | return World.RegionInfo.RegionName; | 7220 | return World.RegionInfo.RegionName; |
7285 | } | 7221 | } |
7286 | 7222 | ||
7287 | public LSL_Float llGetRegionTimeDilation() | 7223 | public LSL_Float llGetRegionTimeDilation() |
7288 | { | 7224 | { |
7289 | m_host.AddScriptLPS(1); | 7225 | //// m_host.AddScriptLPS(1); |
7290 | return (double)World.TimeDilation; | 7226 | return (double)World.TimeDilation; |
7291 | } | 7227 | } |
7292 | 7228 | ||
@@ -7295,7 +7231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7295 | /// </summary> | 7231 | /// </summary> |
7296 | public LSL_Float llGetRegionFPS() | 7232 | public LSL_Float llGetRegionFPS() |
7297 | { | 7233 | { |
7298 | m_host.AddScriptLPS(1); | 7234 | //// m_host.AddScriptLPS(1); |
7299 | return World.StatsReporter.LastReportedSimFPS; | 7235 | return World.StatsReporter.LastReportedSimFPS; |
7300 | } | 7236 | } |
7301 | 7237 | ||
@@ -7373,7 +7309,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7373 | 7309 | ||
7374 | public void llLinkParticleSystem(int linknumber, LSL_List rules) | 7310 | public void llLinkParticleSystem(int linknumber, LSL_List rules) |
7375 | { | 7311 | { |
7376 | m_host.AddScriptLPS(1); | 7312 | //// m_host.AddScriptLPS(1); |
7377 | 7313 | ||
7378 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 7314 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
7379 | 7315 | ||
@@ -7385,7 +7321,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7385 | 7321 | ||
7386 | public void llParticleSystem(LSL_List rules) | 7322 | public void llParticleSystem(LSL_List rules) |
7387 | { | 7323 | { |
7388 | m_host.AddScriptLPS(1); | 7324 | //// m_host.AddScriptLPS(1); |
7389 | SetParticleSystem(m_host, rules, "llParticleSystem"); | 7325 | SetParticleSystem(m_host, rules, "llParticleSystem"); |
7390 | } | 7326 | } |
7391 | 7327 | ||
@@ -7802,7 +7738,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7802 | 7738 | ||
7803 | public void llGroundRepel(double height, int water, double tau) | 7739 | public void llGroundRepel(double height, int water, double tau) |
7804 | { | 7740 | { |
7805 | m_host.AddScriptLPS(1); | 7741 | //// m_host.AddScriptLPS(1); |
7806 | if (m_host.PhysActor != null) | 7742 | if (m_host.PhysActor != null) |
7807 | { | 7743 | { |
7808 | float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0)); | 7744 | float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0)); |
@@ -7827,7 +7763,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7827 | 7763 | ||
7828 | public void llGiveInventoryList(LSL_Key destination, LSL_String category, LSL_List inventory) | 7764 | public void llGiveInventoryList(LSL_Key destination, LSL_String category, LSL_List inventory) |
7829 | { | 7765 | { |
7830 | m_host.AddScriptLPS(1); | 7766 | //// m_host.AddScriptLPS(1); |
7831 | 7767 | ||
7832 | UUID destID; | 7768 | UUID destID; |
7833 | if (!UUID.TryParse(destination, out destID)) | 7769 | if (!UUID.TryParse(destination, out destID)) |
@@ -7882,7 +7818,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7882 | 7818 | ||
7883 | public void llSetVehicleType(int type) | 7819 | public void llSetVehicleType(int type) |
7884 | { | 7820 | { |
7885 | m_host.AddScriptLPS(1); | 7821 | //// m_host.AddScriptLPS(1); |
7886 | 7822 | ||
7887 | if (!m_host.ParentGroup.IsDeleted) | 7823 | if (!m_host.ParentGroup.IsDeleted) |
7888 | { | 7824 | { |
@@ -7894,7 +7830,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7894 | //CFK 9/28: so these are not complete yet. | 7830 | //CFK 9/28: so these are not complete yet. |
7895 | public void llSetVehicleFloatParam(int param, LSL_Float value) | 7831 | public void llSetVehicleFloatParam(int param, LSL_Float value) |
7896 | { | 7832 | { |
7897 | m_host.AddScriptLPS(1); | 7833 | //// m_host.AddScriptLPS(1); |
7898 | 7834 | ||
7899 | if (!m_host.ParentGroup.IsDeleted) | 7835 | if (!m_host.ParentGroup.IsDeleted) |
7900 | { | 7836 | { |
@@ -7906,7 +7842,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7906 | //CFK 9/28: so these are not complete yet. | 7842 | //CFK 9/28: so these are not complete yet. |
7907 | public void llSetVehicleVectorParam(int param, LSL_Vector vec) | 7843 | public void llSetVehicleVectorParam(int param, LSL_Vector vec) |
7908 | { | 7844 | { |
7909 | m_host.AddScriptLPS(1); | 7845 | //// m_host.AddScriptLPS(1); |
7910 | 7846 | ||
7911 | if (!m_host.ParentGroup.IsDeleted) | 7847 | if (!m_host.ParentGroup.IsDeleted) |
7912 | { | 7848 | { |
@@ -7918,7 +7854,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7918 | //CFK 9/28: so these are not complete yet. | 7854 | //CFK 9/28: so these are not complete yet. |
7919 | public void llSetVehicleRotationParam(int param, LSL_Rotation rot) | 7855 | public void llSetVehicleRotationParam(int param, LSL_Rotation rot) |
7920 | { | 7856 | { |
7921 | m_host.AddScriptLPS(1); | 7857 | //// m_host.AddScriptLPS(1); |
7922 | 7858 | ||
7923 | if (!m_host.ParentGroup.IsDeleted) | 7859 | if (!m_host.ParentGroup.IsDeleted) |
7924 | { | 7860 | { |
@@ -7928,7 +7864,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7928 | 7864 | ||
7929 | public void llSetVehicleFlags(int flags) | 7865 | public void llSetVehicleFlags(int flags) |
7930 | { | 7866 | { |
7931 | m_host.AddScriptLPS(1); | 7867 | //// m_host.AddScriptLPS(1); |
7932 | 7868 | ||
7933 | if (!m_host.ParentGroup.IsDeleted) | 7869 | if (!m_host.ParentGroup.IsDeleted) |
7934 | { | 7870 | { |
@@ -7938,7 +7874,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7938 | 7874 | ||
7939 | public void llRemoveVehicleFlags(int flags) | 7875 | public void llRemoveVehicleFlags(int flags) |
7940 | { | 7876 | { |
7941 | m_host.AddScriptLPS(1); | 7877 | //// m_host.AddScriptLPS(1); |
7942 | 7878 | ||
7943 | if (!m_host.ParentGroup.IsDeleted) | 7879 | if (!m_host.ParentGroup.IsDeleted) |
7944 | { | 7880 | { |
@@ -7959,13 +7895,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7959 | 7895 | ||
7960 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) | 7896 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) |
7961 | { | 7897 | { |
7962 | m_host.AddScriptLPS(1); | 7898 | //// m_host.AddScriptLPS(1); |
7963 | SitTarget(m_host, offset, rot); | 7899 | SitTarget(m_host, offset, rot); |
7964 | } | 7900 | } |
7965 | 7901 | ||
7966 | public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) | 7902 | public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) |
7967 | { | 7903 | { |
7968 | m_host.AddScriptLPS(1); | 7904 | //// m_host.AddScriptLPS(1); |
7969 | if (link == ScriptBaseClass.LINK_ROOT) | 7905 | if (link == ScriptBaseClass.LINK_ROOT) |
7970 | SitTarget(m_host.ParentGroup.RootPart, offset, rot); | 7906 | SitTarget(m_host.ParentGroup.RootPart, offset, rot); |
7971 | else if (link == ScriptBaseClass.LINK_THIS) | 7907 | else if (link == ScriptBaseClass.LINK_THIS) |
@@ -7982,14 +7918,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7982 | 7918 | ||
7983 | public LSL_Key llAvatarOnSitTarget() | 7919 | public LSL_Key llAvatarOnSitTarget() |
7984 | { | 7920 | { |
7985 | m_host.AddScriptLPS(1); | 7921 | //// m_host.AddScriptLPS(1); |
7986 | return m_host.SitTargetAvatar.ToString(); | 7922 | return m_host.SitTargetAvatar.ToString(); |
7987 | } | 7923 | } |
7988 | 7924 | ||
7989 | // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget | 7925 | // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget |
7990 | public LSL_Key llAvatarOnLinkSitTarget(LSL_Integer linknum) | 7926 | public LSL_Key llAvatarOnLinkSitTarget(LSL_Integer linknum) |
7991 | { | 7927 | { |
7992 | m_host.AddScriptLPS(1); | 7928 | //// m_host.AddScriptLPS(1); |
7993 | if(linknum == ScriptBaseClass.LINK_SET || | 7929 | if(linknum == ScriptBaseClass.LINK_SET || |
7994 | linknum == ScriptBaseClass.LINK_ALL_CHILDREN || | 7930 | linknum == ScriptBaseClass.LINK_ALL_CHILDREN || |
7995 | linknum == ScriptBaseClass.LINK_ALL_OTHERS || | 7931 | linknum == ScriptBaseClass.LINK_ALL_OTHERS || |
@@ -8005,7 +7941,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8005 | 7941 | ||
8006 | public void llAddToLandPassList(LSL_Key avatar, LSL_Float hours) | 7942 | public void llAddToLandPassList(LSL_Key avatar, LSL_Float hours) |
8007 | { | 7943 | { |
8008 | m_host.AddScriptLPS(1); | 7944 | //// m_host.AddScriptLPS(1); |
8009 | UUID key; | 7945 | UUID key; |
8010 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 7946 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
8011 | 7947 | ||
@@ -8042,12 +7978,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8042 | World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); | 7978 | World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); |
8043 | } | 7979 | } |
8044 | } | 7980 | } |
8045 | ScriptSleep(m_sleepMsOnAddToLandPassList); | 7981 | //// ScriptSleep(m_sleepMsOnAddToLandPassList); |
8046 | } | 7982 | } |
8047 | 7983 | ||
8048 | public void llSetTouchText(string text) | 7984 | public void llSetTouchText(string text) |
8049 | { | 7985 | { |
8050 | m_host.AddScriptLPS(1); | 7986 | //// m_host.AddScriptLPS(1); |
8051 | if(text.Length <= 9) | 7987 | if(text.Length <= 9) |
8052 | m_host.TouchName = text; | 7988 | m_host.TouchName = text; |
8053 | else | 7989 | else |
@@ -8056,7 +7992,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8056 | 7992 | ||
8057 | public void llSetSitText(string text) | 7993 | public void llSetSitText(string text) |
8058 | { | 7994 | { |
8059 | m_host.AddScriptLPS(1); | 7995 | //// m_host.AddScriptLPS(1); |
8060 | if (text.Length <= 9) | 7996 | if (text.Length <= 9) |
8061 | m_host.SitName = text; | 7997 | m_host.SitName = text; |
8062 | else | 7998 | else |
@@ -8065,7 +8001,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8065 | 8001 | ||
8066 | public void llSetCameraEyeOffset(LSL_Vector offset) | 8002 | public void llSetCameraEyeOffset(LSL_Vector offset) |
8067 | { | 8003 | { |
8068 | m_host.AddScriptLPS(1); | 8004 | //// m_host.AddScriptLPS(1); |
8069 | m_host.SetCameraEyeOffset(offset); | 8005 | m_host.SetCameraEyeOffset(offset); |
8070 | 8006 | ||
8071 | if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) | 8007 | if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) |
@@ -8074,7 +8010,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8074 | 8010 | ||
8075 | public void llSetCameraAtOffset(LSL_Vector offset) | 8011 | public void llSetCameraAtOffset(LSL_Vector offset) |
8076 | { | 8012 | { |
8077 | m_host.AddScriptLPS(1); | 8013 | //// m_host.AddScriptLPS(1); |
8078 | m_host.SetCameraAtOffset(offset); | 8014 | m_host.SetCameraAtOffset(offset); |
8079 | 8015 | ||
8080 | if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) | 8016 | if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) |
@@ -8083,7 +8019,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8083 | 8019 | ||
8084 | public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) | 8020 | public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) |
8085 | { | 8021 | { |
8086 | m_host.AddScriptLPS(1); | 8022 | //// m_host.AddScriptLPS(1); |
8087 | 8023 | ||
8088 | if (link == ScriptBaseClass.LINK_SET || | 8024 | if (link == ScriptBaseClass.LINK_SET || |
8089 | link == ScriptBaseClass.LINK_ALL_CHILDREN || | 8025 | link == ScriptBaseClass.LINK_ALL_CHILDREN || |
@@ -8113,7 +8049,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8113 | 8049 | ||
8114 | public LSL_String llDumpList2String(LSL_List src, string seperator) | 8050 | public LSL_String llDumpList2String(LSL_List src, string seperator) |
8115 | { | 8051 | { |
8116 | m_host.AddScriptLPS(1); | 8052 | //// m_host.AddScriptLPS(1); |
8117 | if (src.Length == 0) | 8053 | if (src.Length == 0) |
8118 | { | 8054 | { |
8119 | return String.Empty; | 8055 | return String.Empty; |
@@ -8129,7 +8065,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8129 | 8065 | ||
8130 | public LSL_Integer llScriptDanger(LSL_Vector pos) | 8066 | public LSL_Integer llScriptDanger(LSL_Vector pos) |
8131 | { | 8067 | { |
8132 | m_host.AddScriptLPS(1); | 8068 | //// m_host.AddScriptLPS(1); |
8133 | bool result = World.LSLScriptDanger(m_host, pos); | 8069 | bool result = World.LSLScriptDanger(m_host, pos); |
8134 | if (result) | 8070 | if (result) |
8135 | { | 8071 | { |
@@ -8148,7 +8084,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8148 | if (dm == null) | 8084 | if (dm == null) |
8149 | return; | 8085 | return; |
8150 | 8086 | ||
8151 | m_host.AddScriptLPS(1); | 8087 | //// m_host.AddScriptLPS(1); |
8152 | UUID av = new UUID(); | 8088 | UUID av = new UUID(); |
8153 | if (!UUID.TryParse(avatar,out av)) | 8089 | if (!UUID.TryParse(avatar,out av)) |
8154 | { | 8090 | { |
@@ -8196,12 +8132,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8196 | av, m_host.Name, m_host.UUID, m_host.OwnerID, | 8132 | av, m_host.Name, m_host.UUID, m_host.OwnerID, |
8197 | message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); | 8133 | message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); |
8198 | 8134 | ||
8199 | ScriptSleep(m_sleepMsOnDialog); | 8135 | //// ScriptSleep(m_sleepMsOnDialog); |
8200 | } | 8136 | } |
8201 | 8137 | ||
8202 | public void llVolumeDetect(int detect) | 8138 | public void llVolumeDetect(int detect) |
8203 | { | 8139 | { |
8204 | m_host.AddScriptLPS(1); | 8140 | //// m_host.AddScriptLPS(1); |
8205 | 8141 | ||
8206 | if (!m_host.ParentGroup.IsDeleted) | 8142 | if (!m_host.ParentGroup.IsDeleted) |
8207 | m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0); | 8143 | m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0); |
@@ -8209,20 +8145,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8209 | 8145 | ||
8210 | public void llRemoteLoadScript(string target, string name, int running, int start_param) | 8146 | public void llRemoteLoadScript(string target, string name, int running, int start_param) |
8211 | { | 8147 | { |
8212 | m_host.AddScriptLPS(1); | 8148 | //// m_host.AddScriptLPS(1); |
8213 | Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); | 8149 | Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); |
8214 | ScriptSleep(m_sleepMsOnRemoteLoadScript); | 8150 | //// ScriptSleep(m_sleepMsOnRemoteLoadScript); |
8215 | } | 8151 | } |
8216 | 8152 | ||
8217 | public void llSetRemoteScriptAccessPin(int pin) | 8153 | public void llSetRemoteScriptAccessPin(int pin) |
8218 | { | 8154 | { |
8219 | m_host.AddScriptLPS(1); | 8155 | //// m_host.AddScriptLPS(1); |
8220 | m_host.ScriptAccessPin = pin; | 8156 | m_host.ScriptAccessPin = pin; |
8221 | } | 8157 | } |
8222 | 8158 | ||
8223 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) | 8159 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) |
8224 | { | 8160 | { |
8225 | m_host.AddScriptLPS(1); | 8161 | //// m_host.AddScriptLPS(1); |
8226 | 8162 | ||
8227 | UUID destId = UUID.Zero; | 8163 | UUID destId = UUID.Zero; |
8228 | 8164 | ||
@@ -8260,13 +8196,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8260 | m_host.Inventory.RemoveInventoryItem(item.ItemID); | 8196 | m_host.Inventory.RemoveInventoryItem(item.ItemID); |
8261 | } | 8197 | } |
8262 | } | 8198 | } |
8263 | // this will cause the delay even if the script pin or permissions were wrong - seems ok | 8199 | //// // this will cause the delay even if the script pin or permissions were wrong - seems ok |
8264 | ScriptSleep(m_sleepMsOnRemoteLoadScriptPin); | 8200 | //// ScriptSleep(m_sleepMsOnRemoteLoadScriptPin); |
8265 | } | 8201 | } |
8266 | 8202 | ||
8267 | public void llOpenRemoteDataChannel() | 8203 | public void llOpenRemoteDataChannel() |
8268 | { | 8204 | { |
8269 | m_host.AddScriptLPS(1); | 8205 | //// m_host.AddScriptLPS(1); |
8270 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 8206 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
8271 | if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) | 8207 | if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) |
8272 | { | 8208 | { |
@@ -8292,14 +8228,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8292 | m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams("remote_data", resobj, | 8228 | m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams("remote_data", resobj, |
8293 | new DetectParams[0])); | 8229 | new DetectParams[0])); |
8294 | } | 8230 | } |
8295 | ScriptSleep(m_sleepMsOnOpenRemoteDataChannel); | 8231 | //// ScriptSleep(m_sleepMsOnOpenRemoteDataChannel); |
8296 | } | 8232 | } |
8297 | 8233 | ||
8298 | public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata) | 8234 | public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata) |
8299 | { | 8235 | { |
8300 | m_host.AddScriptLPS(1); | 8236 | //// m_host.AddScriptLPS(1); |
8301 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 8237 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
8302 | ScriptSleep(m_sleepMsOnSendRemoteData); | 8238 | //// ScriptSleep(m_sleepMsOnSendRemoteData); |
8303 | if (xmlrpcMod == null) | 8239 | if (xmlrpcMod == null) |
8304 | return ""; | 8240 | return ""; |
8305 | return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); | 8241 | return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); |
@@ -8307,16 +8243,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8307 | 8243 | ||
8308 | public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) | 8244 | public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) |
8309 | { | 8245 | { |
8310 | m_host.AddScriptLPS(1); | 8246 | //// m_host.AddScriptLPS(1); |
8311 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 8247 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
8312 | if (xmlrpcMod != null) | 8248 | if (xmlrpcMod != null) |
8313 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); | 8249 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); |
8314 | ScriptSleep(m_sleepMsOnRemoteDataReply); | 8250 | //// ScriptSleep(m_sleepMsOnRemoteDataReply); |
8315 | } | 8251 | } |
8316 | 8252 | ||
8317 | public void llCloseRemoteDataChannel(string channel) | 8253 | public void llCloseRemoteDataChannel(string channel) |
8318 | { | 8254 | { |
8319 | m_host.AddScriptLPS(1); | 8255 | //// m_host.AddScriptLPS(1); |
8320 | 8256 | ||
8321 | IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); | 8257 | IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); |
8322 | if (xmlRpcRouter != null) | 8258 | if (xmlRpcRouter != null) |
@@ -8327,18 +8263,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8327 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 8263 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
8328 | if (xmlrpcMod != null) | 8264 | if (xmlrpcMod != null) |
8329 | xmlrpcMod.CloseXMLRPCChannel((UUID)channel); | 8265 | xmlrpcMod.CloseXMLRPCChannel((UUID)channel); |
8330 | ScriptSleep(m_sleepMsOnCloseRemoteDataChannel); | 8266 | //// ScriptSleep(m_sleepMsOnCloseRemoteDataChannel); |
8331 | } | 8267 | } |
8332 | 8268 | ||
8333 | public LSL_String llMD5String(string src, int nonce) | 8269 | public LSL_String llMD5String(string src, int nonce) |
8334 | { | 8270 | { |
8335 | m_host.AddScriptLPS(1); | 8271 | //// m_host.AddScriptLPS(1); |
8336 | return Util.Md5Hash(String.Format("{0}:{1}", src, nonce.ToString()), Encoding.UTF8); | 8272 | return Util.Md5Hash(String.Format("{0}:{1}", src, nonce.ToString()), Encoding.UTF8); |
8337 | } | 8273 | } |
8338 | 8274 | ||
8339 | public LSL_String llSHA1String(string src) | 8275 | public LSL_String llSHA1String(string src) |
8340 | { | 8276 | { |
8341 | m_host.AddScriptLPS(1); | 8277 | //// m_host.AddScriptLPS(1); |
8342 | return Util.SHA1Hash(src, Encoding.UTF8).ToLower(); | 8278 | return Util.SHA1Hash(src, Encoding.UTF8).ToLower(); |
8343 | } | 8279 | } |
8344 | 8280 | ||
@@ -8774,25 +8710,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8774 | 8710 | ||
8775 | public void llSetPrimitiveParams(LSL_List rules) | 8711 | public void llSetPrimitiveParams(LSL_List rules) |
8776 | { | 8712 | { |
8777 | m_host.AddScriptLPS(1); | 8713 | //// m_host.AddScriptLPS(1); |
8778 | 8714 | ||
8779 | SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); | 8715 | SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); |
8780 | 8716 | ||
8781 | ScriptSleep(m_sleepMsOnSetPrimitiveParams); | 8717 | //// ScriptSleep(m_sleepMsOnSetPrimitiveParams); |
8782 | } | 8718 | } |
8783 | 8719 | ||
8784 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) | 8720 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) |
8785 | { | 8721 | { |
8786 | m_host.AddScriptLPS(1); | 8722 | //// m_host.AddScriptLPS(1); |
8787 | 8723 | ||
8788 | SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); | 8724 | SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); |
8789 | 8725 | //// ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); | |
8790 | ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); | ||
8791 | } | 8726 | } |
8792 | 8727 | ||
8793 | public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) | 8728 | public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) |
8794 | { | 8729 | { |
8795 | m_host.AddScriptLPS(1); | 8730 | //// m_host.AddScriptLPS(1); |
8796 | 8731 | ||
8797 | SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); | 8732 | SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); |
8798 | } | 8733 | } |
@@ -10923,7 +10858,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10923 | 10858 | ||
10924 | public LSL_String llStringToBase64(string str) | 10859 | public LSL_String llStringToBase64(string str) |
10925 | { | 10860 | { |
10926 | m_host.AddScriptLPS(1); | 10861 | //// m_host.AddScriptLPS(1); |
10927 | try | 10862 | try |
10928 | { | 10863 | { |
10929 | byte[] encData_byte; | 10864 | byte[] encData_byte; |
@@ -10940,7 +10875,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10940 | 10875 | ||
10941 | public LSL_String llBase64ToString(string str) | 10876 | public LSL_String llBase64ToString(string str) |
10942 | { | 10877 | { |
10943 | m_host.AddScriptLPS(1); | 10878 | //// m_host.AddScriptLPS(1); |
10944 | try | 10879 | try |
10945 | { | 10880 | { |
10946 | byte[] b = Convert.FromBase64String(str); | 10881 | byte[] b = Convert.FromBase64String(str); |
@@ -10959,8 +10894,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10959 | 10894 | ||
10960 | string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | 10895 | string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
10961 | 10896 | ||
10962 | ScriptSleep(300); | 10897 | //// ScriptSleep(300); |
10963 | m_host.AddScriptLPS(1); | 10898 | //// m_host.AddScriptLPS(1); |
10964 | 10899 | ||
10965 | if (str1 == String.Empty) | 10900 | if (str1 == String.Empty) |
10966 | return String.Empty; | 10901 | return String.Empty; |
@@ -11057,25 +10992,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11057 | 10992 | ||
11058 | public void llRemoteDataSetRegion() | 10993 | public void llRemoteDataSetRegion() |
11059 | { | 10994 | { |
11060 | m_host.AddScriptLPS(1); | 10995 | //// m_host.AddScriptLPS(1); |
11061 | Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead"); | 10996 | Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead"); |
11062 | } | 10997 | } |
11063 | 10998 | ||
11064 | public LSL_Float llLog10(double val) | 10999 | public LSL_Float llLog10(double val) |
11065 | { | 11000 | { |
11066 | m_host.AddScriptLPS(1); | 11001 | //// m_host.AddScriptLPS(1); |
11067 | return (double)Math.Log10(val); | 11002 | return (double)Math.Log10(val); |
11068 | } | 11003 | } |
11069 | 11004 | ||
11070 | public LSL_Float llLog(double val) | 11005 | public LSL_Float llLog(double val) |
11071 | { | 11006 | { |
11072 | m_host.AddScriptLPS(1); | 11007 | //// m_host.AddScriptLPS(1); |
11073 | return (double)Math.Log(val); | 11008 | return (double)Math.Log(val); |
11074 | } | 11009 | } |
11075 | 11010 | ||
11076 | public LSL_List llGetAnimationList(LSL_Key id) | 11011 | public LSL_List llGetAnimationList(LSL_Key id) |
11077 | { | 11012 | { |
11078 | m_host.AddScriptLPS(1); | 11013 | //// m_host.AddScriptLPS(1); |
11079 | 11014 | ||
11080 | UUID avID; | 11015 | UUID avID; |
11081 | if(!UUID.TryParse(id, out avID)) | 11016 | if(!UUID.TryParse(id, out avID)) |
@@ -11095,7 +11030,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11095 | 11030 | ||
11096 | public void llSetParcelMusicURL(string url) | 11031 | public void llSetParcelMusicURL(string url) |
11097 | { | 11032 | { |
11098 | m_host.AddScriptLPS(1); | 11033 | //// m_host.AddScriptLPS(1); |
11099 | 11034 | ||
11100 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 11035 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
11101 | 11036 | ||
@@ -11103,13 +11038,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11103 | return; | 11038 | return; |
11104 | 11039 | ||
11105 | land.SetMusicUrl(url); | 11040 | land.SetMusicUrl(url); |
11106 | 11041 | //// ScriptSleep(m_sleepMsOnSetParcelMusicURL); | |
11107 | ScriptSleep(m_sleepMsOnSetParcelMusicURL); | ||
11108 | } | 11042 | } |
11109 | 11043 | ||
11110 | public LSL_String llGetParcelMusicURL() | 11044 | public LSL_String llGetParcelMusicURL() |
11111 | { | 11045 | { |
11112 | m_host.AddScriptLPS(1); | 11046 | //// m_host.AddScriptLPS(1); |
11113 | 11047 | ||
11114 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 11048 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
11115 | 11049 | ||
@@ -11121,7 +11055,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11121 | 11055 | ||
11122 | public LSL_Vector llGetRootPosition() | 11056 | public LSL_Vector llGetRootPosition() |
11123 | { | 11057 | { |
11124 | m_host.AddScriptLPS(1); | 11058 | //// m_host.AddScriptLPS(1); |
11125 | 11059 | ||
11126 | return new LSL_Vector(m_host.ParentGroup.AbsolutePosition); | 11060 | return new LSL_Vector(m_host.ParentGroup.AbsolutePosition); |
11127 | } | 11061 | } |
@@ -11137,7 +11071,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11137 | /// </summary> | 11071 | /// </summary> |
11138 | public LSL_Rotation llGetRootRotation() | 11072 | public LSL_Rotation llGetRootRotation() |
11139 | { | 11073 | { |
11140 | m_host.AddScriptLPS(1); | 11074 | //// m_host.AddScriptLPS(1); |
11141 | Quaternion q; | 11075 | Quaternion q; |
11142 | if (m_host.ParentGroup.AttachmentPoint != 0) | 11076 | if (m_host.ParentGroup.AttachmentPoint != 0) |
11143 | { | 11077 | { |
@@ -11163,25 +11097,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11163 | 11097 | ||
11164 | public void llSetObjectDesc(string desc) | 11098 | public void llSetObjectDesc(string desc) |
11165 | { | 11099 | { |
11166 | m_host.AddScriptLPS(1); | 11100 | //// m_host.AddScriptLPS(1); |
11167 | m_host.Description = desc!=null?desc:String.Empty; | 11101 | m_host.Description = desc!=null?desc:String.Empty; |
11168 | } | 11102 | } |
11169 | 11103 | ||
11170 | public LSL_Key llGetCreator() | 11104 | public LSL_Key llGetCreator() |
11171 | { | 11105 | { |
11172 | m_host.AddScriptLPS(1); | 11106 | //// m_host.AddScriptLPS(1); |
11173 | return m_host.CreatorID.ToString(); | 11107 | return m_host.CreatorID.ToString(); |
11174 | } | 11108 | } |
11175 | 11109 | ||
11176 | public LSL_String llGetTimestamp() | 11110 | public LSL_String llGetTimestamp() |
11177 | { | 11111 | { |
11178 | m_host.AddScriptLPS(1); | 11112 | //// m_host.AddScriptLPS(1); |
11179 | return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); | 11113 | return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); |
11180 | } | 11114 | } |
11181 | 11115 | ||
11182 | public LSL_Integer llGetNumberOfPrims() | 11116 | public LSL_Integer llGetNumberOfPrims() |
11183 | { | 11117 | { |
11184 | m_host.AddScriptLPS(1); | 11118 | //// m_host.AddScriptLPS(1); |
11185 | 11119 | ||
11186 | return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); | 11120 | return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); |
11187 | } | 11121 | } |
@@ -11199,7 +11133,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11199 | /// </summary> | 11133 | /// </summary> |
11200 | public LSL_List llGetBoundingBox(string obj) | 11134 | public LSL_List llGetBoundingBox(string obj) |
11201 | { | 11135 | { |
11202 | m_host.AddScriptLPS(1); | 11136 | //// m_host.AddScriptLPS(1); |
11203 | UUID objID = UUID.Zero; | 11137 | UUID objID = UUID.Zero; |
11204 | LSL_List result = new LSL_List(); | 11138 | LSL_List result = new LSL_List(); |
11205 | 11139 | ||
@@ -11348,7 +11282,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11348 | 11282 | ||
11349 | public LSL_List llGetPrimitiveParams(LSL_List rules) | 11283 | public LSL_List llGetPrimitiveParams(LSL_List rules) |
11350 | { | 11284 | { |
11351 | m_host.AddScriptLPS(1); | 11285 | //// m_host.AddScriptLPS(1); |
11352 | 11286 | ||
11353 | LSL_List result = new LSL_List(); | 11287 | LSL_List result = new LSL_List(); |
11354 | 11288 | ||
@@ -11370,7 +11304,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11370 | 11304 | ||
11371 | public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) | 11305 | public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) |
11372 | { | 11306 | { |
11373 | m_host.AddScriptLPS(1); | 11307 | //// m_host.AddScriptLPS(1); |
11374 | 11308 | ||
11375 | // acording to SL wiki this must indicate a single link number or link_root or link_this. | 11309 | // acording to SL wiki this must indicate a single link number or link_root or link_this. |
11376 | // keep other options as before | 11310 | // keep other options as before |
@@ -11997,15 +11931,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11997 | 11931 | ||
11998 | public LSL_List llGetPrimMediaParams(int face, LSL_List rules) | 11932 | public LSL_List llGetPrimMediaParams(int face, LSL_List rules) |
11999 | { | 11933 | { |
12000 | m_host.AddScriptLPS(1); | 11934 | //// m_host.AddScriptLPS(1); |
12001 | ScriptSleep(m_sleepMsOnGetPrimMediaParams); | 11935 | //// ScriptSleep(m_sleepMsOnGetPrimMediaParams); |
12002 | return GetPrimMediaParams(m_host, face, rules); | 11936 | return GetPrimMediaParams(m_host, face, rules); |
12003 | } | 11937 | } |
12004 | 11938 | ||
12005 | public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) | 11939 | public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) |
12006 | { | 11940 | { |
12007 | m_host.AddScriptLPS(1); | 11941 | //// m_host.AddScriptLPS(1); |
12008 | ScriptSleep(m_sleepMsOnGetLinkMedia); | 11942 | //// ScriptSleep(m_sleepMsOnGetLinkMedia); |
12009 | if (link == ScriptBaseClass.LINK_ROOT) | 11943 | if (link == ScriptBaseClass.LINK_ROOT) |
12010 | return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); | 11944 | return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); |
12011 | else if (link == ScriptBaseClass.LINK_THIS) | 11945 | else if (link == ScriptBaseClass.LINK_THIS) |
@@ -12124,15 +12058,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12124 | 12058 | ||
12125 | public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) | 12059 | public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) |
12126 | { | 12060 | { |
12127 | m_host.AddScriptLPS(1); | 12061 | //// m_host.AddScriptLPS(1); |
12128 | ScriptSleep(m_sleepMsOnSetPrimMediaParams); | 12062 | //// ScriptSleep(m_sleepMsOnSetPrimMediaParams); |
12129 | return SetPrimMediaParams(m_host, face, rules); | 12063 | return SetPrimMediaParams(m_host, face, rules); |
12130 | } | 12064 | } |
12131 | 12065 | ||
12132 | public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) | 12066 | public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) |
12133 | { | 12067 | { |
12134 | m_host.AddScriptLPS(1); | 12068 | //// m_host.AddScriptLPS(1); |
12135 | ScriptSleep(m_sleepMsOnSetLinkMedia); | 12069 | //// ScriptSleep(m_sleepMsOnSetLinkMedia); |
12136 | if (link == ScriptBaseClass.LINK_ROOT) | 12070 | if (link == ScriptBaseClass.LINK_ROOT) |
12137 | return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); | 12071 | return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); |
12138 | else if (link == ScriptBaseClass.LINK_THIS) | 12072 | else if (link == ScriptBaseClass.LINK_THIS) |
@@ -12250,15 +12184,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12250 | 12184 | ||
12251 | public LSL_Integer llClearPrimMedia(LSL_Integer face) | 12185 | public LSL_Integer llClearPrimMedia(LSL_Integer face) |
12252 | { | 12186 | { |
12253 | m_host.AddScriptLPS(1); | 12187 | //// m_host.AddScriptLPS(1); |
12254 | ScriptSleep(m_sleepMsOnClearPrimMedia); | 12188 | //// ScriptSleep(m_sleepMsOnClearPrimMedia); |
12255 | return ClearPrimMedia(m_host, face); | 12189 | return ClearPrimMedia(m_host, face); |
12256 | } | 12190 | } |
12257 | 12191 | ||
12258 | public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) | 12192 | public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) |
12259 | { | 12193 | { |
12260 | m_host.AddScriptLPS(1); | 12194 | //// m_host.AddScriptLPS(1); |
12261 | ScriptSleep(m_sleepMsOnClearLinkMedia); | 12195 | //// ScriptSleep(m_sleepMsOnClearLinkMedia); |
12262 | if (link == ScriptBaseClass.LINK_ROOT) | 12196 | if (link == ScriptBaseClass.LINK_ROOT) |
12263 | return ClearPrimMedia(m_host.ParentGroup.RootPart, face); | 12197 | return ClearPrimMedia(m_host.ParentGroup.RootPart, face); |
12264 | else if (link == ScriptBaseClass.LINK_THIS) | 12198 | else if (link == ScriptBaseClass.LINK_THIS) |
@@ -12423,7 +12357,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12423 | 12357 | ||
12424 | char[] imdt = new char[8]; | 12358 | char[] imdt = new char[8]; |
12425 | 12359 | ||
12426 | m_host.AddScriptLPS(1); | 12360 | //// m_host.AddScriptLPS(1); |
12427 | 12361 | ||
12428 | // Manually unroll the loop | 12362 | // Manually unroll the loop |
12429 | 12363 | ||
@@ -12485,7 +12419,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12485 | int number = 0; | 12419 | int number = 0; |
12486 | int digit; | 12420 | int digit; |
12487 | 12421 | ||
12488 | m_host.AddScriptLPS(1); | 12422 | //// m_host.AddScriptLPS(1); |
12489 | 12423 | ||
12490 | // Require a well-fromed base64 string | 12424 | // Require a well-fromed base64 string |
12491 | 12425 | ||
@@ -12542,13 +12476,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12542 | 12476 | ||
12543 | public LSL_Float llGetGMTclock() | 12477 | public LSL_Float llGetGMTclock() |
12544 | { | 12478 | { |
12545 | m_host.AddScriptLPS(1); | 12479 | //// m_host.AddScriptLPS(1); |
12546 | return DateTime.UtcNow.TimeOfDay.TotalSeconds; | 12480 | return DateTime.UtcNow.TimeOfDay.TotalSeconds; |
12547 | } | 12481 | } |
12548 | 12482 | ||
12549 | public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) | 12483 | public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) |
12550 | { | 12484 | { |
12551 | m_host.AddScriptLPS(1); | 12485 | //// m_host.AddScriptLPS(1); |
12552 | 12486 | ||
12553 | if (m_UrlModule != null) | 12487 | if (m_UrlModule != null) |
12554 | return m_UrlModule.GetHttpHeader(new UUID(request_id), header); | 12488 | return m_UrlModule.GetHttpHeader(new UUID(request_id), header); |
@@ -12558,7 +12492,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12558 | 12492 | ||
12559 | public LSL_String llGetSimulatorHostname() | 12493 | public LSL_String llGetSimulatorHostname() |
12560 | { | 12494 | { |
12561 | m_host.AddScriptLPS(1); | 12495 | //// m_host.AddScriptLPS(1); |
12562 | IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>(); | 12496 | IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>(); |
12563 | return UrlModule.ExternalHostNameForLSL; | 12497 | return UrlModule.ExternalHostNameForLSL; |
12564 | } | 12498 | } |
@@ -12632,7 +12566,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12632 | int i, j; | 12566 | int i, j; |
12633 | string d; | 12567 | string d; |
12634 | 12568 | ||
12635 | m_host.AddScriptLPS(1); | 12569 | //// m_host.AddScriptLPS(1); |
12636 | 12570 | ||
12637 | /* | 12571 | /* |
12638 | * Convert separator and spacer lists to C# strings. | 12572 | * Convert separator and spacer lists to C# strings. |
@@ -12729,7 +12663,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12729 | 12663 | ||
12730 | public LSL_Integer llGetObjectPermMask(int mask) | 12664 | public LSL_Integer llGetObjectPermMask(int mask) |
12731 | { | 12665 | { |
12732 | m_host.AddScriptLPS(1); | 12666 | //// m_host.AddScriptLPS(1); |
12733 | 12667 | ||
12734 | int permmask = 0; | 12668 | int permmask = 0; |
12735 | 12669 | ||
@@ -12763,7 +12697,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12763 | 12697 | ||
12764 | public void llSetObjectPermMask(int mask, int value) | 12698 | public void llSetObjectPermMask(int mask, int value) |
12765 | { | 12699 | { |
12766 | m_host.AddScriptLPS(1); | 12700 | //// m_host.AddScriptLPS(1); |
12767 | 12701 | ||
12768 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) | 12702 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) |
12769 | { | 12703 | { |
@@ -12799,7 +12733,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12799 | 12733 | ||
12800 | public LSL_Integer llGetInventoryPermMask(string itemName, int mask) | 12734 | public LSL_Integer llGetInventoryPermMask(string itemName, int mask) |
12801 | { | 12735 | { |
12802 | m_host.AddScriptLPS(1); | 12736 | //// m_host.AddScriptLPS(1); |
12803 | 12737 | ||
12804 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); | 12738 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); |
12805 | 12739 | ||
@@ -12825,7 +12759,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12825 | 12759 | ||
12826 | public void llSetInventoryPermMask(string itemName, int mask, int value) | 12760 | public void llSetInventoryPermMask(string itemName, int mask, int value) |
12827 | { | 12761 | { |
12828 | m_host.AddScriptLPS(1); | 12762 | //// m_host.AddScriptLPS(1); |
12829 | 12763 | ||
12830 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) | 12764 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) |
12831 | { | 12765 | { |
@@ -12860,7 +12794,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12860 | 12794 | ||
12861 | public LSL_Key llGetInventoryCreator(string itemName) | 12795 | public LSL_Key llGetInventoryCreator(string itemName) |
12862 | { | 12796 | { |
12863 | m_host.AddScriptLPS(1); | 12797 | //// m_host.AddScriptLPS(1); |
12864 | 12798 | ||
12865 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); | 12799 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); |
12866 | 12800 | ||
@@ -12876,7 +12810,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12876 | 12810 | ||
12877 | public void llOwnerSay(string msg) | 12811 | public void llOwnerSay(string msg) |
12878 | { | 12812 | { |
12879 | m_host.AddScriptLPS(1); | 12813 | //// m_host.AddScriptLPS(1); |
12880 | 12814 | ||
12881 | World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, | 12815 | World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, |
12882 | m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); | 12816 | m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); |
@@ -12886,7 +12820,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12886 | 12820 | ||
12887 | public LSL_Key llRequestSecureURL() | 12821 | public LSL_Key llRequestSecureURL() |
12888 | { | 12822 | { |
12889 | m_host.AddScriptLPS(1); | 12823 | //// m_host.AddScriptLPS(1); |
12890 | if (m_UrlModule != null) | 12824 | if (m_UrlModule != null) |
12891 | return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); | 12825 | return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); |
12892 | return UUID.Zero.ToString(); | 12826 | return UUID.Zero.ToString(); |
@@ -12896,7 +12830,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12896 | { | 12830 | { |
12897 | try | 12831 | try |
12898 | { | 12832 | { |
12899 | m_host.AddScriptLPS(1); | 12833 | //// m_host.AddScriptLPS(1); |
12900 | 12834 | ||
12901 | string reply = String.Empty; | 12835 | string reply = String.Empty; |
12902 | 12836 | ||
@@ -12912,7 +12846,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12912 | case ScriptBaseClass.DATA_SIM_POS: | 12846 | case ScriptBaseClass.DATA_SIM_POS: |
12913 | if (info == null) | 12847 | if (info == null) |
12914 | { | 12848 | { |
12915 | ScriptSleep(m_sleepMsOnRequestSimulatorData); | 12849 | //// ScriptSleep(m_sleepMsOnRequestSimulatorData); |
12916 | return UUID.Zero.ToString(); | 12850 | return UUID.Zero.ToString(); |
12917 | } | 12851 | } |
12918 | 12852 | ||
@@ -12959,7 +12893,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12959 | case ScriptBaseClass.DATA_SIM_RATING: | 12893 | case ScriptBaseClass.DATA_SIM_RATING: |
12960 | if (info == null) | 12894 | if (info == null) |
12961 | { | 12895 | { |
12962 | ScriptSleep(m_sleepMsOnRequestSimulatorData); | 12896 | //// ScriptSleep(m_sleepMsOnRequestSimulatorData); |
12963 | return UUID.Zero.ToString(); | 12897 | return UUID.Zero.ToString(); |
12964 | } | 12898 | } |
12965 | int access = info.Maturity; | 12899 | int access = info.Maturity; |
@@ -12976,7 +12910,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12976 | reply = "OpenSim"; | 12910 | reply = "OpenSim"; |
12977 | break; | 12911 | break; |
12978 | default: | 12912 | default: |
12979 | ScriptSleep(m_sleepMsOnRequestSimulatorData); | 12913 | //// ScriptSleep(m_sleepMsOnRequestSimulatorData); |
12980 | return UUID.Zero.ToString(); // Raise no event | 12914 | return UUID.Zero.ToString(); // Raise no event |
12981 | } | 12915 | } |
12982 | UUID rq = UUID.Random(); | 12916 | UUID rq = UUID.Random(); |
@@ -12987,7 +12921,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12987 | AsyncCommands. | 12921 | AsyncCommands. |
12988 | DataserverPlugin.DataserverReply(rq.ToString(), reply); | 12922 | DataserverPlugin.DataserverReply(rq.ToString(), reply); |
12989 | 12923 | ||
12990 | ScriptSleep(m_sleepMsOnRequestSimulatorData); | 12924 | //// ScriptSleep(m_sleepMsOnRequestSimulatorData); |
12991 | return tid.ToString(); | 12925 | return tid.ToString(); |
12992 | } | 12926 | } |
12993 | catch(Exception) | 12927 | catch(Exception) |
@@ -12999,7 +12933,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12999 | 12933 | ||
13000 | public LSL_Key llRequestURL() | 12934 | public LSL_Key llRequestURL() |
13001 | { | 12935 | { |
13002 | m_host.AddScriptLPS(1); | 12936 | //// m_host.AddScriptLPS(1); |
13003 | 12937 | ||
13004 | if (m_UrlModule != null) | 12938 | if (m_UrlModule != null) |
13005 | return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); | 12939 | return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); |
@@ -13008,13 +12942,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13008 | 12942 | ||
13009 | public void llForceMouselook(int mouselook) | 12943 | public void llForceMouselook(int mouselook) |
13010 | { | 12944 | { |
13011 | m_host.AddScriptLPS(1); | 12945 | //// m_host.AddScriptLPS(1); |
13012 | m_host.SetForceMouselook(mouselook != 0); | 12946 | m_host.SetForceMouselook(mouselook != 0); |
13013 | } | 12947 | } |
13014 | 12948 | ||
13015 | public LSL_Float llGetObjectMass(LSL_Key id) | 12949 | public LSL_Float llGetObjectMass(LSL_Key id) |
13016 | { | 12950 | { |
13017 | m_host.AddScriptLPS(1); | 12951 | //// m_host.AddScriptLPS(1); |
13018 | UUID key = new UUID(); | 12952 | UUID key = new UUID(); |
13019 | if (!UUID.TryParse(id, out key)) | 12953 | if (!UUID.TryParse(id, out key)) |
13020 | return 0; | 12954 | return 0; |
@@ -13059,7 +12993,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13059 | { | 12993 | { |
13060 | LSL_List pref; | 12994 | LSL_List pref; |
13061 | 12995 | ||
13062 | m_host.AddScriptLPS(1); | 12996 | //// m_host.AddScriptLPS(1); |
13063 | 12997 | ||
13064 | // Note that although we have normalized, both | 12998 | // Note that although we have normalized, both |
13065 | // indices could still be negative. | 12999 | // indices could still be negative. |
@@ -13130,14 +13064,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13130 | 13064 | ||
13131 | public void llLoadURL(string avatar_id, string message, string url) | 13065 | public void llLoadURL(string avatar_id, string message, string url) |
13132 | { | 13066 | { |
13133 | m_host.AddScriptLPS(1); | 13067 | //// m_host.AddScriptLPS(1); |
13134 | 13068 | ||
13135 | IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); | 13069 | IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); |
13136 | if (null != dm) | 13070 | if (null != dm) |
13137 | dm.SendUrlToUser( | 13071 | dm.SendUrlToUser( |
13138 | new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url); | 13072 | new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url); |
13139 | 13073 | //// ScriptSleep(m_sleepMsOnLoadURL); | |
13140 | ScriptSleep(m_sleepMsOnLoadURL); | ||
13141 | } | 13074 | } |
13142 | 13075 | ||
13143 | public void llParcelMediaCommandList(LSL_List commandList) | 13076 | public void llParcelMediaCommandList(LSL_List commandList) |
@@ -13145,7 +13078,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13145 | // TODO: Not implemented yet (missing in libomv?): | 13078 | // TODO: Not implemented yet (missing in libomv?): |
13146 | // PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) | 13079 | // PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) |
13147 | 13080 | ||
13148 | m_host.AddScriptLPS(1); | 13081 | //// m_host.AddScriptLPS(1); |
13149 | 13082 | ||
13150 | // according to the docs, this command only works if script owner and land owner are the same | 13083 | // according to the docs, this command only works if script owner and land owner are the same |
13151 | // lets add estate owners and gods, too, and use the generic permission check. | 13084 | // lets add estate owners and gods, too, and use the generic permission check. |
@@ -13395,12 +13328,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13395 | commandToSend.Value, time); | 13328 | commandToSend.Value, time); |
13396 | } | 13329 | } |
13397 | } | 13330 | } |
13398 | ScriptSleep(m_sleepMsOnParcelMediaCommandList); | 13331 | //// ScriptSleep(m_sleepMsOnParcelMediaCommandList); |
13399 | } | 13332 | } |
13400 | 13333 | ||
13401 | public LSL_List llParcelMediaQuery(LSL_List aList) | 13334 | public LSL_List llParcelMediaQuery(LSL_List aList) |
13402 | { | 13335 | { |
13403 | m_host.AddScriptLPS(1); | 13336 | //// m_host.AddScriptLPS(1); |
13404 | LSL_List list = new LSL_List(); | 13337 | LSL_List list = new LSL_List(); |
13405 | Vector3 pos = m_host.AbsolutePosition; | 13338 | Vector3 pos = m_host.AbsolutePosition; |
13406 | 13339 | ||
@@ -13447,22 +13380,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13447 | } | 13380 | } |
13448 | } | 13381 | } |
13449 | } | 13382 | } |
13450 | ScriptSleep(m_sleepMsOnParcelMediaQuery); | 13383 | //// ScriptSleep(m_sleepMsOnParcelMediaQuery); |
13451 | return list; | 13384 | return list; |
13452 | } | 13385 | } |
13453 | 13386 | ||
13454 | public LSL_Integer llModPow(int a, int b, int c) | 13387 | public LSL_Integer llModPow(int a, int b, int c) |
13455 | { | 13388 | { |
13456 | m_host.AddScriptLPS(1); | 13389 | //// m_host.AddScriptLPS(1); |
13457 | Int64 tmp = 0; | 13390 | Int64 tmp = 0; |
13458 | Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); | 13391 | Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); |
13459 | ScriptSleep(m_sleepMsOnModPow); | 13392 | //// ScriptSleep(m_sleepMsOnModPow); |
13460 | return Convert.ToInt32(tmp); | 13393 | return Convert.ToInt32(tmp); |
13461 | } | 13394 | } |
13462 | 13395 | ||
13463 | public LSL_Integer llGetInventoryType(string name) | 13396 | public LSL_Integer llGetInventoryType(string name) |
13464 | { | 13397 | { |
13465 | m_host.AddScriptLPS(1); | 13398 | //// m_host.AddScriptLPS(1); |
13466 | 13399 | ||
13467 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); | 13400 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
13468 | 13401 | ||
@@ -13474,7 +13407,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13474 | 13407 | ||
13475 | public void llSetPayPrice(int price, LSL_List quick_pay_buttons) | 13408 | public void llSetPayPrice(int price, LSL_List quick_pay_buttons) |
13476 | { | 13409 | { |
13477 | m_host.AddScriptLPS(1); | 13410 | //// m_host.AddScriptLPS(1); |
13478 | 13411 | ||
13479 | if (quick_pay_buttons.Data.Length < 4) | 13412 | if (quick_pay_buttons.Data.Length < 4) |
13480 | { | 13413 | { |
@@ -13496,7 +13429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13496 | 13429 | ||
13497 | public LSL_Vector llGetCameraPos() | 13430 | public LSL_Vector llGetCameraPos() |
13498 | { | 13431 | { |
13499 | m_host.AddScriptLPS(1); | 13432 | //// m_host.AddScriptLPS(1); |
13500 | 13433 | ||
13501 | if (m_item.PermsGranter == UUID.Zero) | 13434 | if (m_item.PermsGranter == UUID.Zero) |
13502 | return Vector3.Zero; | 13435 | return Vector3.Zero; |
@@ -13520,7 +13453,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13520 | 13453 | ||
13521 | public LSL_Rotation llGetCameraRot() | 13454 | public LSL_Rotation llGetCameraRot() |
13522 | { | 13455 | { |
13523 | m_host.AddScriptLPS(1); | 13456 | //// m_host.AddScriptLPS(1); |
13524 | 13457 | ||
13525 | if (m_item.PermsGranter == UUID.Zero) | 13458 | if (m_item.PermsGranter == UUID.Zero) |
13526 | return Quaternion.Identity; | 13459 | return Quaternion.Identity; |
@@ -13543,21 +13476,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13543 | 13476 | ||
13544 | public void llSetPrimURL(string url) | 13477 | public void llSetPrimURL(string url) |
13545 | { | 13478 | { |
13546 | m_host.AddScriptLPS(1); | 13479 | //// m_host.AddScriptLPS(1); |
13547 | Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); | 13480 | Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); |
13548 | ScriptSleep(m_sleepMsOnSetPrimURL); | 13481 | //// ScriptSleep(m_sleepMsOnSetPrimURL); |
13549 | } | 13482 | } |
13550 | 13483 | ||
13551 | public void llRefreshPrimURL() | 13484 | public void llRefreshPrimURL() |
13552 | { | 13485 | { |
13553 | m_host.AddScriptLPS(1); | 13486 | //// m_host.AddScriptLPS(1); |
13554 | Deprecated("llRefreshPrimURL"); | 13487 | Deprecated("llRefreshPrimURL"); |
13555 | ScriptSleep(m_sleepMsOnRefreshPrimURL); | 13488 | //// ScriptSleep(m_sleepMsOnRefreshPrimURL); |
13556 | } | 13489 | } |
13557 | 13490 | ||
13558 | public LSL_String llEscapeURL(string url) | 13491 | public LSL_String llEscapeURL(string url) |
13559 | { | 13492 | { |
13560 | m_host.AddScriptLPS(1); | 13493 | //// m_host.AddScriptLPS(1); |
13561 | try | 13494 | try |
13562 | { | 13495 | { |
13563 | return Uri.EscapeDataString(url); | 13496 | return Uri.EscapeDataString(url); |
@@ -13570,7 +13503,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13570 | 13503 | ||
13571 | public LSL_String llUnescapeURL(string url) | 13504 | public LSL_String llUnescapeURL(string url) |
13572 | { | 13505 | { |
13573 | m_host.AddScriptLPS(1); | 13506 | //// m_host.AddScriptLPS(1); |
13574 | try | 13507 | try |
13575 | { | 13508 | { |
13576 | return Uri.UnescapeDataString(url); | 13509 | return Uri.UnescapeDataString(url); |
@@ -13583,7 +13516,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13583 | 13516 | ||
13584 | public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt) | 13517 | public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt) |
13585 | { | 13518 | { |
13586 | m_host.AddScriptLPS(1); | 13519 | //// m_host.AddScriptLPS(1); |
13587 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); | 13520 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); |
13588 | if (detectedParams == null) | 13521 | if (detectedParams == null) |
13589 | { | 13522 | { |
@@ -13604,12 +13537,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13604 | avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name, | 13537 | avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name, |
13605 | simname, pos, lookAt); | 13538 | simname, pos, lookAt); |
13606 | } | 13539 | } |
13607 | ScriptSleep(m_sleepMsOnMapDestination); | 13540 | //// ScriptSleep(m_sleepMsOnMapDestination); |
13608 | } | 13541 | } |
13609 | 13542 | ||
13610 | public void llAddToLandBanList(LSL_Key avatar, LSL_Float hours) | 13543 | public void llAddToLandBanList(LSL_Key avatar, LSL_Float hours) |
13611 | { | 13544 | { |
13612 | m_host.AddScriptLPS(1); | 13545 | //// m_host.AddScriptLPS(1); |
13613 | UUID key; | 13546 | UUID key; |
13614 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 13547 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
13615 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) | 13548 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
@@ -13645,12 +13578,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13645 | World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); | 13578 | World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); |
13646 | } | 13579 | } |
13647 | } | 13580 | } |
13648 | ScriptSleep(m_sleepMsOnAddToLandBanList); | 13581 | //// ScriptSleep(m_sleepMsOnAddToLandBanList); |
13649 | } | 13582 | } |
13650 | 13583 | ||
13651 | public void llRemoveFromLandPassList(string avatar) | 13584 | public void llRemoveFromLandPassList(string avatar) |
13652 | { | 13585 | { |
13653 | m_host.AddScriptLPS(1); | 13586 | //// m_host.AddScriptLPS(1); |
13654 | UUID key; | 13587 | UUID key; |
13655 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 13588 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
13656 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManagePasses, false)) | 13589 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManagePasses, false)) |
@@ -13672,12 +13605,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13672 | } | 13605 | } |
13673 | } | 13606 | } |
13674 | } | 13607 | } |
13675 | ScriptSleep(m_sleepMsOnRemoveFromLandPassList); | 13608 | //// ScriptSleep(m_sleepMsOnRemoveFromLandPassList); |
13676 | } | 13609 | } |
13677 | 13610 | ||
13678 | public void llRemoveFromLandBanList(string avatar) | 13611 | public void llRemoveFromLandBanList(string avatar) |
13679 | { | 13612 | { |
13680 | m_host.AddScriptLPS(1); | 13613 | //// m_host.AddScriptLPS(1); |
13681 | UUID key; | 13614 | UUID key; |
13682 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 13615 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
13683 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) | 13616 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
@@ -13699,12 +13632,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13699 | } | 13632 | } |
13700 | } | 13633 | } |
13701 | } | 13634 | } |
13702 | ScriptSleep(m_sleepMsOnRemoveFromLandBanList); | 13635 | //// ScriptSleep(m_sleepMsOnRemoveFromLandBanList); |
13703 | } | 13636 | } |
13704 | 13637 | ||
13705 | public void llSetCameraParams(LSL_List rules) | 13638 | public void llSetCameraParams(LSL_List rules) |
13706 | { | 13639 | { |
13707 | m_host.AddScriptLPS(1); | 13640 | //// m_host.AddScriptLPS(1); |
13708 | 13641 | ||
13709 | // the object we are in | 13642 | // the object we are in |
13710 | UUID objectID = m_host.ParentUUID; | 13643 | UUID objectID = m_host.ParentUUID; |
@@ -13831,7 +13764,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13831 | 13764 | ||
13832 | public void llClearCameraParams() | 13765 | public void llClearCameraParams() |
13833 | { | 13766 | { |
13834 | m_host.AddScriptLPS(1); | 13767 | //// m_host.AddScriptLPS(1); |
13835 | 13768 | ||
13836 | // the object we are in | 13769 | // the object we are in |
13837 | UUID objectID = m_host.ParentUUID; | 13770 | UUID objectID = m_host.ParentUUID; |
@@ -13858,7 +13791,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13858 | 13791 | ||
13859 | public LSL_Float llListStatistics(int operation, LSL_List src) | 13792 | public LSL_Float llListStatistics(int operation, LSL_List src) |
13860 | { | 13793 | { |
13861 | m_host.AddScriptLPS(1); | 13794 | //// m_host.AddScriptLPS(1); |
13862 | switch (operation) | 13795 | switch (operation) |
13863 | { | 13796 | { |
13864 | case ScriptBaseClass.LIST_STAT_RANGE: | 13797 | case ScriptBaseClass.LIST_STAT_RANGE: |
@@ -13890,19 +13823,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13890 | 13823 | ||
13891 | public LSL_Integer llGetUnixTime() | 13824 | public LSL_Integer llGetUnixTime() |
13892 | { | 13825 | { |
13893 | m_host.AddScriptLPS(1); | 13826 | //// m_host.AddScriptLPS(1); |
13894 | return Util.UnixTimeSinceEpoch(); | 13827 | return Util.UnixTimeSinceEpoch(); |
13895 | } | 13828 | } |
13896 | 13829 | ||
13897 | public LSL_Integer llGetParcelFlags(LSL_Vector pos) | 13830 | public LSL_Integer llGetParcelFlags(LSL_Vector pos) |
13898 | { | 13831 | { |
13899 | m_host.AddScriptLPS(1); | 13832 | //// m_host.AddScriptLPS(1); |
13900 | return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags; | 13833 | return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags; |
13901 | } | 13834 | } |
13902 | 13835 | ||
13903 | public LSL_Integer llGetRegionFlags() | 13836 | public LSL_Integer llGetRegionFlags() |
13904 | { | 13837 | { |
13905 | m_host.AddScriptLPS(1); | 13838 | //// m_host.AddScriptLPS(1); |
13906 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); | 13839 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); |
13907 | if (estate == null) | 13840 | if (estate == null) |
13908 | return 67108864; | 13841 | return 67108864; |
@@ -13911,7 +13844,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13911 | 13844 | ||
13912 | public LSL_String llXorBase64StringsCorrect(string str1, string str2) | 13845 | public LSL_String llXorBase64StringsCorrect(string str1, string str2) |
13913 | { | 13846 | { |
13914 | m_host.AddScriptLPS(1); | 13847 | //// m_host.AddScriptLPS(1); |
13915 | 13848 | ||
13916 | if (str1 == String.Empty) | 13849 | if (str1 == String.Empty) |
13917 | return String.Empty; | 13850 | return String.Empty; |
@@ -13975,7 +13908,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13975 | 13908 | ||
13976 | public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) | 13909 | public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) |
13977 | { | 13910 | { |
13978 | m_host.AddScriptLPS(1); | 13911 | //// m_host.AddScriptLPS(1); |
13979 | IHttpRequestModule httpScriptMod = m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); | 13912 | IHttpRequestModule httpScriptMod = m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); |
13980 | if(httpScriptMod == null) | 13913 | if(httpScriptMod == null) |
13981 | return ""; | 13914 | return ""; |
@@ -14170,7 +14103,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14170 | // Partial implementation: support for parameter flags needed | 14103 | // Partial implementation: support for parameter flags needed |
14171 | // see http://wiki.secondlife.com/wiki/llHTTPResponse | 14104 | // see http://wiki.secondlife.com/wiki/llHTTPResponse |
14172 | 14105 | ||
14173 | m_host.AddScriptLPS(1); | 14106 | //// m_host.AddScriptLPS(1); |
14174 | 14107 | ||
14175 | if (m_UrlModule != null) | 14108 | if (m_UrlModule != null) |
14176 | m_UrlModule.HttpResponse(new UUID(id), status,body); | 14109 | m_UrlModule.HttpResponse(new UUID(id), status,body); |
@@ -14178,7 +14111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14178 | 14111 | ||
14179 | public void llResetLandBanList() | 14112 | public void llResetLandBanList() |
14180 | { | 14113 | { |
14181 | m_host.AddScriptLPS(1); | 14114 | //// m_host.AddScriptLPS(1); |
14182 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; | 14115 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; |
14183 | if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0) | 14116 | if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0) |
14184 | { | 14117 | { |
@@ -14191,12 +14124,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14191 | foreach (LandAccessEntry entry in todelete) | 14124 | foreach (LandAccessEntry entry in todelete) |
14192 | land.ParcelAccessList.Remove(entry); | 14125 | land.ParcelAccessList.Remove(entry); |
14193 | } | 14126 | } |
14194 | ScriptSleep(m_sleepMsOnResetLandBanList); | 14127 | //// ScriptSleep(m_sleepMsOnResetLandBanList); |
14195 | } | 14128 | } |
14196 | 14129 | ||
14197 | public void llResetLandPassList() | 14130 | public void llResetLandPassList() |
14198 | { | 14131 | { |
14199 | m_host.AddScriptLPS(1); | 14132 | //// m_host.AddScriptLPS(1); |
14200 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; | 14133 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; |
14201 | if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0) | 14134 | if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0) |
14202 | { | 14135 | { |
@@ -14209,12 +14142,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14209 | foreach (LandAccessEntry entry in todelete) | 14142 | foreach (LandAccessEntry entry in todelete) |
14210 | land.ParcelAccessList.Remove(entry); | 14143 | land.ParcelAccessList.Remove(entry); |
14211 | } | 14144 | } |
14212 | ScriptSleep(m_sleepMsOnResetLandPassList); | 14145 | //// ScriptSleep(m_sleepMsOnResetLandPassList); |
14213 | } | 14146 | } |
14214 | 14147 | ||
14215 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) | 14148 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) |
14216 | { | 14149 | { |
14217 | m_host.AddScriptLPS(1); | 14150 | //// m_host.AddScriptLPS(1); |
14218 | 14151 | ||
14219 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | 14152 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
14220 | 14153 | ||
@@ -14256,7 +14189,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14256 | 14189 | ||
14257 | public LSL_List llGetParcelPrimOwners(LSL_Vector pos) | 14190 | public LSL_List llGetParcelPrimOwners(LSL_Vector pos) |
14258 | { | 14191 | { |
14259 | m_host.AddScriptLPS(1); | 14192 | //// m_host.AddScriptLPS(1); |
14260 | LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | 14193 | LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
14261 | LSL_List ret = new LSL_List(); | 14194 | LSL_List ret = new LSL_List(); |
14262 | if (land != null) | 14195 | if (land != null) |
@@ -14267,13 +14200,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14267 | ret.Add(new LSL_Integer(detectedParams.Value)); | 14200 | ret.Add(new LSL_Integer(detectedParams.Value)); |
14268 | } | 14201 | } |
14269 | } | 14202 | } |
14270 | ScriptSleep(m_sleepMsOnGetParcelPrimOwners); | 14203 | //// ScriptSleep(m_sleepMsOnGetParcelPrimOwners); |
14271 | return ret; | 14204 | return ret; |
14272 | } | 14205 | } |
14273 | 14206 | ||
14274 | public LSL_Integer llGetObjectPrimCount(LSL_Key object_id) | 14207 | public LSL_Integer llGetObjectPrimCount(LSL_Key object_id) |
14275 | { | 14208 | { |
14276 | m_host.AddScriptLPS(1); | 14209 | //// m_host.AddScriptLPS(1); |
14277 | UUID id; | 14210 | UUID id; |
14278 | if(!UUID.TryParse(object_id, out id)) | 14211 | if(!UUID.TryParse(object_id, out id)) |
14279 | return 0; | 14212 | return 0; |
@@ -14287,7 +14220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14287 | 14220 | ||
14288 | public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide) | 14221 | public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide) |
14289 | { | 14222 | { |
14290 | m_host.AddScriptLPS(1); | 14223 | //// m_host.AddScriptLPS(1); |
14291 | 14224 | ||
14292 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | 14225 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
14293 | 14226 | ||
@@ -14302,7 +14235,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14302 | 14235 | ||
14303 | public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) | 14236 | public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) |
14304 | { | 14237 | { |
14305 | m_host.AddScriptLPS(1); | 14238 | //// m_host.AddScriptLPS(1); |
14306 | LandData land = World.GetLandData(pos); | 14239 | LandData land = World.GetLandData(pos); |
14307 | if (land == null) | 14240 | if (land == null) |
14308 | { | 14241 | { |
@@ -14344,7 +14277,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14344 | 14277 | ||
14345 | public LSL_String llStringTrim(LSL_String src, LSL_Integer type) | 14278 | public LSL_String llStringTrim(LSL_String src, LSL_Integer type) |
14346 | { | 14279 | { |
14347 | m_host.AddScriptLPS(1); | 14280 | //// m_host.AddScriptLPS(1); |
14348 | if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return ((string)src).TrimStart(); } | 14281 | if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return ((string)src).TrimStart(); } |
14349 | if (type == (int)ScriptBaseClass.STRING_TRIM_TAIL) { return ((string)src).TrimEnd(); } | 14282 | if (type == (int)ScriptBaseClass.STRING_TRIM_TAIL) { return ((string)src).TrimEnd(); } |
14350 | if (type == (int)ScriptBaseClass.STRING_TRIM) { return ((string)src).Trim(); } | 14283 | if (type == (int)ScriptBaseClass.STRING_TRIM) { return ((string)src).Trim(); } |
@@ -14353,7 +14286,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14353 | 14286 | ||
14354 | public LSL_List llGetObjectDetails(LSL_Key id, LSL_List args) | 14287 | public LSL_List llGetObjectDetails(LSL_Key id, LSL_List args) |
14355 | { | 14288 | { |
14356 | m_host.AddScriptLPS(1); | 14289 | //// m_host.AddScriptLPS(1); |
14357 | LSL_List ret = new LSL_List(); | 14290 | LSL_List ret = new LSL_List(); |
14358 | UUID key = new UUID(); | 14291 | UUID key = new UUID(); |
14359 | if (!UUID.TryParse(id, out key)) | 14292 | if (!UUID.TryParse(id, out key)) |
@@ -14915,7 +14848,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14915 | 14848 | ||
14916 | public LSL_Key llGetNumberOfNotecardLines(string name) | 14849 | public LSL_Key llGetNumberOfNotecardLines(string name) |
14917 | { | 14850 | { |
14918 | m_host.AddScriptLPS(1); | 14851 | //// m_host.AddScriptLPS(1); |
14919 | 14852 | ||
14920 | UUID assetID = UUID.Zero; | 14853 | UUID assetID = UUID.Zero; |
14921 | 14854 | ||
@@ -14944,7 +14877,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14944 | { | 14877 | { |
14945 | AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(assetID).ToString()); | 14878 | AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(assetID).ToString()); |
14946 | 14879 | ||
14947 | ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); | 14880 | //// ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); |
14948 | return tid.ToString(); | 14881 | return tid.ToString(); |
14949 | } | 14882 | } |
14950 | 14883 | ||
@@ -14960,13 +14893,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14960 | AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(id).ToString()); | 14893 | AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(id).ToString()); |
14961 | }); | 14894 | }); |
14962 | 14895 | ||
14963 | ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); | 14896 | //// ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); |
14964 | return tid.ToString(); | 14897 | return tid.ToString(); |
14965 | } | 14898 | } |
14966 | 14899 | ||
14967 | public LSL_Key llGetNotecardLine(string name, int line) | 14900 | public LSL_Key llGetNotecardLine(string name, int line) |
14968 | { | 14901 | { |
14969 | m_host.AddScriptLPS(1); | 14902 | //// m_host.AddScriptLPS(1); |
14970 | 14903 | ||
14971 | UUID assetID = UUID.Zero; | 14904 | UUID assetID = UUID.Zero; |
14972 | 14905 | ||
@@ -14996,7 +14929,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14996 | AsyncCommands.DataserverPlugin.DataserverReply( | 14929 | AsyncCommands.DataserverPlugin.DataserverReply( |
14997 | reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); | 14930 | reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); |
14998 | 14931 | ||
14999 | ScriptSleep(m_sleepMsOnGetNotecardLine); | 14932 | //// ScriptSleep(m_sleepMsOnGetNotecardLine); |
15000 | return tid.ToString(); | 14933 | return tid.ToString(); |
15001 | } | 14934 | } |
15002 | 14935 | ||
@@ -15015,7 +14948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15015 | reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); | 14948 | reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); |
15016 | }); | 14949 | }); |
15017 | 14950 | ||
15018 | ScriptSleep(m_sleepMsOnGetNotecardLine); | 14951 | //// ScriptSleep(m_sleepMsOnGetNotecardLine); |
15019 | return tid.ToString(); | 14952 | return tid.ToString(); |
15020 | } | 14953 | } |
15021 | 14954 | ||
@@ -15488,7 +15421,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15488 | 15421 | ||
15489 | LSL_List list = new LSL_List(); | 15422 | LSL_List list = new LSL_List(); |
15490 | 15423 | ||
15491 | m_host.AddScriptLPS(1); | 15424 | //// m_host.AddScriptLPS(1); |
15492 | 15425 | ||
15493 | Vector3 rayStart = start; | 15426 | Vector3 rayStart = start; |
15494 | Vector3 rayEnd = end; | 15427 | Vector3 rayEnd = end; |
@@ -15710,7 +15643,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15710 | /// </summary> | 15643 | /// </summary> |
15711 | public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options) | 15644 | public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options) |
15712 | { | 15645 | { |
15713 | m_host.AddScriptLPS(1); | 15646 | //// m_host.AddScriptLPS(1); |
15714 | LSL_List result = new LSL_List(); | 15647 | LSL_List result = new LSL_List(); |
15715 | 15648 | ||
15716 | // Prepare throttle data | 15649 | // Prepare throttle data |
@@ -16562,7 +16495,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16562 | 16495 | ||
16563 | public LSL_Integer llManageEstateAccess(int action, string avatar) | 16496 | public LSL_Integer llManageEstateAccess(int action, string avatar) |
16564 | { | 16497 | { |
16565 | m_host.AddScriptLPS(1); | 16498 | //// m_host.AddScriptLPS(1); |
16566 | EstateSettings estate = World.RegionInfo.EstateSettings; | 16499 | EstateSettings estate = World.RegionInfo.EstateSettings; |
16567 | bool isAccount = false; | 16500 | bool isAccount = false; |
16568 | bool isGroup = false; | 16501 | bool isGroup = false; |
@@ -16631,35 +16564,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16631 | 16564 | ||
16632 | public LSL_Integer llGetMemoryLimit() | 16565 | public LSL_Integer llGetMemoryLimit() |
16633 | { | 16566 | { |
16634 | m_host.AddScriptLPS(1); | 16567 | //// m_host.AddScriptLPS(1); |
16635 | // The value returned for Mono scripts in SL | 16568 | // The value returned for Mono scripts in SL |
16636 | return 65536; | 16569 | return 65536; |
16637 | } | 16570 | } |
16638 | 16571 | ||
16639 | public LSL_Integer llSetMemoryLimit(LSL_Integer limit) | 16572 | public LSL_Integer llSetMemoryLimit(LSL_Integer limit) |
16640 | { | 16573 | { |
16641 | m_host.AddScriptLPS(1); | 16574 | //// m_host.AddScriptLPS(1); |
16642 | // Treat as an LSO script | 16575 | // Treat as an LSO script |
16643 | return ScriptBaseClass.FALSE; | 16576 | return ScriptBaseClass.FALSE; |
16644 | } | 16577 | } |
16645 | 16578 | ||
16646 | public LSL_Integer llGetSPMaxMemory() | 16579 | public LSL_Integer llGetSPMaxMemory() |
16647 | { | 16580 | { |
16648 | m_host.AddScriptLPS(1); | 16581 | //// m_host.AddScriptLPS(1); |
16649 | // The value returned for Mono scripts in SL | 16582 | // The value returned for Mono scripts in SL |
16650 | return 65536; | 16583 | return 65536; |
16651 | } | 16584 | } |
16652 | 16585 | ||
16653 | public virtual LSL_Integer llGetUsedMemory() | 16586 | public virtual LSL_Integer llGetUsedMemory() |
16654 | { | 16587 | { |
16655 | m_host.AddScriptLPS(1); | 16588 | //// m_host.AddScriptLPS(1); |
16656 | // The value returned for Mono scripts in SL | 16589 | // The value returned for Mono scripts in SL |
16657 | return 65536; | 16590 | return 65536; |
16658 | } | 16591 | } |
16659 | 16592 | ||
16660 | public void llScriptProfiler(LSL_Integer flags) | 16593 | public void llScriptProfiler(LSL_Integer flags) |
16661 | { | 16594 | { |
16662 | m_host.AddScriptLPS(1); | 16595 | //// m_host.AddScriptLPS(1); |
16663 | // This does nothing for LSO scripts in SL | 16596 | // This does nothing for LSO scripts in SL |
16664 | } | 16597 | } |
16665 | 16598 | ||
@@ -16671,7 +16604,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16671 | 16604 | ||
16672 | public void llSetSoundQueueing(int queue) | 16605 | public void llSetSoundQueueing(int queue) |
16673 | { | 16606 | { |
16674 | m_host.AddScriptLPS(1); | 16607 | //// m_host.AddScriptLPS(1); |
16675 | 16608 | ||
16676 | if (m_SoundModule != null) | 16609 | if (m_SoundModule != null) |
16677 | m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); | 16610 | m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); |
@@ -16679,14 +16612,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16679 | 16612 | ||
16680 | public void llCollisionSprite(LSL_String impact_sprite) | 16613 | public void llCollisionSprite(LSL_String impact_sprite) |
16681 | { | 16614 | { |
16682 | m_host.AddScriptLPS(1); | 16615 | //// m_host.AddScriptLPS(1); |
16683 | // Viewer 2.0 broke this and it's likely LL has no intention | 16616 | // Viewer 2.0 broke this and it's likely LL has no intention |
16684 | // of fixing it. Therefore, letting this be a NOP seems appropriate. | 16617 | // of fixing it. Therefore, letting this be a NOP seems appropriate. |
16685 | } | 16618 | } |
16686 | 16619 | ||
16687 | public void llGodLikeRezObject(string inventory, LSL_Vector pos) | 16620 | public void llGodLikeRezObject(string inventory, LSL_Vector pos) |
16688 | { | 16621 | { |
16689 | m_host.AddScriptLPS(1); | 16622 | //// m_host.AddScriptLPS(1); |
16690 | 16623 | ||
16691 | if (!World.Permissions.IsGod(m_host.OwnerID)) | 16624 | if (!World.Permissions.IsGod(m_host.OwnerID)) |
16692 | NotImplemented("llGodLikeRezObject"); | 16625 | NotImplemented("llGodLikeRezObject"); |
@@ -16768,7 +16701,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16768 | return; | 16701 | return; |
16769 | } | 16702 | } |
16770 | 16703 | ||
16771 | m_host.AddScriptLPS(1); | 16704 | //// m_host.AddScriptLPS(1); |
16772 | 16705 | ||
16773 | if (item.PermsGranter == UUID.Zero) | 16706 | if (item.PermsGranter == UUID.Zero) |
16774 | { | 16707 | { |