diff options
Diffstat (limited to 'OpenSim')
4 files changed, 0 insertions, 540 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs index 3509968..c848555 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs | |||
@@ -93,7 +93,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
93 | 93 | ||
94 | public string cmDetectedCountry(int number) | 94 | public string cmDetectedCountry(int number) |
95 | { | 95 | { |
96 | m_host.AddScriptLPS(1); | ||
97 | if(!m_CMFunctionsEnabled) | 96 | if(!m_CMFunctionsEnabled) |
98 | return String.Empty; | 97 | return String.Empty; |
99 | if(World.UserAccountService == null) | 98 | if(World.UserAccountService == null) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bac1468..3a3703c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -446,7 +446,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
446 | 446 | ||
447 | Sleep(delay); | 447 | Sleep(delay); |
448 | } | 448 | } |
449 | |||
450 | protected virtual void Sleep(int delay) | 449 | protected virtual void Sleep(int delay) |
451 | { | 450 | { |
452 | if (m_item == null) // Some unit tests don't set this | 451 | if (m_item == null) // Some unit tests don't set this |
@@ -481,8 +480,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
481 | [DebuggerNonUserCode] | 480 | [DebuggerNonUserCode] |
482 | public void llResetScript() | 481 | public void llResetScript() |
483 | { | 482 | { |
484 | m_host.AddScriptLPS(1); | ||
485 | |||
486 | // We need to tell the URL module, if we hav one, to release | 483 | // We need to tell the URL module, if we hav one, to release |
487 | // the allocated URLs | 484 | // the allocated URLs |
488 | if (m_UrlModule != null) | 485 | if (m_UrlModule != null) |
@@ -497,7 +494,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
497 | 494 | ||
498 | if ((item = GetScriptByName(name)) == UUID.Zero) | 495 | if ((item = GetScriptByName(name)) == UUID.Zero) |
499 | { | 496 | { |
500 | m_host.AddScriptLPS(1); | ||
501 | Error("llResetOtherScript", "Can't find script '" + name + "'"); | 497 | Error("llResetOtherScript", "Can't find script '" + name + "'"); |
502 | return; | 498 | return; |
503 | } | 499 | } |
@@ -505,7 +501,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
505 | llResetScript(); | 501 | llResetScript(); |
506 | else | 502 | else |
507 | { | 503 | { |
508 | m_host.AddScriptLPS(1); | ||
509 | m_ScriptEngine.ResetScript(item); | 504 | m_ScriptEngine.ResetScript(item); |
510 | } | 505 | } |
511 | } | 506 | } |
@@ -514,8 +509,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
514 | { | 509 | { |
515 | UUID item; | 510 | UUID item; |
516 | 511 | ||
517 | m_host.AddScriptLPS(1); | ||
518 | |||
519 | if ((item = GetScriptByName(name)) != UUID.Zero) | 512 | if ((item = GetScriptByName(name)) != UUID.Zero) |
520 | { | 513 | { |
521 | return m_ScriptEngine.GetScriptState(item) ?1:0; | 514 | return m_ScriptEngine.GetScriptState(item) ?1:0; |
@@ -533,8 +526,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
533 | { | 526 | { |
534 | UUID item; | 527 | UUID item; |
535 | 528 | ||
536 | m_host.AddScriptLPS(1); | ||
537 | |||
538 | // These functions are supposed to be robust, | 529 | // These functions are supposed to be robust, |
539 | // so get the state one step at a time. | 530 | // so get the state one step at a time. |
540 | 531 | ||
@@ -773,44 +764,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
773 | //These are the implementations of the various ll-functions used by the LSL scripts. | 764 | //These are the implementations of the various ll-functions used by the LSL scripts. |
774 | public LSL_Float llSin(double f) | 765 | public LSL_Float llSin(double f) |
775 | { | 766 | { |
776 | m_host.AddScriptLPS(1); | ||
777 | return (double)Math.Sin(f); | 767 | return (double)Math.Sin(f); |
778 | } | 768 | } |
779 | 769 | ||
780 | public LSL_Float llCos(double f) | 770 | public LSL_Float llCos(double f) |
781 | { | 771 | { |
782 | m_host.AddScriptLPS(1); | ||
783 | return (double)Math.Cos(f); | 772 | return (double)Math.Cos(f); |
784 | } | 773 | } |
785 | 774 | ||
786 | public LSL_Float llTan(double f) | 775 | public LSL_Float llTan(double f) |
787 | { | 776 | { |
788 | m_host.AddScriptLPS(1); | ||
789 | return (double)Math.Tan(f); | 777 | return (double)Math.Tan(f); |
790 | } | 778 | } |
791 | 779 | ||
792 | public LSL_Float llAtan2(double x, double y) | 780 | public LSL_Float llAtan2(double x, double y) |
793 | { | 781 | { |
794 | m_host.AddScriptLPS(1); | ||
795 | return (double)Math.Atan2(x, y); | 782 | return (double)Math.Atan2(x, y); |
796 | } | 783 | } |
797 | 784 | ||
798 | public LSL_Float llSqrt(double f) | 785 | public LSL_Float llSqrt(double f) |
799 | { | 786 | { |
800 | m_host.AddScriptLPS(1); | ||
801 | return (double)Math.Sqrt(f); | 787 | return (double)Math.Sqrt(f); |
802 | } | 788 | } |
803 | 789 | ||
804 | public LSL_Float llPow(double fbase, double fexponent) | 790 | public LSL_Float llPow(double fbase, double fexponent) |
805 | { | 791 | { |
806 | m_host.AddScriptLPS(1); | ||
807 | return (double)Math.Pow(fbase, fexponent); | 792 | return (double)Math.Pow(fbase, fexponent); |
808 | } | 793 | } |
809 | 794 | ||
810 | public LSL_Integer llAbs(int i) | 795 | public LSL_Integer llAbs(int i) |
811 | { | 796 | { |
812 | // changed to replicate LSL behaviour whereby minimum int value is returned untouched. | 797 | // changed to replicate LSL behaviour whereby minimum int value is returned untouched. |
813 | m_host.AddScriptLPS(1); | ||
814 | if (i == Int32.MinValue) | 798 | if (i == Int32.MinValue) |
815 | return i; | 799 | return i; |
816 | else | 800 | else |
@@ -819,13 +803,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
819 | 803 | ||
820 | public LSL_Float llFabs(double f) | 804 | public LSL_Float llFabs(double f) |
821 | { | 805 | { |
822 | m_host.AddScriptLPS(1); | ||
823 | return (double)Math.Abs(f); | 806 | return (double)Math.Abs(f); |
824 | } | 807 | } |
825 | 808 | ||
826 | public LSL_Float llFrand(double mag) | 809 | public LSL_Float llFrand(double mag) |
827 | { | 810 | { |
828 | m_host.AddScriptLPS(1); | ||
829 | lock (Util.RandomClass) | 811 | lock (Util.RandomClass) |
830 | { | 812 | { |
831 | return Util.RandomClass.NextDouble() * mag; | 813 | return Util.RandomClass.NextDouble() * mag; |
@@ -834,33 +816,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
834 | 816 | ||
835 | public LSL_Integer llFloor(double f) | 817 | public LSL_Integer llFloor(double f) |
836 | { | 818 | { |
837 | m_host.AddScriptLPS(1); | ||
838 | return (int)Math.Floor(f); | 819 | return (int)Math.Floor(f); |
839 | } | 820 | } |
840 | 821 | ||
841 | public LSL_Integer llCeil(double f) | 822 | public LSL_Integer llCeil(double f) |
842 | { | 823 | { |
843 | m_host.AddScriptLPS(1); | ||
844 | return (int)Math.Ceiling(f); | 824 | return (int)Math.Ceiling(f); |
845 | } | 825 | } |
846 | 826 | ||
847 | // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven) | 827 | // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven) |
848 | public LSL_Integer llRound(double f) | 828 | public LSL_Integer llRound(double f) |
849 | { | 829 | { |
850 | m_host.AddScriptLPS(1); | ||
851 | return (int)Math.Round(f, MidpointRounding.AwayFromZero); | 830 | return (int)Math.Round(f, MidpointRounding.AwayFromZero); |
852 | } | 831 | } |
853 | 832 | ||
854 | //This next group are vector operations involving squaring and square root. ckrinke | 833 | //This next group are vector operations involving squaring and square root. ckrinke |
855 | public LSL_Float llVecMag(LSL_Vector v) | 834 | public LSL_Float llVecMag(LSL_Vector v) |
856 | { | 835 | { |
857 | m_host.AddScriptLPS(1); | ||
858 | return LSL_Vector.Mag(v); | 836 | return LSL_Vector.Mag(v); |
859 | } | 837 | } |
860 | 838 | ||
861 | public LSL_Vector llVecNorm(LSL_Vector v) | 839 | public LSL_Vector llVecNorm(LSL_Vector v) |
862 | { | 840 | { |
863 | m_host.AddScriptLPS(1); | ||
864 | return LSL_Vector.Norm(v); | 841 | return LSL_Vector.Norm(v); |
865 | } | 842 | } |
866 | 843 | ||
@@ -874,7 +851,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
874 | 851 | ||
875 | public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) | 852 | public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) |
876 | { | 853 | { |
877 | m_host.AddScriptLPS(1); | ||
878 | return VecDist(a, b); | 854 | return VecDist(a, b); |
879 | } | 855 | } |
880 | 856 | ||
@@ -884,7 +860,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
884 | 860 | ||
885 | public LSL_Vector llRot2Euler(LSL_Rotation q1) | 861 | public LSL_Vector llRot2Euler(LSL_Rotation q1) |
886 | { | 862 | { |
887 | m_host.AddScriptLPS(1); | ||
888 | LSL_Vector eul = new LSL_Vector(); | 863 | LSL_Vector eul = new LSL_Vector(); |
889 | 864 | ||
890 | double sqw = q1.s*q1.s; | 865 | double sqw = q1.s*q1.s; |
@@ -958,8 +933,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
958 | 933 | ||
959 | public LSL_Rotation llEuler2Rot(LSL_Vector v) | 934 | public LSL_Rotation llEuler2Rot(LSL_Vector v) |
960 | { | 935 | { |
961 | m_host.AddScriptLPS(1); | ||
962 | |||
963 | double x,y,z,s; | 936 | double x,y,z,s; |
964 | v.x *= 0.5; | 937 | v.x *= 0.5; |
965 | v.y *= 0.5; | 938 | v.y *= 0.5; |
@@ -985,7 +958,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
985 | 958 | ||
986 | public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up) | 959 | public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up) |
987 | { | 960 | { |
988 | m_host.AddScriptLPS(1); | ||
989 | double s; | 961 | double s; |
990 | double tr = fwd.x + left.y + up.z + 1.0; | 962 | double tr = fwd.x + left.y + up.z + 1.0; |
991 | 963 | ||
@@ -1040,8 +1012,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1040 | 1012 | ||
1041 | public LSL_Vector llRot2Fwd(LSL_Rotation r) | 1013 | public LSL_Vector llRot2Fwd(LSL_Rotation r) |
1042 | { | 1014 | { |
1043 | m_host.AddScriptLPS(1); | ||
1044 | |||
1045 | double x, y, z, m; | 1015 | double x, y, z, m; |
1046 | 1016 | ||
1047 | m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; | 1017 | m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; |
@@ -1065,8 +1035,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1065 | 1035 | ||
1066 | public LSL_Vector llRot2Left(LSL_Rotation r) | 1036 | public LSL_Vector llRot2Left(LSL_Rotation r) |
1067 | { | 1037 | { |
1068 | m_host.AddScriptLPS(1); | ||
1069 | |||
1070 | double x, y, z, m; | 1038 | double x, y, z, m; |
1071 | 1039 | ||
1072 | m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; | 1040 | m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; |
@@ -1090,7 +1058,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1090 | 1058 | ||
1091 | public LSL_Vector llRot2Up(LSL_Rotation r) | 1059 | public LSL_Vector llRot2Up(LSL_Rotation r) |
1092 | { | 1060 | { |
1093 | m_host.AddScriptLPS(1); | ||
1094 | double x, y, z, m; | 1061 | double x, y, z, m; |
1095 | 1062 | ||
1096 | m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; | 1063 | m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; |
@@ -1115,7 +1082,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1115 | public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b) | 1082 | public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b) |
1116 | { | 1083 | { |
1117 | //A and B should both be normalized | 1084 | //A and B should both be normalized |
1118 | m_host.AddScriptLPS(1); | ||
1119 | /* This method is more accurate than the SL one, and thus causes problems | 1085 | /* This method is more accurate than the SL one, and thus causes problems |
1120 | for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. | 1086 | for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. |
1121 | 1087 | ||
@@ -1188,8 +1154,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1188 | 1154 | ||
1189 | public void llWhisper(int channelID, string text) | 1155 | public void llWhisper(int channelID, string text) |
1190 | { | 1156 | { |
1191 | m_host.AddScriptLPS(1); | ||
1192 | |||
1193 | if (text.Length > 1023) | 1157 | if (text.Length > 1023) |
1194 | text = text.Substring(0, 1023); | 1158 | text = text.Substring(0, 1023); |
1195 | 1159 | ||
@@ -1215,8 +1179,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1215 | 1179 | ||
1216 | public void llSay(int channelID, string text) | 1180 | public void llSay(int channelID, string text) |
1217 | { | 1181 | { |
1218 | m_host.AddScriptLPS(1); | ||
1219 | |||
1220 | if (channelID == 0) | 1182 | if (channelID == 0) |
1221 | // m_SayShoutCount++; | 1183 | // m_SayShoutCount++; |
1222 | CheckSayShoutTime(); | 1184 | CheckSayShoutTime(); |
@@ -1244,8 +1206,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1244 | 1206 | ||
1245 | public void llShout(int channelID, string text) | 1207 | public void llShout(int channelID, string text) |
1246 | { | 1208 | { |
1247 | m_host.AddScriptLPS(1); | ||
1248 | |||
1249 | if (channelID == 0) | 1209 | if (channelID == 0) |
1250 | // m_SayShoutCount++; | 1210 | // m_SayShoutCount++; |
1251 | CheckSayShoutTime(); | 1211 | CheckSayShoutTime(); |
@@ -1275,8 +1235,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1275 | if (text.Length > 1023) | 1235 | if (text.Length > 1023) |
1276 | text = text.Substring(0, 1023); | 1236 | text = text.Substring(0, 1023); |
1277 | 1237 | ||
1278 | m_host.AddScriptLPS(1); | ||
1279 | |||
1280 | // debug channel is also sent to avatars | 1238 | // debug channel is also sent to avatars |
1281 | if (channelID == ScriptBaseClass.DEBUG_CHANNEL) | 1239 | if (channelID == ScriptBaseClass.DEBUG_CHANNEL) |
1282 | { | 1240 | { |
@@ -1295,8 +1253,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1295 | if (msg.Length > 1023) | 1253 | if (msg.Length > 1023) |
1296 | msg = msg.Substring(0, 1023); | 1254 | msg = msg.Substring(0, 1023); |
1297 | 1255 | ||
1298 | m_host.AddScriptLPS(1); | ||
1299 | |||
1300 | if (channel == ScriptBaseClass.DEBUG_CHANNEL) | 1256 | if (channel == ScriptBaseClass.DEBUG_CHANNEL) |
1301 | return; | 1257 | return; |
1302 | 1258 | ||
@@ -1310,7 +1266,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1310 | 1266 | ||
1311 | public LSL_Integer llListen(int channelID, string name, string ID, string msg) | 1267 | public LSL_Integer llListen(int channelID, string name, string ID, string msg) |
1312 | { | 1268 | { |
1313 | m_host.AddScriptLPS(1); | ||
1314 | UUID keyID; | 1269 | UUID keyID; |
1315 | UUID.TryParse(ID, out keyID); | 1270 | UUID.TryParse(ID, out keyID); |
1316 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 1271 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
@@ -1322,7 +1277,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1322 | 1277 | ||
1323 | public void llListenControl(int number, int active) | 1278 | public void llListenControl(int number, int active) |
1324 | { | 1279 | { |
1325 | m_host.AddScriptLPS(1); | ||
1326 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 1280 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
1327 | if (wComm != null) | 1281 | if (wComm != null) |
1328 | wComm.ListenControl(m_item.ItemID, number, active); | 1282 | wComm.ListenControl(m_item.ItemID, number, active); |
@@ -1330,7 +1284,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1330 | 1284 | ||
1331 | public void llListenRemove(int number) | 1285 | public void llListenRemove(int number) |
1332 | { | 1286 | { |
1333 | m_host.AddScriptLPS(1); | ||
1334 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 1287 | IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
1335 | if (wComm != null) | 1288 | if (wComm != null) |
1336 | wComm.ListenRemove(m_item.ItemID, number); | 1289 | wComm.ListenRemove(m_item.ItemID, number); |
@@ -1338,7 +1291,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1338 | 1291 | ||
1339 | public void llSensor(string name, string id, int type, double range, double arc) | 1292 | public void llSensor(string name, string id, int type, double range, double arc) |
1340 | { | 1293 | { |
1341 | m_host.AddScriptLPS(1); | ||
1342 | UUID keyID = UUID.Zero; | 1294 | UUID keyID = UUID.Zero; |
1343 | UUID.TryParse(id, out keyID); | 1295 | UUID.TryParse(id, out keyID); |
1344 | 1296 | ||
@@ -1347,7 +1299,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1347 | 1299 | ||
1348 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) | 1300 | public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) |
1349 | { | 1301 | { |
1350 | m_host.AddScriptLPS(1); | ||
1351 | UUID keyID = UUID.Zero; | 1302 | UUID keyID = UUID.Zero; |
1352 | UUID.TryParse(id, out keyID); | 1303 | UUID.TryParse(id, out keyID); |
1353 | 1304 | ||
@@ -1356,7 +1307,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1356 | 1307 | ||
1357 | public void llSensorRemove() | 1308 | public void llSensorRemove() |
1358 | { | 1309 | { |
1359 | m_host.AddScriptLPS(1); | ||
1360 | AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID); | 1310 | AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID); |
1361 | } | 1311 | } |
1362 | 1312 | ||
@@ -1397,7 +1347,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1397 | 1347 | ||
1398 | public LSL_String llDetectedName(int number) | 1348 | public LSL_String llDetectedName(int number) |
1399 | { | 1349 | { |
1400 | m_host.AddScriptLPS(1); | ||
1401 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1350 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1402 | if (detectedParams == null) | 1351 | if (detectedParams == null) |
1403 | return String.Empty; | 1352 | return String.Empty; |
@@ -1406,7 +1355,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1406 | 1355 | ||
1407 | public LSL_String llDetectedKey(int number) | 1356 | public LSL_String llDetectedKey(int number) |
1408 | { | 1357 | { |
1409 | m_host.AddScriptLPS(1); | ||
1410 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1358 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1411 | if (detectedParams == null) | 1359 | if (detectedParams == null) |
1412 | return String.Empty; | 1360 | return String.Empty; |
@@ -1415,7 +1363,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1415 | 1363 | ||
1416 | public LSL_String llDetectedOwner(int number) | 1364 | public LSL_String llDetectedOwner(int number) |
1417 | { | 1365 | { |
1418 | m_host.AddScriptLPS(1); | ||
1419 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1366 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1420 | if (detectedParams == null) | 1367 | if (detectedParams == null) |
1421 | return String.Empty; | 1368 | return String.Empty; |
@@ -1424,7 +1371,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1424 | 1371 | ||
1425 | public LSL_Integer llDetectedType(int number) | 1372 | public LSL_Integer llDetectedType(int number) |
1426 | { | 1373 | { |
1427 | m_host.AddScriptLPS(1); | ||
1428 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1374 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1429 | if (detectedParams == null) | 1375 | if (detectedParams == null) |
1430 | return 0; | 1376 | return 0; |
@@ -1433,7 +1379,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1433 | 1379 | ||
1434 | public LSL_Vector llDetectedPos(int number) | 1380 | public LSL_Vector llDetectedPos(int number) |
1435 | { | 1381 | { |
1436 | m_host.AddScriptLPS(1); | ||
1437 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1382 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1438 | if (detectedParams == null) | 1383 | if (detectedParams == null) |
1439 | return new LSL_Vector(); | 1384 | return new LSL_Vector(); |
@@ -1442,7 +1387,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1442 | 1387 | ||
1443 | public LSL_Vector llDetectedVel(int number) | 1388 | public LSL_Vector llDetectedVel(int number) |
1444 | { | 1389 | { |
1445 | m_host.AddScriptLPS(1); | ||
1446 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1390 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1447 | if (detectedParams == null) | 1391 | if (detectedParams == null) |
1448 | return new LSL_Vector(); | 1392 | return new LSL_Vector(); |
@@ -1451,7 +1395,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1451 | 1395 | ||
1452 | public LSL_Vector llDetectedGrab(int number) | 1396 | public LSL_Vector llDetectedGrab(int number) |
1453 | { | 1397 | { |
1454 | m_host.AddScriptLPS(1); | ||
1455 | DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1398 | DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1456 | if (parms == null) | 1399 | if (parms == null) |
1457 | return new LSL_Vector(0, 0, 0); | 1400 | return new LSL_Vector(0, 0, 0); |
@@ -1461,7 +1404,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1461 | 1404 | ||
1462 | public LSL_Rotation llDetectedRot(int number) | 1405 | public LSL_Rotation llDetectedRot(int number) |
1463 | { | 1406 | { |
1464 | m_host.AddScriptLPS(1); | ||
1465 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1407 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1466 | if (detectedParams == null) | 1408 | if (detectedParams == null) |
1467 | return new LSL_Rotation(); | 1409 | return new LSL_Rotation(); |
@@ -1470,7 +1412,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1470 | 1412 | ||
1471 | public LSL_Integer llDetectedGroup(int number) | 1413 | public LSL_Integer llDetectedGroup(int number) |
1472 | { | 1414 | { |
1473 | m_host.AddScriptLPS(1); | ||
1474 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1415 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1475 | if (detectedParams == null) | 1416 | if (detectedParams == null) |
1476 | return new LSL_Integer(0); | 1417 | return new LSL_Integer(0); |
@@ -1481,7 +1422,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1481 | 1422 | ||
1482 | public LSL_Integer llDetectedLinkNumber(int number) | 1423 | public LSL_Integer llDetectedLinkNumber(int number) |
1483 | { | 1424 | { |
1484 | m_host.AddScriptLPS(1); | ||
1485 | DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); | 1425 | DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); |
1486 | if (parms == null) | 1426 | if (parms == null) |
1487 | return new LSL_Integer(0); | 1427 | return new LSL_Integer(0); |
@@ -1494,7 +1434,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1494 | /// </summary> | 1434 | /// </summary> |
1495 | public LSL_Vector llDetectedTouchBinormal(int index) | 1435 | public LSL_Vector llDetectedTouchBinormal(int index) |
1496 | { | 1436 | { |
1497 | m_host.AddScriptLPS(1); | ||
1498 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1437 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1499 | if (detectedParams == null) | 1438 | if (detectedParams == null) |
1500 | return new LSL_Vector(); | 1439 | return new LSL_Vector(); |
@@ -1506,7 +1445,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1506 | /// </summary> | 1445 | /// </summary> |
1507 | public LSL_Integer llDetectedTouchFace(int index) | 1446 | public LSL_Integer llDetectedTouchFace(int index) |
1508 | { | 1447 | { |
1509 | m_host.AddScriptLPS(1); | ||
1510 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1448 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1511 | if (detectedParams == null) | 1449 | if (detectedParams == null) |
1512 | return new LSL_Integer(-1); | 1450 | return new LSL_Integer(-1); |
@@ -1518,7 +1456,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1518 | /// </summary> | 1456 | /// </summary> |
1519 | public LSL_Vector llDetectedTouchNormal(int index) | 1457 | public LSL_Vector llDetectedTouchNormal(int index) |
1520 | { | 1458 | { |
1521 | m_host.AddScriptLPS(1); | ||
1522 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1459 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1523 | if (detectedParams == null) | 1460 | if (detectedParams == null) |
1524 | return new LSL_Vector(); | 1461 | return new LSL_Vector(); |
@@ -1530,7 +1467,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1530 | /// </summary> | 1467 | /// </summary> |
1531 | public LSL_Vector llDetectedTouchPos(int index) | 1468 | public LSL_Vector llDetectedTouchPos(int index) |
1532 | { | 1469 | { |
1533 | m_host.AddScriptLPS(1); | ||
1534 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1470 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1535 | if (detectedParams == null) | 1471 | if (detectedParams == null) |
1536 | return new LSL_Vector(); | 1472 | return new LSL_Vector(); |
@@ -1542,7 +1478,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1542 | /// </summary> | 1478 | /// </summary> |
1543 | public LSL_Vector llDetectedTouchST(int index) | 1479 | public LSL_Vector llDetectedTouchST(int index) |
1544 | { | 1480 | { |
1545 | m_host.AddScriptLPS(1); | ||
1546 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1481 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1547 | if (detectedParams == null) | 1482 | if (detectedParams == null) |
1548 | return new LSL_Vector(-1.0, -1.0, 0.0); | 1483 | return new LSL_Vector(-1.0, -1.0, 0.0); |
@@ -1554,7 +1489,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1554 | /// </summary> | 1489 | /// </summary> |
1555 | public LSL_Vector llDetectedTouchUV(int index) | 1490 | public LSL_Vector llDetectedTouchUV(int index) |
1556 | { | 1491 | { |
1557 | m_host.AddScriptLPS(1); | ||
1558 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); | 1492 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); |
1559 | if (detectedParams == null) | 1493 | if (detectedParams == null) |
1560 | return new LSL_Vector(-1.0, -1.0, 0.0); | 1494 | return new LSL_Vector(-1.0, -1.0, 0.0); |
@@ -1564,13 +1498,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1564 | [DebuggerNonUserCode] | 1498 | [DebuggerNonUserCode] |
1565 | public virtual void llDie() | 1499 | public virtual void llDie() |
1566 | { | 1500 | { |
1567 | m_host.AddScriptLPS(1); | ||
1568 | if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException(); | 1501 | if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException(); |
1569 | } | 1502 | } |
1570 | 1503 | ||
1571 | public LSL_Float llGround(LSL_Vector offset) | 1504 | public LSL_Float llGround(LSL_Vector offset) |
1572 | { | 1505 | { |
1573 | m_host.AddScriptLPS(1); | ||
1574 | Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; | 1506 | Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; |
1575 | 1507 | ||
1576 | //Get the slope normal. This gives us the equation of the plane tangent to the slope. | 1508 | //Get the slope normal. This gives us the equation of the plane tangent to the slope. |
@@ -1600,7 +1532,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1600 | 1532 | ||
1601 | public LSL_Float llCloud(LSL_Vector offset) | 1533 | public LSL_Float llCloud(LSL_Vector offset) |
1602 | { | 1534 | { |
1603 | m_host.AddScriptLPS(1); | ||
1604 | float cloudCover = 0f; | 1535 | float cloudCover = 0f; |
1605 | ICloudModule module = World.RequestModuleInterface<ICloudModule>(); | 1536 | ICloudModule module = World.RequestModuleInterface<ICloudModule>(); |
1606 | if (module != null) | 1537 | if (module != null) |
@@ -1617,7 +1548,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1617 | 1548 | ||
1618 | public LSL_Vector llWind(LSL_Vector offset) | 1549 | public LSL_Vector llWind(LSL_Vector offset) |
1619 | { | 1550 | { |
1620 | m_host.AddScriptLPS(1); | ||
1621 | LSL_Vector wind = new LSL_Vector(0, 0, 0); | 1551 | LSL_Vector wind = new LSL_Vector(0, 0, 0); |
1622 | IWindModule module = World.RequestModuleInterface<IWindModule>(); | 1552 | IWindModule module = World.RequestModuleInterface<IWindModule>(); |
1623 | if (module != null) | 1553 | if (module != null) |
@@ -1638,7 +1568,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1638 | { | 1568 | { |
1639 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) | 1569 | if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) |
1640 | return; | 1570 | return; |
1641 | m_host.AddScriptLPS(1); | ||
1642 | 1571 | ||
1643 | int statusrotationaxis = 0; | 1572 | int statusrotationaxis = 0; |
1644 | 1573 | ||
@@ -1755,7 +1684,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1755 | 1684 | ||
1756 | public LSL_Integer llGetStatus(int status) | 1685 | public LSL_Integer llGetStatus(int status) |
1757 | { | 1686 | { |
1758 | m_host.AddScriptLPS(1); | ||
1759 | // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); | 1687 | // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); |
1760 | switch (status) | 1688 | switch (status) |
1761 | { | 1689 | { |
@@ -1824,7 +1752,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1824 | 1752 | ||
1825 | public LSL_Integer llScaleByFactor(double scaling_factor) | 1753 | public LSL_Integer llScaleByFactor(double scaling_factor) |
1826 | { | 1754 | { |
1827 | m_host.AddScriptLPS(1); | ||
1828 | SceneObjectGroup group = m_host.ParentGroup; | 1755 | SceneObjectGroup group = m_host.ParentGroup; |
1829 | 1756 | ||
1830 | if(scaling_factor < 1e-6) | 1757 | if(scaling_factor < 1e-6) |
@@ -1849,7 +1776,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1849 | 1776 | ||
1850 | public LSL_Float llGetMaxScaleFactor() | 1777 | public LSL_Float llGetMaxScaleFactor() |
1851 | { | 1778 | { |
1852 | m_host.AddScriptLPS(1); | ||
1853 | SceneObjectGroup group = m_host.ParentGroup; | 1779 | SceneObjectGroup group = m_host.ParentGroup; |
1854 | 1780 | ||
1855 | if (group == null || group.IsDeleted || group.inTransit) | 1781 | if (group == null || group.IsDeleted || group.inTransit) |
@@ -1860,7 +1786,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1860 | 1786 | ||
1861 | public LSL_Float llGetMinScaleFactor() | 1787 | public LSL_Float llGetMinScaleFactor() |
1862 | { | 1788 | { |
1863 | m_host.AddScriptLPS(1); | ||
1864 | SceneObjectGroup group = m_host.ParentGroup; | 1789 | SceneObjectGroup group = m_host.ParentGroup; |
1865 | 1790 | ||
1866 | if (group == null || group.IsDeleted || group.inTransit) | 1791 | if (group == null || group.IsDeleted || group.inTransit) |
@@ -1871,7 +1796,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1871 | 1796 | ||
1872 | public void llSetScale(LSL_Vector scale) | 1797 | public void llSetScale(LSL_Vector scale) |
1873 | { | 1798 | { |
1874 | m_host.AddScriptLPS(1); | ||
1875 | SetScale(m_host, scale); | 1799 | SetScale(m_host, scale); |
1876 | } | 1800 | } |
1877 | 1801 | ||
@@ -1907,13 +1831,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1907 | 1831 | ||
1908 | public LSL_Vector llGetScale() | 1832 | public LSL_Vector llGetScale() |
1909 | { | 1833 | { |
1910 | m_host.AddScriptLPS(1); | ||
1911 | return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); | 1834 | return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); |
1912 | } | 1835 | } |
1913 | 1836 | ||
1914 | public void llSetClickAction(int action) | 1837 | public void llSetClickAction(int action) |
1915 | { | 1838 | { |
1916 | m_host.AddScriptLPS(1); | ||
1917 | m_host.ClickAction = (byte)action; | 1839 | m_host.ClickAction = (byte)action; |
1918 | m_host.ParentGroup.HasGroupChanged = true; | 1840 | m_host.ParentGroup.HasGroupChanged = true; |
1919 | m_host.ScheduleFullUpdate(); | 1841 | m_host.ScheduleFullUpdate(); |
@@ -1922,8 +1844,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1922 | 1844 | ||
1923 | public void llSetColor(LSL_Vector color, int face) | 1845 | public void llSetColor(LSL_Vector color, int face) |
1924 | { | 1846 | { |
1925 | m_host.AddScriptLPS(1); | ||
1926 | |||
1927 | SetColor(m_host, color, face); | 1847 | SetColor(m_host, color, face); |
1928 | } | 1848 | } |
1929 | 1849 | ||
@@ -1976,8 +1896,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1976 | 1896 | ||
1977 | public void llSetContentType(LSL_Key id, LSL_Integer type) | 1897 | public void llSetContentType(LSL_Key id, LSL_Integer type) |
1978 | { | 1898 | { |
1979 | m_host.AddScriptLPS(1); | ||
1980 | |||
1981 | if (m_UrlModule == null) | 1899 | if (m_UrlModule == null) |
1982 | return; | 1900 | return; |
1983 | 1901 | ||
@@ -2204,8 +2122,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2204 | 2122 | ||
2205 | public LSL_Float llGetAlpha(int face) | 2123 | public LSL_Float llGetAlpha(int face) |
2206 | { | 2124 | { |
2207 | m_host.AddScriptLPS(1); | ||
2208 | |||
2209 | return GetAlpha(m_host, face); | 2125 | return GetAlpha(m_host, face); |
2210 | } | 2126 | } |
2211 | 2127 | ||
@@ -2230,15 +2146,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2230 | 2146 | ||
2231 | public void llSetAlpha(double alpha, int face) | 2147 | public void llSetAlpha(double alpha, int face) |
2232 | { | 2148 | { |
2233 | m_host.AddScriptLPS(1); | ||
2234 | |||
2235 | SetAlpha(m_host, alpha, face); | 2149 | SetAlpha(m_host, alpha, face); |
2236 | } | 2150 | } |
2237 | 2151 | ||
2238 | public void llSetLinkAlpha(int linknumber, double alpha, int face) | 2152 | public void llSetLinkAlpha(int linknumber, double alpha, int face) |
2239 | { | 2153 | { |
2240 | m_host.AddScriptLPS(1); | ||
2241 | |||
2242 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 2154 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
2243 | if (parts.Count > 0) | 2155 | if (parts.Count > 0) |
2244 | { | 2156 | { |
@@ -2375,7 +2287,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2375 | 2287 | ||
2376 | public LSL_Vector llGetColor(int face) | 2288 | public LSL_Vector llGetColor(int face) |
2377 | { | 2289 | { |
2378 | m_host.AddScriptLPS(1); | ||
2379 | return GetColor(m_host, face); | 2290 | return GetColor(m_host, face); |
2380 | } | 2291 | } |
2381 | 2292 | ||
@@ -2422,15 +2333,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2422 | 2333 | ||
2423 | public void llSetTexture(string texture, int face) | 2334 | public void llSetTexture(string texture, int face) |
2424 | { | 2335 | { |
2425 | m_host.AddScriptLPS(1); | ||
2426 | SetTexture(m_host, texture, face); | 2336 | SetTexture(m_host, texture, face); |
2427 | ScriptSleep(m_sleepMsOnSetTexture); | 2337 | ScriptSleep(m_sleepMsOnSetTexture); |
2428 | } | 2338 | } |
2429 | 2339 | ||
2430 | public void llSetLinkTexture(int linknumber, string texture, int face) | 2340 | public void llSetLinkTexture(int linknumber, string texture, int face) |
2431 | { | 2341 | { |
2432 | m_host.AddScriptLPS(1); | ||
2433 | |||
2434 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 2342 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
2435 | if (parts.Count > 0) | 2343 | if (parts.Count > 0) |
2436 | { | 2344 | { |
@@ -2487,8 +2395,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2487 | 2395 | ||
2488 | public void llScaleTexture(double u, double v, int face) | 2396 | public void llScaleTexture(double u, double v, int face) |
2489 | { | 2397 | { |
2490 | m_host.AddScriptLPS(1); | ||
2491 | |||
2492 | ScaleTexture(m_host, u, v, face); | 2398 | ScaleTexture(m_host, u, v, face); |
2493 | ScriptSleep(m_sleepMsOnScaleTexture); | 2399 | ScriptSleep(m_sleepMsOnScaleTexture); |
2494 | } | 2400 | } |
@@ -2529,7 +2435,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2529 | 2435 | ||
2530 | public void llOffsetTexture(double u, double v, int face) | 2436 | public void llOffsetTexture(double u, double v, int face) |
2531 | { | 2437 | { |
2532 | m_host.AddScriptLPS(1); | ||
2533 | OffsetTexture(m_host, u, v, face); | 2438 | OffsetTexture(m_host, u, v, face); |
2534 | ScriptSleep(m_sleepMsOnOffsetTexture); | 2439 | ScriptSleep(m_sleepMsOnOffsetTexture); |
2535 | } | 2440 | } |
@@ -2570,7 +2475,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2570 | 2475 | ||
2571 | public void llRotateTexture(double rotation, int face) | 2476 | public void llRotateTexture(double rotation, int face) |
2572 | { | 2477 | { |
2573 | m_host.AddScriptLPS(1); | ||
2574 | RotateTexture(m_host, rotation, face); | 2478 | RotateTexture(m_host, rotation, face); |
2575 | ScriptSleep(m_sleepMsOnRotateTexture); | 2479 | ScriptSleep(m_sleepMsOnRotateTexture); |
2576 | } | 2480 | } |
@@ -2608,7 +2512,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2608 | 2512 | ||
2609 | public LSL_String llGetTexture(int face) | 2513 | public LSL_String llGetTexture(int face) |
2610 | { | 2514 | { |
2611 | m_host.AddScriptLPS(1); | ||
2612 | return GetTexture(m_host, face); | 2515 | return GetTexture(m_host, face); |
2613 | } | 2516 | } |
2614 | 2517 | ||
@@ -2650,8 +2553,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2650 | 2553 | ||
2651 | public void llSetPos(LSL_Vector pos) | 2554 | public void llSetPos(LSL_Vector pos) |
2652 | { | 2555 | { |
2653 | m_host.AddScriptLPS(1); | ||
2654 | |||
2655 | SetPos(m_host, pos, true); | 2556 | SetPos(m_host, pos, true); |
2656 | 2557 | ||
2657 | ScriptSleep(m_sleepMsOnSetPos); | 2558 | ScriptSleep(m_sleepMsOnSetPos); |
@@ -2666,8 +2567,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2666 | /// <returns>1 if successful, 0 otherwise.</returns> | 2567 | /// <returns>1 if successful, 0 otherwise.</returns> |
2667 | public LSL_Integer llSetRegionPos(LSL_Vector pos) | 2568 | public LSL_Integer llSetRegionPos(LSL_Vector pos) |
2668 | { | 2569 | { |
2669 | m_host.AddScriptLPS(1); | ||
2670 | |||
2671 | // BEGIN WORKAROUND | 2570 | // BEGIN WORKAROUND |
2672 | // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND. | 2571 | // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND. |
2673 | // | 2572 | // |
@@ -2782,20 +2681,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2782 | 2681 | ||
2783 | public LSL_Vector llGetPos() | 2682 | public LSL_Vector llGetPos() |
2784 | { | 2683 | { |
2785 | m_host.AddScriptLPS(1); | ||
2786 | return m_host.GetWorldPosition(); | 2684 | return m_host.GetWorldPosition(); |
2787 | } | 2685 | } |
2788 | 2686 | ||
2789 | public LSL_Vector llGetLocalPos() | 2687 | public LSL_Vector llGetLocalPos() |
2790 | { | 2688 | { |
2791 | m_host.AddScriptLPS(1); | ||
2792 | return GetPartLocalPos(m_host); | 2689 | return GetPartLocalPos(m_host); |
2793 | } | 2690 | } |
2794 | 2691 | ||
2795 | protected LSL_Vector GetPartLocalPos(SceneObjectPart part) | 2692 | protected LSL_Vector GetPartLocalPos(SceneObjectPart part) |
2796 | { | 2693 | { |
2797 | m_host.AddScriptLPS(1); | ||
2798 | |||
2799 | Vector3 pos; | 2694 | Vector3 pos; |
2800 | 2695 | ||
2801 | if (!part.IsRoot) | 2696 | if (!part.IsRoot) |
@@ -2817,8 +2712,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2817 | 2712 | ||
2818 | public void llSetRot(LSL_Rotation rot) | 2713 | public void llSetRot(LSL_Rotation rot) |
2819 | { | 2714 | { |
2820 | m_host.AddScriptLPS(1); | ||
2821 | |||
2822 | // try to let this work as in SL... | 2715 | // try to let this work as in SL... |
2823 | if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) | 2716 | if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) |
2824 | { | 2717 | { |
@@ -2840,7 +2733,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2840 | 2733 | ||
2841 | public void llSetLocalRot(LSL_Rotation rot) | 2734 | public void llSetLocalRot(LSL_Rotation rot) |
2842 | { | 2735 | { |
2843 | m_host.AddScriptLPS(1); | ||
2844 | SetRot(m_host, rot); | 2736 | SetRot(m_host, rot); |
2845 | ScriptSleep(m_sleepMsOnSetLocalRot); | 2737 | ScriptSleep(m_sleepMsOnSetLocalRot); |
2846 | } | 2738 | } |
@@ -2902,7 +2794,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2902 | return llGetRootRotation(); | 2794 | return llGetRootRotation(); |
2903 | } | 2795 | } |
2904 | 2796 | ||
2905 | m_host.AddScriptLPS(1); | ||
2906 | Quaternion q = m_host.GetWorldRotation(); | 2797 | Quaternion q = m_host.GetWorldRotation(); |
2907 | 2798 | ||
2908 | if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0) | 2799 | if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0) |
@@ -2967,15 +2858,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2967 | 2858 | ||
2968 | private LSL_Rotation GetPartLocalRot(SceneObjectPart part) | 2859 | private LSL_Rotation GetPartLocalRot(SceneObjectPart part) |
2969 | { | 2860 | { |
2970 | m_host.AddScriptLPS(1); | ||
2971 | Quaternion rot = part.RotationOffset; | 2861 | Quaternion rot = part.RotationOffset; |
2972 | return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); | 2862 | return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); |
2973 | } | 2863 | } |
2974 | 2864 | ||
2975 | public void llSetForce(LSL_Vector force, int local) | 2865 | public void llSetForce(LSL_Vector force, int local) |
2976 | { | 2866 | { |
2977 | m_host.AddScriptLPS(1); | ||
2978 | |||
2979 | if (!m_host.ParentGroup.IsDeleted) | 2867 | if (!m_host.ParentGroup.IsDeleted) |
2980 | { | 2868 | { |
2981 | if (local != 0) | 2869 | if (local != 0) |
@@ -2989,8 +2877,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2989 | { | 2877 | { |
2990 | LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0); | 2878 | LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0); |
2991 | 2879 | ||
2992 | m_host.AddScriptLPS(1); | ||
2993 | |||
2994 | if (!m_host.ParentGroup.IsDeleted) | 2880 | if (!m_host.ParentGroup.IsDeleted) |
2995 | { | 2881 | { |
2996 | force = m_host.ParentGroup.RootPart.GetForce(); | 2882 | force = m_host.ParentGroup.RootPart.GetForce(); |
@@ -3001,55 +2887,46 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3001 | 2887 | ||
3002 | public void llSetVelocity(LSL_Vector vel, int local) | 2888 | public void llSetVelocity(LSL_Vector vel, int local) |
3003 | { | 2889 | { |
3004 | m_host.AddScriptLPS(1); | ||
3005 | m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0); | 2890 | m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0); |
3006 | } | 2891 | } |
3007 | 2892 | ||
3008 | public void llSetAngularVelocity(LSL_Vector avel, int local) | 2893 | public void llSetAngularVelocity(LSL_Vector avel, int local) |
3009 | { | 2894 | { |
3010 | m_host.AddScriptLPS(1); | ||
3011 | m_host.SetAngularVelocity(new Vector3((float)avel.x, (float)avel.y, (float)avel.z), local != 0); | 2895 | m_host.SetAngularVelocity(new Vector3((float)avel.x, (float)avel.y, (float)avel.z), local != 0); |
3012 | } | 2896 | } |
3013 | public LSL_Integer llTarget(LSL_Vector position, double range) | 2897 | public LSL_Integer llTarget(LSL_Vector position, double range) |
3014 | { | 2898 | { |
3015 | m_host.AddScriptLPS(1); | ||
3016 | return m_host.ParentGroup.registerTargetWaypoint(position, | 2899 | return m_host.ParentGroup.registerTargetWaypoint(position, |
3017 | (float)range); | 2900 | (float)range); |
3018 | } | 2901 | } |
3019 | 2902 | ||
3020 | public void llTargetRemove(int number) | 2903 | public void llTargetRemove(int number) |
3021 | { | 2904 | { |
3022 | m_host.AddScriptLPS(1); | ||
3023 | m_host.ParentGroup.unregisterTargetWaypoint(number); | 2905 | m_host.ParentGroup.unregisterTargetWaypoint(number); |
3024 | } | 2906 | } |
3025 | 2907 | ||
3026 | public LSL_Integer llRotTarget(LSL_Rotation rot, double error) | 2908 | public LSL_Integer llRotTarget(LSL_Rotation rot, double error) |
3027 | { | 2909 | { |
3028 | m_host.AddScriptLPS(1); | ||
3029 | return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error); | 2910 | return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error); |
3030 | } | 2911 | } |
3031 | 2912 | ||
3032 | public void llRotTargetRemove(int number) | 2913 | public void llRotTargetRemove(int number) |
3033 | { | 2914 | { |
3034 | m_host.AddScriptLPS(1); | ||
3035 | m_host.ParentGroup.unregisterRotTargetWaypoint(number); | 2915 | m_host.ParentGroup.unregisterRotTargetWaypoint(number); |
3036 | } | 2916 | } |
3037 | 2917 | ||
3038 | public void llMoveToTarget(LSL_Vector target, double tau) | 2918 | public void llMoveToTarget(LSL_Vector target, double tau) |
3039 | { | 2919 | { |
3040 | m_host.AddScriptLPS(1); | ||
3041 | m_host.MoveToTarget(target, (float)tau); | 2920 | m_host.MoveToTarget(target, (float)tau); |
3042 | } | 2921 | } |
3043 | 2922 | ||
3044 | public void llStopMoveToTarget() | 2923 | public void llStopMoveToTarget() |
3045 | { | 2924 | { |
3046 | m_host.AddScriptLPS(1); | ||
3047 | m_host.StopMoveToTarget(); | 2925 | m_host.StopMoveToTarget(); |
3048 | } | 2926 | } |
3049 | 2927 | ||
3050 | public void llApplyImpulse(LSL_Vector force, int local) | 2928 | public void llApplyImpulse(LSL_Vector force, int local) |
3051 | { | 2929 | { |
3052 | m_host.AddScriptLPS(1); | ||
3053 | //No energy force yet | 2930 | //No energy force yet |
3054 | Vector3 v = force; | 2931 | Vector3 v = force; |
3055 | if (v.Length() > 20000.0f) | 2932 | if (v.Length() > 20000.0f) |
@@ -3063,26 +2940,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3063 | 2940 | ||
3064 | public void llApplyRotationalImpulse(LSL_Vector force, int local) | 2941 | public void llApplyRotationalImpulse(LSL_Vector force, int local) |
3065 | { | 2942 | { |
3066 | m_host.AddScriptLPS(1); | ||
3067 | m_host.ParentGroup.RootPart.ApplyAngularImpulse(force, local != 0); | 2943 | m_host.ParentGroup.RootPart.ApplyAngularImpulse(force, local != 0); |
3068 | } | 2944 | } |
3069 | 2945 | ||
3070 | public void llSetTorque(LSL_Vector torque, int local) | 2946 | public void llSetTorque(LSL_Vector torque, int local) |
3071 | { | 2947 | { |
3072 | m_host.AddScriptLPS(1); | ||
3073 | m_host.ParentGroup.RootPart.SetAngularImpulse(torque, local != 0); | 2948 | m_host.ParentGroup.RootPart.SetAngularImpulse(torque, local != 0); |
3074 | } | 2949 | } |
3075 | 2950 | ||
3076 | public LSL_Vector llGetTorque() | 2951 | public LSL_Vector llGetTorque() |
3077 | { | 2952 | { |
3078 | m_host.AddScriptLPS(1); | ||
3079 | |||
3080 | return new LSL_Vector(m_host.ParentGroup.GetTorque()); | 2953 | return new LSL_Vector(m_host.ParentGroup.GetTorque()); |
3081 | } | 2954 | } |
3082 | 2955 | ||
3083 | public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) | 2956 | public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) |
3084 | { | 2957 | { |
3085 | m_host.AddScriptLPS(1); | ||
3086 | llSetForce(force, local); | 2958 | llSetForce(force, local); |
3087 | llSetTorque(torque, local); | 2959 | llSetTorque(torque, local); |
3088 | } | 2960 | } |
@@ -3090,8 +2962,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3090 | 2962 | ||
3091 | public LSL_Vector llGetVel() | 2963 | public LSL_Vector llGetVel() |
3092 | { | 2964 | { |
3093 | m_host.AddScriptLPS(1); | ||
3094 | |||
3095 | Vector3 vel = Vector3.Zero; | 2965 | Vector3 vel = Vector3.Zero; |
3096 | 2966 | ||
3097 | if (m_host.ParentGroup.IsAttachment) | 2967 | if (m_host.ParentGroup.IsAttachment) |
@@ -3110,46 +2980,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3110 | 2980 | ||
3111 | public LSL_Vector llGetAccel() | 2981 | public LSL_Vector llGetAccel() |
3112 | { | 2982 | { |
3113 | m_host.AddScriptLPS(1); | ||
3114 | |||
3115 | return new LSL_Vector(m_host.Acceleration); | 2983 | return new LSL_Vector(m_host.Acceleration); |
3116 | } | 2984 | } |
3117 | 2985 | ||
3118 | public LSL_Vector llGetOmega() | 2986 | public LSL_Vector llGetOmega() |
3119 | { | 2987 | { |
3120 | m_host.AddScriptLPS(1); | ||
3121 | Vector3 avel = m_host.AngularVelocity; | 2988 | Vector3 avel = m_host.AngularVelocity; |
3122 | return new LSL_Vector(avel.X, avel.Y, avel.Z); | 2989 | return new LSL_Vector(avel.X, avel.Y, avel.Z); |
3123 | } | 2990 | } |
3124 | 2991 | ||
3125 | public LSL_Float llGetTimeOfDay() | 2992 | public LSL_Float llGetTimeOfDay() |
3126 | { | 2993 | { |
3127 | m_host.AddScriptLPS(1); | ||
3128 | return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); | 2994 | return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); |
3129 | } | 2995 | } |
3130 | 2996 | ||
3131 | public LSL_Float llGetWallclock() | 2997 | public LSL_Float llGetWallclock() |
3132 | { | 2998 | { |
3133 | m_host.AddScriptLPS(1); | ||
3134 | return DateTime.Now.TimeOfDay.TotalSeconds; | 2999 | return DateTime.Now.TimeOfDay.TotalSeconds; |
3135 | } | 3000 | } |
3136 | 3001 | ||
3137 | public LSL_Float llGetTime() | 3002 | public LSL_Float llGetTime() |
3138 | { | 3003 | { |
3139 | m_host.AddScriptLPS(1); | ||
3140 | double ScriptTime = Util.GetTimeStampMS() - m_timer; | 3004 | double ScriptTime = Util.GetTimeStampMS() - m_timer; |
3141 | return (float)Math.Round((ScriptTime / 1000.0), 3); | 3005 | return (float)Math.Round((ScriptTime / 1000.0), 3); |
3142 | } | 3006 | } |
3143 | 3007 | ||
3144 | public void llResetTime() | 3008 | public void llResetTime() |
3145 | { | 3009 | { |
3146 | m_host.AddScriptLPS(1); | ||
3147 | m_timer = Util.GetTimeStampMS(); | 3010 | m_timer = Util.GetTimeStampMS(); |
3148 | } | 3011 | } |
3149 | 3012 | ||
3150 | public LSL_Float llGetAndResetTime() | 3013 | public LSL_Float llGetAndResetTime() |
3151 | { | 3014 | { |
3152 | m_host.AddScriptLPS(1); | ||
3153 | double now = Util.GetTimeStampMS(); | 3015 | double now = Util.GetTimeStampMS(); |
3154 | double ScriptTime = now - m_timer; | 3016 | double ScriptTime = now - m_timer; |
3155 | m_timer = now; | 3017 | m_timer = now; |
@@ -3158,7 +3020,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3158 | 3020 | ||
3159 | public void llSound(string sound, double volume, int queue, int loop) | 3021 | public void llSound(string sound, double volume, int queue, int loop) |
3160 | { | 3022 | { |
3161 | m_host.AddScriptLPS(1); | ||
3162 | Deprecated("llSound", "Use llPlaySound instead"); | 3023 | Deprecated("llSound", "Use llPlaySound instead"); |
3163 | } | 3024 | } |
3164 | 3025 | ||
@@ -3166,8 +3027,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3166 | // 20080530 Updated to remove code duplication | 3027 | // 20080530 Updated to remove code duplication |
3167 | public void llPlaySound(string sound, double volume) | 3028 | public void llPlaySound(string sound, double volume) |
3168 | { | 3029 | { |
3169 | m_host.AddScriptLPS(1); | ||
3170 | |||
3171 | // send the sound, once, to all clients in range | 3030 | // send the sound, once, to all clients in range |
3172 | if (m_SoundModule != null) | 3031 | if (m_SoundModule != null) |
3173 | { | 3032 | { |
@@ -3181,7 +3040,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3181 | 3040 | ||
3182 | public void llLoopSound(string sound, double volume) | 3041 | public void llLoopSound(string sound, double volume) |
3183 | { | 3042 | { |
3184 | m_host.AddScriptLPS(1); | ||
3185 | if (m_SoundModule != null) | 3043 | if (m_SoundModule != null) |
3186 | { | 3044 | { |
3187 | m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), | 3045 | m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), |
@@ -3191,7 +3049,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3191 | 3049 | ||
3192 | public void llLoopSoundMaster(string sound, double volume) | 3050 | public void llLoopSoundMaster(string sound, double volume) |
3193 | { | 3051 | { |
3194 | m_host.AddScriptLPS(1); | ||
3195 | if (m_SoundModule != null) | 3052 | if (m_SoundModule != null) |
3196 | { | 3053 | { |
3197 | m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), | 3054 | m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), |
@@ -3201,7 +3058,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3201 | 3058 | ||
3202 | public void llLoopSoundSlave(string sound, double volume) | 3059 | public void llLoopSoundSlave(string sound, double volume) |
3203 | { | 3060 | { |
3204 | m_host.AddScriptLPS(1); | ||
3205 | if (m_SoundModule != null) | 3061 | if (m_SoundModule != null) |
3206 | { | 3062 | { |
3207 | m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), | 3063 | m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), |
@@ -3211,8 +3067,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3211 | 3067 | ||
3212 | public void llPlaySoundSlave(string sound, double volume) | 3068 | public void llPlaySoundSlave(string sound, double volume) |
3213 | { | 3069 | { |
3214 | m_host.AddScriptLPS(1); | ||
3215 | |||
3216 | // send the sound, once, to all clients in range | 3070 | // send the sound, once, to all clients in range |
3217 | if (m_SoundModule != null) | 3071 | if (m_SoundModule != null) |
3218 | { | 3072 | { |
@@ -3224,7 +3078,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3224 | 3078 | ||
3225 | public void llTriggerSound(string sound, double volume) | 3079 | public void llTriggerSound(string sound, double volume) |
3226 | { | 3080 | { |
3227 | m_host.AddScriptLPS(1); | ||
3228 | // send the sound, once, to all clients in rangeTrigger or play an attached sound in this part's inventory. | 3081 | // send the sound, once, to all clients in rangeTrigger or play an attached sound in this part's inventory. |
3229 | if (m_SoundModule != null) | 3082 | if (m_SoundModule != null) |
3230 | { | 3083 | { |
@@ -3236,15 +3089,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3236 | 3089 | ||
3237 | public void llStopSound() | 3090 | public void llStopSound() |
3238 | { | 3091 | { |
3239 | m_host.AddScriptLPS(1); | ||
3240 | |||
3241 | if (m_SoundModule != null) | 3092 | if (m_SoundModule != null) |
3242 | m_SoundModule.StopSound(m_host.UUID); | 3093 | m_SoundModule.StopSound(m_host.UUID); |
3243 | } | 3094 | } |
3244 | 3095 | ||
3245 | public void llPreloadSound(string sound) | 3096 | public void llPreloadSound(string sound) |
3246 | { | 3097 | { |
3247 | m_host.AddScriptLPS(1); | ||
3248 | if (m_SoundModule != null) | 3098 | if (m_SoundModule != null) |
3249 | m_SoundModule.PreloadSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), 0); | 3099 | m_SoundModule.PreloadSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), 0); |
3250 | ScriptSleep(m_sleepMsOnPreloadSound); | 3100 | ScriptSleep(m_sleepMsOnPreloadSound); |
@@ -3258,8 +3108,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3258 | /// </summary> | 3108 | /// </summary> |
3259 | public LSL_String llGetSubString(string src, int start, int end) | 3109 | public LSL_String llGetSubString(string src, int start, int end) |
3260 | { | 3110 | { |
3261 | m_host.AddScriptLPS(1); | ||
3262 | |||
3263 | // Normalize indices (if negative). | 3111 | // Normalize indices (if negative). |
3264 | // After normlaization they may still be | 3112 | // After normlaization they may still be |
3265 | // negative, but that is now relative to | 3113 | // negative, but that is now relative to |
@@ -3352,8 +3200,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3352 | /// </summary> | 3200 | /// </summary> |
3353 | public LSL_String llDeleteSubString(string src, int start, int end) | 3201 | public LSL_String llDeleteSubString(string src, int start, int end) |
3354 | { | 3202 | { |
3355 | m_host.AddScriptLPS(1); | ||
3356 | |||
3357 | // Normalize indices (if negative). | 3203 | // Normalize indices (if negative). |
3358 | // After normlaization they may still be | 3204 | // After normlaization they may still be |
3359 | // negative, but that is now relative to | 3205 | // negative, but that is now relative to |
@@ -3433,8 +3279,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3433 | /// </summary> | 3279 | /// </summary> |
3434 | public LSL_String llInsertString(string dest, int index, string src) | 3280 | public LSL_String llInsertString(string dest, int index, string src) |
3435 | { | 3281 | { |
3436 | m_host.AddScriptLPS(1); | ||
3437 | |||
3438 | // Normalize indices (if negative). | 3282 | // Normalize indices (if negative). |
3439 | // After normlaization they may still be | 3283 | // After normlaization they may still be |
3440 | // negative, but that is now relative to | 3284 | // negative, but that is now relative to |
@@ -3470,13 +3314,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3470 | 3314 | ||
3471 | public LSL_String llToUpper(string src) | 3315 | public LSL_String llToUpper(string src) |
3472 | { | 3316 | { |
3473 | m_host.AddScriptLPS(1); | ||
3474 | return src.ToUpper(); | 3317 | return src.ToUpper(); |
3475 | } | 3318 | } |
3476 | 3319 | ||
3477 | public LSL_String llToLower(string src) | 3320 | public LSL_String llToLower(string src) |
3478 | { | 3321 | { |
3479 | m_host.AddScriptLPS(1); | ||
3480 | return src.ToLower(); | 3322 | return src.ToLower(); |
3481 | } | 3323 | } |
3482 | 3324 | ||
@@ -3484,8 +3326,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3484 | { | 3326 | { |
3485 | Util.FireAndForget(x => | 3327 | Util.FireAndForget(x => |
3486 | { | 3328 | { |
3487 | m_host.AddScriptLPS(1); | ||
3488 | |||
3489 | if (m_item.PermsGranter == UUID.Zero) | 3329 | if (m_item.PermsGranter == UUID.Zero) |
3490 | return; | 3330 | return; |
3491 | 3331 | ||
@@ -3522,28 +3362,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3522 | 3362 | ||
3523 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 3363 | public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
3524 | { | 3364 | { |
3525 | m_host.AddScriptLPS(1); | ||
3526 | Deprecated("llMakeExplosion", "Use llParticleSystem instead"); | 3365 | Deprecated("llMakeExplosion", "Use llParticleSystem instead"); |
3527 | ScriptSleep(m_sleepMsOnMakeExplosion); | 3366 | ScriptSleep(m_sleepMsOnMakeExplosion); |
3528 | } | 3367 | } |
3529 | 3368 | ||
3530 | public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) | 3369 | public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) |
3531 | { | 3370 | { |
3532 | m_host.AddScriptLPS(1); | ||
3533 | Deprecated("llMakeFountain", "Use llParticleSystem instead"); | 3371 | Deprecated("llMakeFountain", "Use llParticleSystem instead"); |
3534 | ScriptSleep(m_sleepMsOnMakeFountain); | 3372 | ScriptSleep(m_sleepMsOnMakeFountain); |
3535 | } | 3373 | } |
3536 | 3374 | ||
3537 | public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 3375 | public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
3538 | { | 3376 | { |
3539 | m_host.AddScriptLPS(1); | ||
3540 | Deprecated("llMakeSmoke", "Use llParticleSystem instead"); | 3377 | Deprecated("llMakeSmoke", "Use llParticleSystem instead"); |
3541 | ScriptSleep(m_sleepMsOnMakeSmoke); | 3378 | ScriptSleep(m_sleepMsOnMakeSmoke); |
3542 | } | 3379 | } |
3543 | 3380 | ||
3544 | public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) | 3381 | public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) |
3545 | { | 3382 | { |
3546 | m_host.AddScriptLPS(1); | ||
3547 | Deprecated("llMakeFire", "Use llParticleSystem instead"); | 3383 | Deprecated("llMakeFire", "Use llParticleSystem instead"); |
3548 | ScriptSleep(m_sleepMsOnMakeFire); | 3384 | ScriptSleep(m_sleepMsOnMakeFire); |
3549 | } | 3385 | } |
@@ -3555,7 +3391,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3555 | 3391 | ||
3556 | public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) | 3392 | public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) |
3557 | { | 3393 | { |
3558 | m_host.AddScriptLPS(1); | ||
3559 | if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) | 3394 | if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) |
3560 | return; | 3395 | return; |
3561 | 3396 | ||
@@ -3634,8 +3469,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3634 | 3469 | ||
3635 | public void llLookAt(LSL_Vector target, double strength, double damping) | 3470 | public void llLookAt(LSL_Vector target, double strength, double damping) |
3636 | { | 3471 | { |
3637 | m_host.AddScriptLPS(1); | ||
3638 | |||
3639 | // Get the normalized vector to the target | 3472 | // Get the normalized vector to the target |
3640 | LSL_Vector from = llGetPos(); | 3473 | LSL_Vector from = llGetPos(); |
3641 | 3474 | ||
@@ -3682,7 +3515,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3682 | 3515 | ||
3683 | public void llStopLookAt() | 3516 | public void llStopLookAt() |
3684 | { | 3517 | { |
3685 | m_host.AddScriptLPS(1); | ||
3686 | m_host.StopLookAt(); | 3518 | m_host.StopLookAt(); |
3687 | } | 3519 | } |
3688 | 3520 | ||
@@ -3690,7 +3522,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3690 | { | 3522 | { |
3691 | if (sec != 0.0 && sec < m_MinTimerInterval) | 3523 | if (sec != 0.0 && sec < m_MinTimerInterval) |
3692 | sec = m_MinTimerInterval; | 3524 | sec = m_MinTimerInterval; |
3693 | m_host.AddScriptLPS(1); | ||
3694 | // Setting timer repeat | 3525 | // Setting timer repeat |
3695 | AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec); | 3526 | AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec); |
3696 | } | 3527 | } |
@@ -3698,15 +3529,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3698 | public virtual void llSleep(double sec) | 3529 | public virtual void llSleep(double sec) |
3699 | { | 3530 | { |
3700 | // m_log.Info("llSleep snoozing " + sec + "s."); | 3531 | // m_log.Info("llSleep snoozing " + sec + "s."); |
3701 | m_host.AddScriptLPS(1); | ||
3702 | |||
3703 | Sleep((int)(sec * 1000)); | 3532 | Sleep((int)(sec * 1000)); |
3704 | } | 3533 | } |
3705 | 3534 | ||
3706 | public LSL_Float llGetMass() | 3535 | public LSL_Float llGetMass() |
3707 | { | 3536 | { |
3708 | m_host.AddScriptLPS(1); | ||
3709 | |||
3710 | if (m_host.ParentGroup.IsAttachment) | 3537 | if (m_host.ParentGroup.IsAttachment) |
3711 | { | 3538 | { |
3712 | ScenePresence attachedAvatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar); | 3539 | ScenePresence attachedAvatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar); |
@@ -3741,7 +3568,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3741 | 3568 | ||
3742 | public void llCollisionFilter(string name, string id, int accept) | 3569 | public void llCollisionFilter(string name, string id, int accept) |
3743 | { | 3570 | { |
3744 | m_host.AddScriptLPS(1); | ||
3745 | m_host.CollisionFilter.Clear(); | 3571 | m_host.CollisionFilter.Clear(); |
3746 | UUID objectID; | 3572 | UUID objectID; |
3747 | 3573 | ||
@@ -3768,14 +3594,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3768 | } | 3594 | } |
3769 | } | 3595 | } |
3770 | } | 3596 | } |
3771 | |||
3772 | m_host.AddScriptLPS(1); | ||
3773 | } | 3597 | } |
3774 | 3598 | ||
3775 | public void llReleaseControls() | 3599 | public void llReleaseControls() |
3776 | { | 3600 | { |
3777 | m_host.AddScriptLPS(1); | ||
3778 | |||
3779 | if (m_item.PermsGranter != UUID.Zero) | 3601 | if (m_item.PermsGranter != UUID.Zero) |
3780 | { | 3602 | { |
3781 | ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); | 3603 | ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); |
@@ -3795,7 +3617,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3795 | 3617 | ||
3796 | public void llReleaseURL(string url) | 3618 | public void llReleaseURL(string url) |
3797 | { | 3619 | { |
3798 | m_host.AddScriptLPS(1); | ||
3799 | if (m_UrlModule != null) | 3620 | if (m_UrlModule != null) |
3800 | m_UrlModule.ReleaseURL(url); | 3621 | m_UrlModule.ReleaseURL(url); |
3801 | } | 3622 | } |
@@ -3843,8 +3664,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3843 | 3664 | ||
3844 | public void llAttachToAvatar(int attachmentPoint) | 3665 | public void llAttachToAvatar(int attachmentPoint) |
3845 | { | 3666 | { |
3846 | m_host.AddScriptLPS(1); | ||
3847 | |||
3848 | if (m_item.PermsGranter != m_host.OwnerID) | 3667 | if (m_item.PermsGranter != m_host.OwnerID) |
3849 | return; | 3668 | return; |
3850 | 3669 | ||
@@ -3854,8 +3673,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3854 | 3673 | ||
3855 | public void llDetachFromAvatar() | 3674 | public void llDetachFromAvatar() |
3856 | { | 3675 | { |
3857 | m_host.AddScriptLPS(1); | ||
3858 | |||
3859 | if (m_host.ParentGroup.AttachmentPoint == 0) | 3676 | if (m_host.ParentGroup.AttachmentPoint == 0) |
3860 | return; | 3677 | return; |
3861 | 3678 | ||
@@ -3868,26 +3685,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3868 | 3685 | ||
3869 | public void llTakeCamera(string avatar) | 3686 | public void llTakeCamera(string avatar) |
3870 | { | 3687 | { |
3871 | m_host.AddScriptLPS(1); | ||
3872 | Deprecated("llTakeCamera", "Use llSetCameraParams instead"); | 3688 | Deprecated("llTakeCamera", "Use llSetCameraParams instead"); |
3873 | } | 3689 | } |
3874 | 3690 | ||
3875 | public void llReleaseCamera(string avatar) | 3691 | public void llReleaseCamera(string avatar) |
3876 | { | 3692 | { |
3877 | m_host.AddScriptLPS(1); | ||
3878 | Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); | 3693 | Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); |
3879 | } | 3694 | } |
3880 | 3695 | ||
3881 | public LSL_String llGetOwner() | 3696 | public LSL_String llGetOwner() |
3882 | { | 3697 | { |
3883 | m_host.AddScriptLPS(1); | ||
3884 | |||
3885 | return m_host.OwnerID.ToString(); | 3698 | return m_host.OwnerID.ToString(); |
3886 | } | 3699 | } |
3887 | 3700 | ||
3888 | public void llInstantMessage(string user, string message) | 3701 | public void llInstantMessage(string user, string message) |
3889 | { | 3702 | { |
3890 | m_host.AddScriptLPS(1); | ||
3891 | UUID result; | 3703 | UUID result; |
3892 | if (!UUID.TryParse(user, out result) || result == UUID.Zero) | 3704 | if (!UUID.TryParse(user, out result) || result == UUID.Zero) |
3893 | { | 3705 | { |
@@ -3946,7 +3758,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3946 | 3758 | ||
3947 | public void llEmail(string address, string subject, string message) | 3759 | public void llEmail(string address, string subject, string message) |
3948 | { | 3760 | { |
3949 | m_host.AddScriptLPS(1); | ||
3950 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); | 3761 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); |
3951 | if (emailModule == null) | 3762 | if (emailModule == null) |
3952 | { | 3763 | { |
@@ -3984,7 +3795,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3984 | 3795 | ||
3985 | public void llGetNextEmail(string address, string subject) | 3796 | public void llGetNextEmail(string address, string subject) |
3986 | { | 3797 | { |
3987 | m_host.AddScriptLPS(1); | ||
3988 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); | 3798 | IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); |
3989 | if (emailModule == null) | 3799 | if (emailModule == null) |
3990 | { | 3800 | { |
@@ -4012,20 +3822,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4012 | 3822 | ||
4013 | public LSL_String llGetKey() | 3823 | public LSL_String llGetKey() |
4014 | { | 3824 | { |
4015 | m_host.AddScriptLPS(1); | ||
4016 | return m_host.UUID.ToString(); | 3825 | return m_host.UUID.ToString(); |
4017 | } | 3826 | } |
4018 | 3827 | ||
4019 | public LSL_Key llGenerateKey() | 3828 | public LSL_Key llGenerateKey() |
4020 | { | 3829 | { |
4021 | m_host.AddScriptLPS(1); | ||
4022 | return UUID.Random().ToString(); | 3830 | return UUID.Random().ToString(); |
4023 | } | 3831 | } |
4024 | 3832 | ||
4025 | public void llSetBuoyancy(double buoyancy) | 3833 | public void llSetBuoyancy(double buoyancy) |
4026 | { | 3834 | { |
4027 | m_host.AddScriptLPS(1); | ||
4028 | |||
4029 | if (!m_host.ParentGroup.IsDeleted) | 3835 | if (!m_host.ParentGroup.IsDeleted) |
4030 | { | 3836 | { |
4031 | m_host.ParentGroup.RootPart.SetBuoyancy((float)buoyancy); | 3837 | m_host.ParentGroup.RootPart.SetBuoyancy((float)buoyancy); |
@@ -4040,8 +3846,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4040 | /// <param name="tau">Number of seconds over which to reach target</param> | 3846 | /// <param name="tau">Number of seconds over which to reach target</param> |
4041 | public void llSetHoverHeight(double height, int water, double tau) | 3847 | public void llSetHoverHeight(double height, int water, double tau) |
4042 | { | 3848 | { |
4043 | m_host.AddScriptLPS(1); | ||
4044 | |||
4045 | PIDHoverType hoverType = PIDHoverType.Ground; | 3849 | PIDHoverType hoverType = PIDHoverType.Ground; |
4046 | if (water != 0) | 3850 | if (water != 0) |
4047 | { | 3851 | { |
@@ -4052,13 +3856,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4052 | 3856 | ||
4053 | public void llStopHover() | 3857 | public void llStopHover() |
4054 | { | 3858 | { |
4055 | m_host.AddScriptLPS(1); | ||
4056 | m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f); | 3859 | m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f); |
4057 | } | 3860 | } |
4058 | 3861 | ||
4059 | public void llMinEventDelay(double delay) | 3862 | public void llMinEventDelay(double delay) |
4060 | { | 3863 | { |
4061 | m_host.AddScriptLPS(1); | ||
4062 | try | 3864 | try |
4063 | { | 3865 | { |
4064 | m_ScriptEngine.SetMinEventDelay(m_item.ItemID, delay); | 3866 | m_ScriptEngine.SetMinEventDelay(m_item.ItemID, delay); |
@@ -4072,14 +3874,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4072 | 3874 | ||
4073 | public void llSoundPreload(string sound) | 3875 | public void llSoundPreload(string sound) |
4074 | { | 3876 | { |
4075 | m_host.AddScriptLPS(1); | ||
4076 | Deprecated("llSoundPreload", "Use llPreloadSound instead"); | 3877 | Deprecated("llSoundPreload", "Use llPreloadSound instead"); |
4077 | } | 3878 | } |
4078 | 3879 | ||
4079 | public void llRotLookAt(LSL_Rotation target, double strength, double damping) | 3880 | public void llRotLookAt(LSL_Rotation target, double strength, double damping) |
4080 | { | 3881 | { |
4081 | m_host.AddScriptLPS(1); | ||
4082 | |||
4083 | // Per discussion with Melanie, for non-physical objects llLookAt appears to simply | 3882 | // Per discussion with Melanie, for non-physical objects llLookAt appears to simply |
4084 | // set the rotation of the object, copy that behavior | 3883 | // set the rotation of the object, copy that behavior |
4085 | SceneObjectGroup sog = m_host.ParentGroup; | 3884 | SceneObjectGroup sog = m_host.ParentGroup; |
@@ -4098,7 +3897,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4098 | 3897 | ||
4099 | public LSL_Integer llStringLength(string str) | 3898 | public LSL_Integer llStringLength(string str) |
4100 | { | 3899 | { |
4101 | m_host.AddScriptLPS(1); | ||
4102 | if (str.Length > 0) | 3900 | if (str.Length > 0) |
4103 | { | 3901 | { |
4104 | return str.Length; | 3902 | return str.Length; |
@@ -4111,8 +3909,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4111 | 3909 | ||
4112 | public void llStartAnimation(string anim) | 3910 | public void llStartAnimation(string anim) |
4113 | { | 3911 | { |
4114 | m_host.AddScriptLPS(1); | ||
4115 | |||
4116 | if (m_item.PermsGranter == UUID.Zero) | 3912 | if (m_item.PermsGranter == UUID.Zero) |
4117 | return; | 3913 | return; |
4118 | 3914 | ||
@@ -4134,8 +3930,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4134 | 3930 | ||
4135 | public void llStopAnimation(string anim) | 3931 | public void llStopAnimation(string anim) |
4136 | { | 3932 | { |
4137 | m_host.AddScriptLPS(1); | ||
4138 | |||
4139 | if (m_item.PermsGranter == UUID.Zero) | 3933 | if (m_item.PermsGranter == UUID.Zero) |
4140 | return; | 3934 | return; |
4141 | 3935 | ||
@@ -4157,17 +3951,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4157 | 3951 | ||
4158 | public void llPointAt(LSL_Vector pos) | 3952 | public void llPointAt(LSL_Vector pos) |
4159 | { | 3953 | { |
4160 | m_host.AddScriptLPS(1); | ||
4161 | } | 3954 | } |
4162 | 3955 | ||
4163 | public void llStopPointAt() | 3956 | public void llStopPointAt() |
4164 | { | 3957 | { |
4165 | m_host.AddScriptLPS(1); | ||
4166 | } | 3958 | } |
4167 | 3959 | ||
4168 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) | 3960 | public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) |
4169 | { | 3961 | { |
4170 | m_host.AddScriptLPS(1); | ||
4171 | TargetOmega(m_host, axis, spinrate, gain); | 3962 | TargetOmega(m_host, axis, spinrate, gain); |
4172 | } | 3963 | } |
4173 | 3964 | ||
@@ -4181,7 +3972,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4181 | 3972 | ||
4182 | public LSL_Integer llGetStartParameter() | 3973 | public LSL_Integer llGetStartParameter() |
4183 | { | 3974 | { |
4184 | m_host.AddScriptLPS(1); | ||
4185 | return m_ScriptEngine.GetStartParameter(m_item.ItemID); | 3975 | return m_ScriptEngine.GetStartParameter(m_item.ItemID); |
4186 | } | 3976 | } |
4187 | 3977 | ||
@@ -4210,8 +4000,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4210 | if (m_item.PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) | 4000 | if (m_item.PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) |
4211 | llReleaseControls(); | 4001 | llReleaseControls(); |
4212 | 4002 | ||
4213 | m_host.AddScriptLPS(1); | ||
4214 | |||
4215 | int implicitPerms = 0; | 4003 | int implicitPerms = 0; |
4216 | 4004 | ||
4217 | if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.AttachedAvatar) | 4005 | if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.AttachedAvatar) |
@@ -4338,15 +4126,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4338 | 4126 | ||
4339 | public LSL_String llGetPermissionsKey() | 4127 | public LSL_String llGetPermissionsKey() |
4340 | { | 4128 | { |
4341 | m_host.AddScriptLPS(1); | ||
4342 | |||
4343 | return m_item.PermsGranter.ToString(); | 4129 | return m_item.PermsGranter.ToString(); |
4344 | } | 4130 | } |
4345 | 4131 | ||
4346 | public LSL_Integer llGetPermissions() | 4132 | public LSL_Integer llGetPermissions() |
4347 | { | 4133 | { |
4348 | m_host.AddScriptLPS(1); | ||
4349 | |||
4350 | int perms = m_item.PermsMask; | 4134 | int perms = m_item.PermsMask; |
4351 | 4135 | ||
4352 | if (m_automaticLinkPermission) | 4136 | if (m_automaticLinkPermission) |
@@ -4357,8 +4141,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4357 | 4141 | ||
4358 | public LSL_Integer llGetLinkNumber() | 4142 | public LSL_Integer llGetLinkNumber() |
4359 | { | 4143 | { |
4360 | m_host.AddScriptLPS(1); | ||
4361 | |||
4362 | if (m_host.ParentGroup.PrimCount > 1) | 4144 | if (m_host.ParentGroup.PrimCount > 1) |
4363 | { | 4145 | { |
4364 | return m_host.LinkNum; | 4146 | return m_host.LinkNum; |
@@ -4385,8 +4167,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4385 | 4167 | ||
4386 | public void llCreateLink(string target, int parent) | 4168 | public void llCreateLink(string target, int parent) |
4387 | { | 4169 | { |
4388 | m_host.AddScriptLPS(1); | ||
4389 | |||
4390 | UUID targetID; | 4170 | UUID targetID; |
4391 | 4171 | ||
4392 | if (!UUID.TryParse(target, out targetID)) | 4172 | if (!UUID.TryParse(target, out targetID)) |
@@ -4449,14 +4229,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4449 | 4229 | ||
4450 | if (client != null) | 4230 | if (client != null) |
4451 | parentPrim.SendPropertiesToClient(client); | 4231 | parentPrim.SendPropertiesToClient(client); |
4452 | |||
4453 | ScriptSleep(m_sleepMsOnCreateLink); | ||
4454 | } | 4232 | } |
4455 | 4233 | ||
4456 | public void llBreakLink(int linknum) | 4234 | public void llBreakLink(int linknum) |
4457 | { | 4235 | { |
4458 | m_host.AddScriptLPS(1); | ||
4459 | |||
4460 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 | 4236 | if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 |
4461 | && !m_automaticLinkPermission) | 4237 | && !m_automaticLinkPermission) |
4462 | { | 4238 | { |
@@ -4556,8 +4332,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4556 | 4332 | ||
4557 | public void llBreakAllLinks() | 4333 | public void llBreakAllLinks() |
4558 | { | 4334 | { |
4559 | m_host.AddScriptLPS(1); | ||
4560 | |||
4561 | TaskInventoryItem item = m_item; | 4335 | TaskInventoryItem item = m_item; |
4562 | 4336 | ||
4563 | if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 | 4337 | if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 |
@@ -4589,7 +4363,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4589 | 4363 | ||
4590 | public LSL_String llGetLinkKey(int linknum) | 4364 | public LSL_String llGetLinkKey(int linknum) |
4591 | { | 4365 | { |
4592 | m_host.AddScriptLPS(1); | ||
4593 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); | 4366 | SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); |
4594 | if (part != null) | 4367 | if (part != null) |
4595 | { | 4368 | { |
@@ -4655,8 +4428,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4655 | /// </remarks> | 4428 | /// </remarks> |
4656 | public LSL_String llGetLinkName(int linknum) | 4429 | public LSL_String llGetLinkName(int linknum) |
4657 | { | 4430 | { |
4658 | m_host.AddScriptLPS(1); | ||
4659 | |||
4660 | ISceneEntity entity = GetLinkEntity(m_host, linknum); | 4431 | ISceneEntity entity = GetLinkEntity(m_host, linknum); |
4661 | 4432 | ||
4662 | if (entity != null) | 4433 | if (entity != null) |
@@ -4667,7 +4438,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4667 | 4438 | ||
4668 | public LSL_Integer llGetInventoryNumber(int type) | 4439 | public LSL_Integer llGetInventoryNumber(int type) |
4669 | { | 4440 | { |
4670 | m_host.AddScriptLPS(1); | ||
4671 | int count = 0; | 4441 | int count = 0; |
4672 | 4442 | ||
4673 | m_host.TaskInventory.LockItemsForRead(true); | 4443 | m_host.TaskInventory.LockItemsForRead(true); |
@@ -4685,7 +4455,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4685 | 4455 | ||
4686 | public LSL_String llGetInventoryName(int type, int number) | 4456 | public LSL_String llGetInventoryName(int type, int number) |
4687 | { | 4457 | { |
4688 | m_host.AddScriptLPS(1); | ||
4689 | ArrayList keys = new ArrayList(); | 4458 | ArrayList keys = new ArrayList(); |
4690 | 4459 | ||
4691 | m_host.TaskInventory.LockItemsForRead(true); | 4460 | m_host.TaskInventory.LockItemsForRead(true); |
@@ -4712,15 +4481,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4712 | 4481 | ||
4713 | public LSL_Float llGetEnergy() | 4482 | public LSL_Float llGetEnergy() |
4714 | { | 4483 | { |
4715 | m_host.AddScriptLPS(1); | ||
4716 | // TODO: figure out real energy value | 4484 | // TODO: figure out real energy value |
4717 | return 1.0f; | 4485 | return 1.0f; |
4718 | } | 4486 | } |
4719 | 4487 | ||
4720 | public void llGiveInventory(string destination, string inventory) | 4488 | public void llGiveInventory(string destination, string inventory) |
4721 | { | 4489 | { |
4722 | m_host.AddScriptLPS(1); | ||
4723 | |||
4724 | UUID destId = UUID.Zero; | 4490 | UUID destId = UUID.Zero; |
4725 | 4491 | ||
4726 | if (!UUID.TryParse(destination, out destId)) | 4492 | if (!UUID.TryParse(destination, out destId)) |
@@ -4811,8 +4577,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4811 | [DebuggerNonUserCode] | 4577 | [DebuggerNonUserCode] |
4812 | public void llRemoveInventory(string name) | 4578 | public void llRemoveInventory(string name) |
4813 | { | 4579 | { |
4814 | m_host.AddScriptLPS(1); | ||
4815 | |||
4816 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); | 4580 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
4817 | 4581 | ||
4818 | if (item == null) | 4582 | if (item == null) |
@@ -4826,7 +4590,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4826 | 4590 | ||
4827 | public void llSetText(string text, LSL_Vector color, double alpha) | 4591 | public void llSetText(string text, LSL_Vector color, double alpha) |
4828 | { | 4592 | { |
4829 | m_host.AddScriptLPS(1); | ||
4830 | Vector3 av3 = Util.Clip(color, 0.0f, 1.0f); | 4593 | Vector3 av3 = Util.Clip(color, 0.0f, 1.0f); |
4831 | byte[] data; | 4594 | byte[] data; |
4832 | data = Util.StringToBytes256(text); | 4595 | data = Util.StringToBytes256(text); |
@@ -4836,13 +4599,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4836 | 4599 | ||
4837 | public LSL_Float llWater(LSL_Vector offset) | 4600 | public LSL_Float llWater(LSL_Vector offset) |
4838 | { | 4601 | { |
4839 | m_host.AddScriptLPS(1); | ||
4840 | return World.RegionInfo.RegionSettings.WaterHeight; | 4602 | return World.RegionInfo.RegionSettings.WaterHeight; |
4841 | } | 4603 | } |
4842 | 4604 | ||
4843 | public void llPassTouches(int pass) | 4605 | public void llPassTouches(int pass) |
4844 | { | 4606 | { |
4845 | m_host.AddScriptLPS(1); | ||
4846 | if (pass != 0) | 4607 | if (pass != 0) |
4847 | m_host.PassTouches = true; | 4608 | m_host.PassTouches = true; |
4848 | else | 4609 | else |
@@ -4851,8 +4612,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4851 | 4612 | ||
4852 | public LSL_String llRequestAgentData(string id, int data) | 4613 | public LSL_String llRequestAgentData(string id, int data) |
4853 | { | 4614 | { |
4854 | m_host.AddScriptLPS(1); | ||
4855 | |||
4856 | UUID uuid; | 4615 | UUID uuid; |
4857 | if (UUID.TryParse(id, out uuid)) | 4616 | if (UUID.TryParse(id, out uuid)) |
4858 | { | 4617 | { |
@@ -4957,7 +4716,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4957 | AsyncCommands. | 4716 | AsyncCommands. |
4958 | DataserverPlugin.DataserverReply(rq.ToString(), reply); | 4717 | DataserverPlugin.DataserverReply(rq.ToString(), reply); |
4959 | 4718 | ||
4960 | ScriptSleep(m_sleepMsOnRequestAgentData); | ||
4961 | return tid.ToString(); | 4719 | return tid.ToString(); |
4962 | } | 4720 | } |
4963 | else | 4721 | else |
@@ -4969,8 +4727,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
4969 | 4727 | ||
4970 | public LSL_String llRequestInventoryData(string name) | 4728 | public LSL_String llRequestInventoryData(string name) |
4971 | { | 4729 | { |
4972 | m_host.AddScriptLPS(1); | ||
4973 | |||
4974 | foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems()) | 4730 | foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems()) |
4975 | { | 4731 | { |
4976 | if (item.Type == 3 && item.Name == name) | 4732 | if (item.Type == 3 && item.Name == name) |
@@ -5007,13 +4763,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5007 | 4763 | ||
5008 | public void llSetDamage(double damage) | 4764 | public void llSetDamage(double damage) |
5009 | { | 4765 | { |
5010 | m_host.AddScriptLPS(1); | ||
5011 | m_host.ParentGroup.Damage = (float)damage; | 4766 | m_host.ParentGroup.Damage = (float)damage; |
5012 | } | 4767 | } |
5013 | 4768 | ||
5014 | public void llTeleportAgentHome(string agent) | 4769 | public void llTeleportAgentHome(string agent) |
5015 | { | 4770 | { |
5016 | m_host.AddScriptLPS(1); | ||
5017 | UUID agentId = new UUID(); | 4771 | UUID agentId = new UUID(); |
5018 | if (UUID.TryParse(agent, out agentId)) | 4772 | if (UUID.TryParse(agent, out agentId)) |
5019 | { | 4773 | { |
@@ -5046,7 +4800,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5046 | 4800 | ||
5047 | public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) | 4801 | public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) |
5048 | { | 4802 | { |
5049 | m_host.AddScriptLPS(1); | ||
5050 | UUID agentId = new UUID(); | 4803 | UUID agentId = new UUID(); |
5051 | 4804 | ||
5052 | if (UUID.TryParse(agent, out agentId)) | 4805 | if (UUID.TryParse(agent, out agentId)) |
@@ -5089,7 +4842,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5089 | 4842 | ||
5090 | public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global_coords, LSL_Vector targetPos, LSL_Vector targetLookAt) | 4843 | public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global_coords, LSL_Vector targetPos, LSL_Vector targetLookAt) |
5091 | { | 4844 | { |
5092 | m_host.AddScriptLPS(1); | ||
5093 | UUID agentId = new UUID(); | 4845 | UUID agentId = new UUID(); |
5094 | 4846 | ||
5095 | ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y); | 4847 | ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y); |
@@ -5154,7 +4906,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5154 | if (dm == null) | 4906 | if (dm == null) |
5155 | return; | 4907 | return; |
5156 | 4908 | ||
5157 | m_host.AddScriptLPS(1); | ||
5158 | UUID av = new UUID(); | 4909 | UUID av = new UUID(); |
5159 | if (!UUID.TryParse(agent,out av)) | 4910 | if (!UUID.TryParse(agent,out av)) |
5160 | { | 4911 | { |
@@ -5179,7 +4930,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5179 | 4930 | ||
5180 | public void llModifyLand(int action, int brush) | 4931 | public void llModifyLand(int action, int brush) |
5181 | { | 4932 | { |
5182 | m_host.AddScriptLPS(1); | ||
5183 | ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface<ITerrainModule>(); | 4933 | ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface<ITerrainModule>(); |
5184 | if (tm != null) | 4934 | if (tm != null) |
5185 | { | 4935 | { |
@@ -5189,8 +4939,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5189 | 4939 | ||
5190 | public void llCollisionSound(string impact_sound, double impact_volume) | 4940 | public void llCollisionSound(string impact_sound, double impact_volume) |
5191 | { | 4941 | { |
5192 | m_host.AddScriptLPS(1); | ||
5193 | |||
5194 | if(impact_sound == "") | 4942 | if(impact_sound == "") |
5195 | { | 4943 | { |
5196 | m_host.CollisionSoundVolume = (float)impact_volume; | 4944 | m_host.CollisionSoundVolume = (float)impact_volume; |
@@ -5217,7 +4965,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5217 | public LSL_String llGetAnimation(string id) | 4965 | public LSL_String llGetAnimation(string id) |
5218 | { | 4966 | { |
5219 | // This should only return a value if the avatar is in the same region | 4967 | // This should only return a value if the avatar is in the same region |
5220 | m_host.AddScriptLPS(1); | ||
5221 | UUID avatar = (UUID)id; | 4968 | UUID avatar = (UUID)id; |
5222 | ScenePresence presence = World.GetScenePresence(avatar); | 4969 | ScenePresence presence = World.GetScenePresence(avatar); |
5223 | if (presence == null) | 4970 | if (presence == null) |
@@ -5245,8 +4992,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5245 | 4992 | ||
5246 | public void llMessageLinked(int linknumber, int num, string msg, string id) | 4993 | public void llMessageLinked(int linknumber, int num, string msg, string id) |
5247 | { | 4994 | { |
5248 | m_host.AddScriptLPS(1); | ||
5249 | |||
5250 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 4995 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
5251 | 4996 | ||
5252 | UUID partItemID; | 4997 | UUID partItemID; |
@@ -5276,7 +5021,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5276 | 5021 | ||
5277 | public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) | 5022 | public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) |
5278 | { | 5023 | { |
5279 | m_host.AddScriptLPS(1); | ||
5280 | bool pushrestricted = World.RegionInfo.RegionSettings.RestrictPushing; | 5024 | bool pushrestricted = World.RegionInfo.RegionSettings.RestrictPushing; |
5281 | bool pushAllowed = false; | 5025 | bool pushAllowed = false; |
5282 | 5026 | ||
@@ -5443,7 +5187,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5443 | 5187 | ||
5444 | public void llPassCollisions(int pass) | 5188 | public void llPassCollisions(int pass) |
5445 | { | 5189 | { |
5446 | m_host.AddScriptLPS(1); | ||
5447 | if (pass == 0) | 5190 | if (pass == 0) |
5448 | { | 5191 | { |
5449 | m_host.PassCollisions = false; | 5192 | m_host.PassCollisions = false; |
@@ -5456,15 +5199,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5456 | 5199 | ||
5457 | public LSL_String llGetScriptName() | 5200 | public LSL_String llGetScriptName() |
5458 | { | 5201 | { |
5459 | m_host.AddScriptLPS(1); | ||
5460 | |||
5461 | return m_item.Name != null ? m_item.Name : String.Empty; | 5202 | return m_item.Name != null ? m_item.Name : String.Empty; |
5462 | } | 5203 | } |
5463 | 5204 | ||
5464 | public LSL_Integer llGetLinkNumberOfSides(int link) | 5205 | public LSL_Integer llGetLinkNumberOfSides(int link) |
5465 | { | 5206 | { |
5466 | m_host.AddScriptLPS(1); | ||
5467 | |||
5468 | SceneObjectPart linkedPart; | 5207 | SceneObjectPart linkedPart; |
5469 | 5208 | ||
5470 | if (link == ScriptBaseClass.LINK_ROOT) | 5209 | if (link == ScriptBaseClass.LINK_ROOT) |
@@ -5479,8 +5218,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5479 | 5218 | ||
5480 | public LSL_Integer llGetNumberOfSides() | 5219 | public LSL_Integer llGetNumberOfSides() |
5481 | { | 5220 | { |
5482 | m_host.AddScriptLPS(1); | ||
5483 | |||
5484 | return m_host.GetNumberOfSides(); | 5221 | return m_host.GetNumberOfSides(); |
5485 | } | 5222 | } |
5486 | 5223 | ||
@@ -5518,8 +5255,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5518 | // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) | 5255 | // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) |
5519 | public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle) | 5256 | public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle) |
5520 | { | 5257 | { |
5521 | m_host.AddScriptLPS(1); | ||
5522 | |||
5523 | double x, y, z, s, t; | 5258 | double x, y, z, s, t; |
5524 | 5259 | ||
5525 | s = Math.Cos(angle * 0.5); | 5260 | s = Math.Cos(angle * 0.5); |
@@ -5539,8 +5274,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5539 | /// <param name='rot'></param> | 5274 | /// <param name='rot'></param> |
5540 | public LSL_Vector llRot2Axis(LSL_Rotation rot) | 5275 | public LSL_Vector llRot2Axis(LSL_Rotation rot) |
5541 | { | 5276 | { |
5542 | m_host.AddScriptLPS(1); | ||
5543 | |||
5544 | rot.Normalize(); | 5277 | rot.Normalize(); |
5545 | 5278 | ||
5546 | double s = Math.Sqrt(1 - rot.s * rot.s); | 5279 | double s = Math.Sqrt(1 - rot.s * rot.s); |
@@ -5557,8 +5290,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5557 | // Returns the angle of a quaternion (see llRot2Axis for the axis) | 5290 | // Returns the angle of a quaternion (see llRot2Axis for the axis) |
5558 | public LSL_Float llRot2Angle(LSL_Rotation rot) | 5291 | public LSL_Float llRot2Angle(LSL_Rotation rot) |
5559 | { | 5292 | { |
5560 | m_host.AddScriptLPS(1); | ||
5561 | |||
5562 | rot.Normalize(); | 5293 | rot.Normalize(); |
5563 | 5294 | ||
5564 | double angle = 2 * Math.Acos(rot.s); | 5295 | double angle = 2 * Math.Acos(rot.s); |
@@ -5570,21 +5301,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5570 | 5301 | ||
5571 | public LSL_Float llAcos(double val) | 5302 | public LSL_Float llAcos(double val) |
5572 | { | 5303 | { |
5573 | m_host.AddScriptLPS(1); | ||
5574 | return (double)Math.Acos(val); | 5304 | return (double)Math.Acos(val); |
5575 | } | 5305 | } |
5576 | 5306 | ||
5577 | public LSL_Float llAsin(double val) | 5307 | public LSL_Float llAsin(double val) |
5578 | { | 5308 | { |
5579 | m_host.AddScriptLPS(1); | ||
5580 | return (double)Math.Asin(val); | 5309 | return (double)Math.Asin(val); |
5581 | } | 5310 | } |
5582 | 5311 | ||
5583 | // jcochran 5/jan/2012 | 5312 | // jcochran 5/jan/2012 |
5584 | public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b) | 5313 | public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b) |
5585 | { | 5314 | { |
5586 | m_host.AddScriptLPS(1); | ||
5587 | |||
5588 | double aa = (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s); | 5315 | double aa = (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s); |
5589 | double bb = (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s); | 5316 | double bb = (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s); |
5590 | double aa_bb = aa * bb; | 5317 | double aa_bb = aa * bb; |
@@ -5597,8 +5324,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5597 | 5324 | ||
5598 | public LSL_String llGetInventoryKey(string name) | 5325 | public LSL_String llGetInventoryKey(string name) |
5599 | { | 5326 | { |
5600 | m_host.AddScriptLPS(1); | ||
5601 | |||
5602 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); | 5327 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
5603 | 5328 | ||
5604 | if (item == null) | 5329 | if (item == null) |
@@ -5616,8 +5341,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5616 | 5341 | ||
5617 | public void llAllowInventoryDrop(int add) | 5342 | public void llAllowInventoryDrop(int add) |
5618 | { | 5343 | { |
5619 | m_host.AddScriptLPS(1); | ||
5620 | |||
5621 | if (add != 0) | 5344 | if (add != 0) |
5622 | m_host.ParentGroup.RootPart.AllowedDrop = true; | 5345 | m_host.ParentGroup.RootPart.AllowedDrop = true; |
5623 | else | 5346 | else |
@@ -5629,8 +5352,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5629 | 5352 | ||
5630 | public LSL_Vector llGetSunDirection() | 5353 | public LSL_Vector llGetSunDirection() |
5631 | { | 5354 | { |
5632 | m_host.AddScriptLPS(1); | ||
5633 | |||
5634 | LSL_Vector SunDoubleVector3; | 5355 | LSL_Vector SunDoubleVector3; |
5635 | Vector3 SunFloatVector3; | 5356 | Vector3 SunFloatVector3; |
5636 | 5357 | ||
@@ -5646,7 +5367,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5646 | 5367 | ||
5647 | public LSL_Vector llGetTextureOffset(int face) | 5368 | public LSL_Vector llGetTextureOffset(int face) |
5648 | { | 5369 | { |
5649 | m_host.AddScriptLPS(1); | ||
5650 | return GetTextureOffset(m_host, face); | 5370 | return GetTextureOffset(m_host, face); |
5651 | } | 5371 | } |
5652 | 5372 | ||
@@ -5673,7 +5393,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5673 | 5393 | ||
5674 | public LSL_Vector llGetTextureScale(int side) | 5394 | public LSL_Vector llGetTextureScale(int side) |
5675 | { | 5395 | { |
5676 | m_host.AddScriptLPS(1); | ||
5677 | Primitive.TextureEntry tex = m_host.Shape.Textures; | 5396 | Primitive.TextureEntry tex = m_host.Shape.Textures; |
5678 | LSL_Vector scale; | 5397 | LSL_Vector scale; |
5679 | if (side == -1) | 5398 | if (side == -1) |
@@ -5688,7 +5407,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5688 | 5407 | ||
5689 | public LSL_Float llGetTextureRot(int face) | 5408 | public LSL_Float llGetTextureRot(int face) |
5690 | { | 5409 | { |
5691 | m_host.AddScriptLPS(1); | ||
5692 | return GetTextureRot(m_host, face); | 5410 | return GetTextureRot(m_host, face); |
5693 | } | 5411 | } |
5694 | 5412 | ||
@@ -5711,13 +5429,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5711 | 5429 | ||
5712 | public LSL_Integer llSubStringIndex(string source, string pattern) | 5430 | public LSL_Integer llSubStringIndex(string source, string pattern) |
5713 | { | 5431 | { |
5714 | m_host.AddScriptLPS(1); | ||
5715 | return source.IndexOf(pattern); | 5432 | return source.IndexOf(pattern); |
5716 | } | 5433 | } |
5717 | 5434 | ||
5718 | public LSL_String llGetOwnerKey(string id) | 5435 | public LSL_String llGetOwnerKey(string id) |
5719 | { | 5436 | { |
5720 | m_host.AddScriptLPS(1); | ||
5721 | UUID key = new UUID(); | 5437 | UUID key = new UUID(); |
5722 | if (UUID.TryParse(id, out key)) | 5438 | if (UUID.TryParse(id, out key)) |
5723 | { | 5439 | { |
@@ -5742,15 +5458,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5742 | 5458 | ||
5743 | public LSL_Vector llGetCenterOfMass() | 5459 | public LSL_Vector llGetCenterOfMass() |
5744 | { | 5460 | { |
5745 | m_host.AddScriptLPS(1); | ||
5746 | |||
5747 | return new LSL_Vector(m_host.GetCenterOfMass()); | 5461 | return new LSL_Vector(m_host.GetCenterOfMass()); |
5748 | } | 5462 | } |
5749 | 5463 | ||
5750 | public LSL_List llListSort(LSL_List src, int stride, int ascending) | 5464 | public LSL_List llListSort(LSL_List src, int stride, int ascending) |
5751 | { | 5465 | { |
5752 | m_host.AddScriptLPS(1); | ||
5753 | |||
5754 | if (stride <= 0) | 5466 | if (stride <= 0) |
5755 | { | 5467 | { |
5756 | stride = 1; | 5468 | stride = 1; |
@@ -5760,14 +5472,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5760 | 5472 | ||
5761 | public LSL_Integer llGetListLength(LSL_List src) | 5473 | public LSL_Integer llGetListLength(LSL_List src) |
5762 | { | 5474 | { |
5763 | m_host.AddScriptLPS(1); | ||
5764 | |||
5765 | return src.Length; | 5475 | return src.Length; |
5766 | } | 5476 | } |
5767 | 5477 | ||
5768 | public LSL_Integer llList2Integer(LSL_List src, int index) | 5478 | public LSL_Integer llList2Integer(LSL_List src, int index) |
5769 | { | 5479 | { |
5770 | m_host.AddScriptLPS(1); | ||
5771 | if (index < 0) | 5480 | if (index < 0) |
5772 | index = src.Length + index; | 5481 | index = src.Length + index; |
5773 | 5482 | ||
@@ -5797,7 +5506,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5797 | 5506 | ||
5798 | public LSL_Float llList2Float(LSL_List src, int index) | 5507 | public LSL_Float llList2Float(LSL_List src, int index) |
5799 | { | 5508 | { |
5800 | m_host.AddScriptLPS(1); | ||
5801 | if (index < 0) | 5509 | if (index < 0) |
5802 | index = src.Length + index; | 5510 | index = src.Length + index; |
5803 | 5511 | ||
@@ -5852,7 +5560,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5852 | 5560 | ||
5853 | public LSL_String llList2String(LSL_List src, int index) | 5561 | public LSL_String llList2String(LSL_List src, int index) |
5854 | { | 5562 | { |
5855 | m_host.AddScriptLPS(1); | ||
5856 | if (index < 0) | 5563 | if (index < 0) |
5857 | index = src.Length + index; | 5564 | index = src.Length + index; |
5858 | 5565 | ||
@@ -5864,7 +5571,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5864 | 5571 | ||
5865 | public LSL_Key llList2Key(LSL_List src, int index) | 5572 | public LSL_Key llList2Key(LSL_List src, int index) |
5866 | { | 5573 | { |
5867 | m_host.AddScriptLPS(1); | ||
5868 | if (index < 0) | 5574 | if (index < 0) |
5869 | index = src.Length + index; | 5575 | index = src.Length + index; |
5870 | 5576 | ||
@@ -5892,7 +5598,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5892 | 5598 | ||
5893 | public LSL_Vector llList2Vector(LSL_List src, int index) | 5599 | public LSL_Vector llList2Vector(LSL_List src, int index) |
5894 | { | 5600 | { |
5895 | m_host.AddScriptLPS(1); | ||
5896 | if (index < 0) | 5601 | if (index < 0) |
5897 | index = src.Length + index; | 5602 | index = src.Length + index; |
5898 | 5603 | ||
@@ -5921,7 +5626,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5921 | 5626 | ||
5922 | public LSL_Rotation llList2Rot(LSL_List src, int index) | 5627 | public LSL_Rotation llList2Rot(LSL_List src, int index) |
5923 | { | 5628 | { |
5924 | m_host.AddScriptLPS(1); | ||
5925 | if (index < 0) | 5629 | if (index < 0) |
5926 | index = src.Length + index; | 5630 | index = src.Length + index; |
5927 | 5631 | ||
@@ -5948,7 +5652,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5948 | 5652 | ||
5949 | public LSL_List llList2List(LSL_List src, int start, int end) | 5653 | public LSL_List llList2List(LSL_List src, int start, int end) |
5950 | { | 5654 | { |
5951 | m_host.AddScriptLPS(1); | ||
5952 | return src.GetSublist(start, end); | 5655 | return src.GetSublist(start, end); |
5953 | } | 5656 | } |
5954 | 5657 | ||
@@ -5959,7 +5662,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5959 | 5662 | ||
5960 | public LSL_Integer llGetListEntryType(LSL_List src, int index) | 5663 | public LSL_Integer llGetListEntryType(LSL_List src, int index) |
5961 | { | 5664 | { |
5962 | m_host.AddScriptLPS(1); | ||
5963 | if (index < 0) | 5665 | if (index < 0) |
5964 | { | 5666 | { |
5965 | index = src.Length + index; | 5667 | index = src.Length + index; |
@@ -6003,8 +5705,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6003 | /// </summary> | 5705 | /// </summary> |
6004 | public LSL_String llList2CSV(LSL_List src) | 5706 | public LSL_String llList2CSV(LSL_List src) |
6005 | { | 5707 | { |
6006 | m_host.AddScriptLPS(1); | ||
6007 | |||
6008 | return string.Join(", ", | 5708 | return string.Join(", ", |
6009 | (new List<object>(src.Data)).ConvertAll<string>(o => | 5709 | (new List<object>(src.Data)).ConvertAll<string>(o => |
6010 | { | 5710 | { |
@@ -6028,8 +5728,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6028 | int start = 0; | 5728 | int start = 0; |
6029 | int length = 0; | 5729 | int length = 0; |
6030 | 5730 | ||
6031 | m_host.AddScriptLPS(1); | ||
6032 | |||
6033 | for (int i = 0; i < src.Length; i++) | 5731 | for (int i = 0; i < src.Length; i++) |
6034 | { | 5732 | { |
6035 | switch (src[i]) | 5733 | switch (src[i]) |
@@ -6085,8 +5783,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6085 | int chunkk; | 5783 | int chunkk; |
6086 | int[] chunks; | 5784 | int[] chunks; |
6087 | 5785 | ||
6088 | m_host.AddScriptLPS(1); | ||
6089 | |||
6090 | if (stride <= 0) | 5786 | if (stride <= 0) |
6091 | { | 5787 | { |
6092 | stride = 1; | 5788 | stride = 1; |
@@ -6157,8 +5853,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6157 | int[] ei = new int[2]; | 5853 | int[] ei = new int[2]; |
6158 | bool twopass = false; | 5854 | bool twopass = false; |
6159 | 5855 | ||
6160 | m_host.AddScriptLPS(1); | ||
6161 | |||
6162 | // First step is always to deal with negative indices | 5856 | // First step is always to deal with negative indices |
6163 | 5857 | ||
6164 | if (start < 0) | 5858 | if (start < 0) |
@@ -6238,8 +5932,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6238 | 5932 | ||
6239 | public LSL_Integer llGetRegionAgentCount() | 5933 | public LSL_Integer llGetRegionAgentCount() |
6240 | { | 5934 | { |
6241 | m_host.AddScriptLPS(1); | ||
6242 | |||
6243 | int count = 0; | 5935 | int count = 0; |
6244 | World.ForEachRootScenePresence(delegate(ScenePresence sp) { | 5936 | World.ForEachRootScenePresence(delegate(ScenePresence sp) { |
6245 | count++; | 5937 | count++; |
@@ -6250,13 +5942,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6250 | 5942 | ||
6251 | public LSL_Vector llGetRegionCorner() | 5943 | public LSL_Vector llGetRegionCorner() |
6252 | { | 5944 | { |
6253 | m_host.AddScriptLPS(1); | ||
6254 | return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); | 5945 | return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); |
6255 | } | 5946 | } |
6256 | 5947 | ||
6257 | public LSL_String llGetEnv(LSL_String name) | 5948 | public LSL_String llGetEnv(LSL_String name) |
6258 | { | 5949 | { |
6259 | m_host.AddScriptLPS(1); | ||
6260 | if (name == "agent_limit") | 5950 | if (name == "agent_limit") |
6261 | { | 5951 | { |
6262 | return World.RegionInfo.RegionSettings.AgentLimit.ToString(); | 5952 | return World.RegionInfo.RegionSettings.AgentLimit.ToString(); |
@@ -6340,8 +6030,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6340 | LSL_List pref; | 6030 | LSL_List pref; |
6341 | LSL_List suff; | 6031 | LSL_List suff; |
6342 | 6032 | ||
6343 | m_host.AddScriptLPS(1); | ||
6344 | |||
6345 | if (index < 0) | 6033 | if (index < 0) |
6346 | { | 6034 | { |
6347 | index = index+dest.Length; | 6035 | index = index+dest.Length; |
@@ -6394,8 +6082,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6394 | int index = -1; | 6082 | int index = -1; |
6395 | int length = src.Length - test.Length + 1; | 6083 | int length = src.Length - test.Length + 1; |
6396 | 6084 | ||
6397 | m_host.AddScriptLPS(1); | ||
6398 | |||
6399 | // If either list is empty, do not match | 6085 | // If either list is empty, do not match |
6400 | if (src.Length != 0 && test.Length != 0) | 6086 | if (src.Length != 0 && test.Length != 0) |
6401 | { | 6087 | { |
@@ -6435,19 +6121,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6435 | 6121 | ||
6436 | public LSL_String llGetObjectName() | 6122 | public LSL_String llGetObjectName() |
6437 | { | 6123 | { |
6438 | m_host.AddScriptLPS(1); | ||
6439 | return m_host.Name !=null ? m_host.Name : String.Empty; | 6124 | return m_host.Name !=null ? m_host.Name : String.Empty; |
6440 | } | 6125 | } |
6441 | 6126 | ||
6442 | public void llSetObjectName(string name) | 6127 | public void llSetObjectName(string name) |
6443 | { | 6128 | { |
6444 | m_host.AddScriptLPS(1); | ||
6445 | m_host.Name = name != null ? name : String.Empty; | 6129 | m_host.Name = name != null ? name : String.Empty; |
6446 | } | 6130 | } |
6447 | 6131 | ||
6448 | public LSL_String llGetDate() | 6132 | public LSL_String llGetDate() |
6449 | { | 6133 | { |
6450 | m_host.AddScriptLPS(1); | ||
6451 | DateTime date = DateTime.Now.ToUniversalTime(); | 6134 | DateTime date = DateTime.Now.ToUniversalTime(); |
6452 | string result = date.ToString("yyyy-MM-dd"); | 6135 | string result = date.ToString("yyyy-MM-dd"); |
6453 | return result; | 6136 | return result; |
@@ -6455,8 +6138,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6455 | 6138 | ||
6456 | public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir) | 6139 | public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir) |
6457 | { | 6140 | { |
6458 | m_host.AddScriptLPS(1); | ||
6459 | |||
6460 | if(dir.x == 0 && dir.y == 0) | 6141 | if(dir.x == 0 && dir.y == 0) |
6461 | return 1; // SL wiki | 6142 | return 1; // SL wiki |
6462 | 6143 | ||
@@ -6522,8 +6203,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6522 | /// </summary> | 6203 | /// </summary> |
6523 | public LSL_Integer llGetAgentInfo(string id) | 6204 | public LSL_Integer llGetAgentInfo(string id) |
6524 | { | 6205 | { |
6525 | m_host.AddScriptLPS(1); | ||
6526 | |||
6527 | UUID key = new UUID(); | 6206 | UUID key = new UUID(); |
6528 | if (!UUID.TryParse(id, out key)) | 6207 | if (!UUID.TryParse(id, out key)) |
6529 | { | 6208 | { |
@@ -6630,7 +6309,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6630 | public LSL_String llGetAgentLanguage(string id) | 6309 | public LSL_String llGetAgentLanguage(string id) |
6631 | { | 6310 | { |
6632 | // This should only return a value if the avatar is in the same region, but eh. idc. | 6311 | // This should only return a value if the avatar is in the same region, but eh. idc. |
6633 | m_host.AddScriptLPS(1); | ||
6634 | if (World.AgentPreferencesService == null) | 6312 | if (World.AgentPreferencesService == null) |
6635 | { | 6313 | { |
6636 | Error("llGetAgentLanguage", "No AgentPreferencesService present"); | 6314 | Error("llGetAgentLanguage", "No AgentPreferencesService present"); |
@@ -6657,8 +6335,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6657 | /// </summary> | 6335 | /// </summary> |
6658 | public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) | 6336 | public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) |
6659 | { | 6337 | { |
6660 | m_host.AddScriptLPS(1); | ||
6661 | |||
6662 | // do our bit masks part | 6338 | // do our bit masks part |
6663 | bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0; | 6339 | bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0; |
6664 | 6340 | ||
@@ -6740,20 +6416,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6740 | 6416 | ||
6741 | public void llAdjustSoundVolume(double volume) | 6417 | public void llAdjustSoundVolume(double volume) |
6742 | { | 6418 | { |
6743 | m_host.AddScriptLPS(1); | ||
6744 | m_host.AdjustSoundGain(volume); | 6419 | m_host.AdjustSoundGain(volume); |
6745 | ScriptSleep(m_sleepMsOnAdjustSoundVolume); | 6420 | ScriptSleep(m_sleepMsOnAdjustSoundVolume); |
6746 | } | 6421 | } |
6747 | 6422 | ||
6748 | public void llSetSoundRadius(double radius) | 6423 | public void llSetSoundRadius(double radius) |
6749 | { | 6424 | { |
6750 | m_host.AddScriptLPS(1); | ||
6751 | m_host.SoundRadius = radius; | 6425 | m_host.SoundRadius = radius; |
6752 | } | 6426 | } |
6753 | 6427 | ||
6754 | public LSL_String llKey2Name(string id) | 6428 | public LSL_String llKey2Name(string id) |
6755 | { | 6429 | { |
6756 | m_host.AddScriptLPS(1); | ||
6757 | UUID key = new UUID(); | 6430 | UUID key = new UUID(); |
6758 | if (UUID.TryParse(id,out key)) | 6431 | if (UUID.TryParse(id,out key)) |
6759 | { | 6432 | { |
@@ -6777,15 +6450,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6777 | 6450 | ||
6778 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) | 6451 | public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) |
6779 | { | 6452 | { |
6780 | m_host.AddScriptLPS(1); | ||
6781 | |||
6782 | SetTextureAnim(m_host, mode, face, sizex, sizey, start, length, rate); | 6453 | SetTextureAnim(m_host, mode, face, sizex, sizey, start, length, rate); |
6783 | } | 6454 | } |
6784 | 6455 | ||
6785 | public void llSetLinkTextureAnim(int linknumber, int mode, int face, int sizex, int sizey, double start, double length, double rate) | 6456 | public void llSetLinkTextureAnim(int linknumber, int mode, int face, int sizex, int sizey, double start, double length, double rate) |
6786 | { | 6457 | { |
6787 | m_host.AddScriptLPS(1); | ||
6788 | |||
6789 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 6458 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
6790 | 6459 | ||
6791 | try | 6460 | try |
@@ -6825,7 +6494,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6825 | public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, | 6494 | public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, |
6826 | LSL_Vector bottom_south_west) | 6495 | LSL_Vector bottom_south_west) |
6827 | { | 6496 | { |
6828 | m_host.AddScriptLPS(1); | ||
6829 | if (m_SoundModule != null) | 6497 | if (m_SoundModule != null) |
6830 | { | 6498 | { |
6831 | m_SoundModule.TriggerSoundLimited(m_host.UUID, | 6499 | m_SoundModule.TriggerSoundLimited(m_host.UUID, |
@@ -6836,7 +6504,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6836 | 6504 | ||
6837 | public void llEjectFromLand(string pest) | 6505 | public void llEjectFromLand(string pest) |
6838 | { | 6506 | { |
6839 | m_host.AddScriptLPS(1); | ||
6840 | UUID agentID = new UUID(); | 6507 | UUID agentID = new UUID(); |
6841 | if (UUID.TryParse(pest, out agentID)) | 6508 | if (UUID.TryParse(pest, out agentID)) |
6842 | { | 6509 | { |
@@ -6866,7 +6533,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6866 | 6533 | ||
6867 | public LSL_Integer llOverMyLand(string id) | 6534 | public LSL_Integer llOverMyLand(string id) |
6868 | { | 6535 | { |
6869 | m_host.AddScriptLPS(1); | ||
6870 | UUID key = new UUID(); | 6536 | UUID key = new UUID(); |
6871 | if (UUID.TryParse(id, out key)) | 6537 | if (UUID.TryParse(id, out key)) |
6872 | { | 6538 | { |
@@ -6893,7 +6559,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6893 | 6559 | ||
6894 | public LSL_String llGetLandOwnerAt(LSL_Vector pos) | 6560 | public LSL_String llGetLandOwnerAt(LSL_Vector pos) |
6895 | { | 6561 | { |
6896 | m_host.AddScriptLPS(1); | ||
6897 | ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | 6562 | ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
6898 | if (land == null) | 6563 | if (land == null) |
6899 | return UUID.Zero.ToString(); | 6564 | return UUID.Zero.ToString(); |
@@ -6907,7 +6572,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6907 | /// </summary> | 6572 | /// </summary> |
6908 | public LSL_Vector llGetAgentSize(string id) | 6573 | public LSL_Vector llGetAgentSize(string id) |
6909 | { | 6574 | { |
6910 | m_host.AddScriptLPS(1); | ||
6911 | ScenePresence avatar = World.GetScenePresence((UUID)id); | 6575 | ScenePresence avatar = World.GetScenePresence((UUID)id); |
6912 | LSL_Vector agentSize; | 6576 | LSL_Vector agentSize; |
6913 | if (avatar == null || avatar.IsChildAgent) // Fail if not in the same region | 6577 | if (avatar == null || avatar.IsChildAgent) // Fail if not in the same region |
@@ -6925,7 +6589,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6925 | 6589 | ||
6926 | public LSL_Integer llSameGroup(string id) | 6590 | public LSL_Integer llSameGroup(string id) |
6927 | { | 6591 | { |
6928 | m_host.AddScriptLPS(1); | ||
6929 | UUID uuid = new UUID(); | 6592 | UUID uuid = new UUID(); |
6930 | if (!UUID.TryParse(id, out uuid)) | 6593 | if (!UUID.TryParse(id, out uuid)) |
6931 | return new LSL_Integer(0); | 6594 | return new LSL_Integer(0); |
@@ -6973,8 +6636,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
6973 | 6636 | ||
6974 | public void llUnSit(string id) | 6637 | public void llUnSit(string id) |
6975 | { | 6638 | { |
6976 | m_host.AddScriptLPS(1); | ||
6977 | |||
6978 | UUID key = new UUID(); | 6639 | UUID key = new UUID(); |
6979 | if (UUID.TryParse(id, out key)) | 6640 | if (UUID.TryParse(id, out key)) |
6980 | { | 6641 | { |
@@ -7014,8 +6675,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7014 | 6675 | ||
7015 | public LSL_Vector llGroundSlope(LSL_Vector offset) | 6676 | public LSL_Vector llGroundSlope(LSL_Vector offset) |
7016 | { | 6677 | { |
7017 | m_host.AddScriptLPS(1); | ||
7018 | |||
7019 | //Get the slope normal. This gives us the equation of the plane tangent to the slope. | 6678 | //Get the slope normal. This gives us the equation of the plane tangent to the slope. |
7020 | LSL_Vector vsn = llGroundNormal(offset); | 6679 | LSL_Vector vsn = llGroundNormal(offset); |
7021 | 6680 | ||
@@ -7035,7 +6694,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7035 | 6694 | ||
7036 | public LSL_Vector llGroundNormal(LSL_Vector offset) | 6695 | public LSL_Vector llGroundNormal(LSL_Vector offset) |
7037 | { | 6696 | { |
7038 | m_host.AddScriptLPS(1); | ||
7039 | Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; | 6697 | Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; |
7040 | // Clamp to valid position | 6698 | // Clamp to valid position |
7041 | if (pos.X < 0) | 6699 | if (pos.X < 0) |
@@ -7085,21 +6743,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7085 | 6743 | ||
7086 | public LSL_Vector llGroundContour(LSL_Vector offset) | 6744 | public LSL_Vector llGroundContour(LSL_Vector offset) |
7087 | { | 6745 | { |
7088 | m_host.AddScriptLPS(1); | ||
7089 | LSL_Vector x = llGroundSlope(offset); | 6746 | LSL_Vector x = llGroundSlope(offset); |
7090 | return new LSL_Vector(-x.y, x.x, 0.0); | 6747 | return new LSL_Vector(-x.y, x.x, 0.0); |
7091 | } | 6748 | } |
7092 | 6749 | ||
7093 | public LSL_Integer llGetAttached() | 6750 | public LSL_Integer llGetAttached() |
7094 | { | 6751 | { |
7095 | m_host.AddScriptLPS(1); | ||
7096 | return m_host.ParentGroup.AttachmentPoint; | 6752 | return m_host.ParentGroup.AttachmentPoint; |
7097 | } | 6753 | } |
7098 | 6754 | ||
7099 | public LSL_List llGetAttachedList(string id) | 6755 | public LSL_List llGetAttachedList(string id) |
7100 | { | 6756 | { |
7101 | m_host.AddScriptLPS(1); | ||
7102 | |||
7103 | ScenePresence av = World.GetScenePresence((UUID)id); | 6757 | ScenePresence av = World.GetScenePresence((UUID)id); |
7104 | 6758 | ||
7105 | if (av == null || av.IsDeleted) | 6759 | if (av == null || av.IsDeleted) |
@@ -7125,14 +6779,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7125 | 6779 | ||
7126 | public virtual LSL_Integer llGetFreeMemory() | 6780 | public virtual LSL_Integer llGetFreeMemory() |
7127 | { | 6781 | { |
7128 | m_host.AddScriptLPS(1); | ||
7129 | // Make scripts designed for Mono happy | 6782 | // Make scripts designed for Mono happy |
7130 | return 65536; | 6783 | return 65536; |
7131 | } | 6784 | } |
7132 | 6785 | ||
7133 | public LSL_Integer llGetFreeURLs() | 6786 | public LSL_Integer llGetFreeURLs() |
7134 | { | 6787 | { |
7135 | m_host.AddScriptLPS(1); | ||
7136 | if (m_UrlModule != null) | 6788 | if (m_UrlModule != null) |
7137 | return new LSL_Integer(m_UrlModule.GetFreeUrls()); | 6789 | return new LSL_Integer(m_UrlModule.GetFreeUrls()); |
7138 | return new LSL_Integer(0); | 6790 | return new LSL_Integer(0); |
@@ -7141,13 +6793,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7141 | 6793 | ||
7142 | public LSL_String llGetRegionName() | 6794 | public LSL_String llGetRegionName() |
7143 | { | 6795 | { |
7144 | m_host.AddScriptLPS(1); | ||
7145 | return World.RegionInfo.RegionName; | 6796 | return World.RegionInfo.RegionName; |
7146 | } | 6797 | } |
7147 | 6798 | ||
7148 | public LSL_Float llGetRegionTimeDilation() | 6799 | public LSL_Float llGetRegionTimeDilation() |
7149 | { | 6800 | { |
7150 | m_host.AddScriptLPS(1); | ||
7151 | return (double)World.TimeDilation; | 6801 | return (double)World.TimeDilation; |
7152 | } | 6802 | } |
7153 | 6803 | ||
@@ -7156,7 +6806,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7156 | /// </summary> | 6806 | /// </summary> |
7157 | public LSL_Float llGetRegionFPS() | 6807 | public LSL_Float llGetRegionFPS() |
7158 | { | 6808 | { |
7159 | m_host.AddScriptLPS(1); | ||
7160 | return World.StatsReporter.LastReportedSimFPS; | 6809 | return World.StatsReporter.LastReportedSimFPS; |
7161 | } | 6810 | } |
7162 | 6811 | ||
@@ -7234,8 +6883,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7234 | 6883 | ||
7235 | public void llLinkParticleSystem(int linknumber, LSL_List rules) | 6884 | public void llLinkParticleSystem(int linknumber, LSL_List rules) |
7236 | { | 6885 | { |
7237 | m_host.AddScriptLPS(1); | ||
7238 | |||
7239 | List<SceneObjectPart> parts = GetLinkParts(linknumber); | 6886 | List<SceneObjectPart> parts = GetLinkParts(linknumber); |
7240 | 6887 | ||
7241 | foreach (SceneObjectPart part in parts) | 6888 | foreach (SceneObjectPart part in parts) |
@@ -7246,7 +6893,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7246 | 6893 | ||
7247 | public void llParticleSystem(LSL_List rules) | 6894 | public void llParticleSystem(LSL_List rules) |
7248 | { | 6895 | { |
7249 | m_host.AddScriptLPS(1); | ||
7250 | SetParticleSystem(m_host, rules, "llParticleSystem"); | 6896 | SetParticleSystem(m_host, rules, "llParticleSystem"); |
7251 | } | 6897 | } |
7252 | 6898 | ||
@@ -7663,7 +7309,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7663 | 7309 | ||
7664 | public void llGroundRepel(double height, int water, double tau) | 7310 | public void llGroundRepel(double height, int water, double tau) |
7665 | { | 7311 | { |
7666 | m_host.AddScriptLPS(1); | ||
7667 | if (m_host.PhysActor != null) | 7312 | if (m_host.PhysActor != null) |
7668 | { | 7313 | { |
7669 | float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0)); | 7314 | float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0)); |
@@ -7688,8 +7333,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7688 | 7333 | ||
7689 | public void llGiveInventoryList(string destination, string category, LSL_List inventory) | 7334 | public void llGiveInventoryList(string destination, string category, LSL_List inventory) |
7690 | { | 7335 | { |
7691 | m_host.AddScriptLPS(1); | ||
7692 | |||
7693 | UUID destID; | 7336 | UUID destID; |
7694 | if (!UUID.TryParse(destination, out destID)) | 7337 | if (!UUID.TryParse(destination, out destID)) |
7695 | return; | 7338 | return; |
@@ -7743,8 +7386,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7743 | 7386 | ||
7744 | public void llSetVehicleType(int type) | 7387 | public void llSetVehicleType(int type) |
7745 | { | 7388 | { |
7746 | m_host.AddScriptLPS(1); | ||
7747 | |||
7748 | if (!m_host.ParentGroup.IsDeleted) | 7389 | if (!m_host.ParentGroup.IsDeleted) |
7749 | { | 7390 | { |
7750 | m_host.ParentGroup.RootPart.SetVehicleType(type); | 7391 | m_host.ParentGroup.RootPart.SetVehicleType(type); |
@@ -7755,8 +7396,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7755 | //CFK 9/28: so these are not complete yet. | 7396 | //CFK 9/28: so these are not complete yet. |
7756 | public void llSetVehicleFloatParam(int param, LSL_Float value) | 7397 | public void llSetVehicleFloatParam(int param, LSL_Float value) |
7757 | { | 7398 | { |
7758 | m_host.AddScriptLPS(1); | ||
7759 | |||
7760 | if (!m_host.ParentGroup.IsDeleted) | 7399 | if (!m_host.ParentGroup.IsDeleted) |
7761 | { | 7400 | { |
7762 | m_host.ParentGroup.RootPart.SetVehicleFloatParam(param, (float)value); | 7401 | m_host.ParentGroup.RootPart.SetVehicleFloatParam(param, (float)value); |
@@ -7767,8 +7406,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7767 | //CFK 9/28: so these are not complete yet. | 7406 | //CFK 9/28: so these are not complete yet. |
7768 | public void llSetVehicleVectorParam(int param, LSL_Vector vec) | 7407 | public void llSetVehicleVectorParam(int param, LSL_Vector vec) |
7769 | { | 7408 | { |
7770 | m_host.AddScriptLPS(1); | ||
7771 | |||
7772 | if (!m_host.ParentGroup.IsDeleted) | 7409 | if (!m_host.ParentGroup.IsDeleted) |
7773 | { | 7410 | { |
7774 | m_host.ParentGroup.RootPart.SetVehicleVectorParam(param, vec); | 7411 | m_host.ParentGroup.RootPart.SetVehicleVectorParam(param, vec); |
@@ -7779,8 +7416,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7779 | //CFK 9/28: so these are not complete yet. | 7416 | //CFK 9/28: so these are not complete yet. |
7780 | public void llSetVehicleRotationParam(int param, LSL_Rotation rot) | 7417 | public void llSetVehicleRotationParam(int param, LSL_Rotation rot) |
7781 | { | 7418 | { |
7782 | m_host.AddScriptLPS(1); | ||
7783 | |||
7784 | if (!m_host.ParentGroup.IsDeleted) | 7419 | if (!m_host.ParentGroup.IsDeleted) |
7785 | { | 7420 | { |
7786 | m_host.ParentGroup.RootPart.SetVehicleRotationParam(param, rot); | 7421 | m_host.ParentGroup.RootPart.SetVehicleRotationParam(param, rot); |
@@ -7789,8 +7424,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7789 | 7424 | ||
7790 | public void llSetVehicleFlags(int flags) | 7425 | public void llSetVehicleFlags(int flags) |
7791 | { | 7426 | { |
7792 | m_host.AddScriptLPS(1); | ||
7793 | |||
7794 | if (!m_host.ParentGroup.IsDeleted) | 7427 | if (!m_host.ParentGroup.IsDeleted) |
7795 | { | 7428 | { |
7796 | m_host.ParentGroup.RootPart.SetVehicleFlags(flags, false); | 7429 | m_host.ParentGroup.RootPart.SetVehicleFlags(flags, false); |
@@ -7799,8 +7432,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7799 | 7432 | ||
7800 | public void llRemoveVehicleFlags(int flags) | 7433 | public void llRemoveVehicleFlags(int flags) |
7801 | { | 7434 | { |
7802 | m_host.AddScriptLPS(1); | ||
7803 | |||
7804 | if (!m_host.ParentGroup.IsDeleted) | 7435 | if (!m_host.ParentGroup.IsDeleted) |
7805 | { | 7436 | { |
7806 | m_host.ParentGroup.RootPart.SetVehicleFlags(flags, true); | 7437 | m_host.ParentGroup.RootPart.SetVehicleFlags(flags, true); |
@@ -7820,13 +7451,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7820 | 7451 | ||
7821 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) | 7452 | public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) |
7822 | { | 7453 | { |
7823 | m_host.AddScriptLPS(1); | ||
7824 | SitTarget(m_host, offset, rot); | 7454 | SitTarget(m_host, offset, rot); |
7825 | } | 7455 | } |
7826 | 7456 | ||
7827 | public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) | 7457 | public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) |
7828 | { | 7458 | { |
7829 | m_host.AddScriptLPS(1); | ||
7830 | if (link == ScriptBaseClass.LINK_ROOT) | 7459 | if (link == ScriptBaseClass.LINK_ROOT) |
7831 | SitTarget(m_host.ParentGroup.RootPart, offset, rot); | 7460 | SitTarget(m_host.ParentGroup.RootPart, offset, rot); |
7832 | else if (link == ScriptBaseClass.LINK_THIS) | 7461 | else if (link == ScriptBaseClass.LINK_THIS) |
@@ -7843,14 +7472,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7843 | 7472 | ||
7844 | public LSL_String llAvatarOnSitTarget() | 7473 | public LSL_String llAvatarOnSitTarget() |
7845 | { | 7474 | { |
7846 | m_host.AddScriptLPS(1); | ||
7847 | return m_host.SitTargetAvatar.ToString(); | 7475 | return m_host.SitTargetAvatar.ToString(); |
7848 | } | 7476 | } |
7849 | 7477 | ||
7850 | // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget | 7478 | // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget |
7851 | public LSL_String llAvatarOnLinkSitTarget(int linknum) | 7479 | public LSL_String llAvatarOnLinkSitTarget(int linknum) |
7852 | { | 7480 | { |
7853 | m_host.AddScriptLPS(1); | ||
7854 | if(linknum == ScriptBaseClass.LINK_SET || | 7481 | if(linknum == ScriptBaseClass.LINK_SET || |
7855 | linknum == ScriptBaseClass.LINK_ALL_CHILDREN || | 7482 | linknum == ScriptBaseClass.LINK_ALL_CHILDREN || |
7856 | linknum == ScriptBaseClass.LINK_ALL_OTHERS || | 7483 | linknum == ScriptBaseClass.LINK_ALL_OTHERS || |
@@ -7866,7 +7493,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7866 | 7493 | ||
7867 | public void llAddToLandPassList(string avatar, double hours) | 7494 | public void llAddToLandPassList(string avatar, double hours) |
7868 | { | 7495 | { |
7869 | m_host.AddScriptLPS(1); | ||
7870 | UUID key; | 7496 | UUID key; |
7871 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 7497 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
7872 | 7498 | ||
@@ -7903,24 +7529,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7903 | World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); | 7529 | World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); |
7904 | } | 7530 | } |
7905 | } | 7531 | } |
7906 | ScriptSleep(m_sleepMsOnAddToLandPassList); | ||
7907 | } | 7532 | } |
7908 | 7533 | ||
7909 | public void llSetTouchText(string text) | 7534 | public void llSetTouchText(string text) |
7910 | { | 7535 | { |
7911 | m_host.AddScriptLPS(1); | ||
7912 | m_host.TouchName = text; | 7536 | m_host.TouchName = text; |
7913 | } | 7537 | } |
7914 | 7538 | ||
7915 | public void llSetSitText(string text) | 7539 | public void llSetSitText(string text) |
7916 | { | 7540 | { |
7917 | m_host.AddScriptLPS(1); | ||
7918 | m_host.SitName = text; | 7541 | m_host.SitName = text; |
7919 | } | 7542 | } |
7920 | 7543 | ||
7921 | public void llSetCameraEyeOffset(LSL_Vector offset) | 7544 | public void llSetCameraEyeOffset(LSL_Vector offset) |
7922 | { | 7545 | { |
7923 | m_host.AddScriptLPS(1); | ||
7924 | m_host.SetCameraEyeOffset(offset); | 7546 | m_host.SetCameraEyeOffset(offset); |
7925 | 7547 | ||
7926 | if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) | 7548 | if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) |
@@ -7929,7 +7551,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7929 | 7551 | ||
7930 | public void llSetCameraAtOffset(LSL_Vector offset) | 7552 | public void llSetCameraAtOffset(LSL_Vector offset) |
7931 | { | 7553 | { |
7932 | m_host.AddScriptLPS(1); | ||
7933 | m_host.SetCameraAtOffset(offset); | 7554 | m_host.SetCameraAtOffset(offset); |
7934 | 7555 | ||
7935 | if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) | 7556 | if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) |
@@ -7938,8 +7559,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7938 | 7559 | ||
7939 | public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) | 7560 | public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) |
7940 | { | 7561 | { |
7941 | m_host.AddScriptLPS(1); | ||
7942 | |||
7943 | if (link == ScriptBaseClass.LINK_SET || | 7562 | if (link == ScriptBaseClass.LINK_SET || |
7944 | link == ScriptBaseClass.LINK_ALL_CHILDREN || | 7563 | link == ScriptBaseClass.LINK_ALL_CHILDREN || |
7945 | link == ScriptBaseClass.LINK_ALL_OTHERS) return; | 7564 | link == ScriptBaseClass.LINK_ALL_OTHERS) return; |
@@ -7968,7 +7587,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7968 | 7587 | ||
7969 | public LSL_String llDumpList2String(LSL_List src, string seperator) | 7588 | public LSL_String llDumpList2String(LSL_List src, string seperator) |
7970 | { | 7589 | { |
7971 | m_host.AddScriptLPS(1); | ||
7972 | if (src.Length == 0) | 7590 | if (src.Length == 0) |
7973 | { | 7591 | { |
7974 | return String.Empty; | 7592 | return String.Empty; |
@@ -7984,7 +7602,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7984 | 7602 | ||
7985 | public LSL_Integer llScriptDanger(LSL_Vector pos) | 7603 | public LSL_Integer llScriptDanger(LSL_Vector pos) |
7986 | { | 7604 | { |
7987 | m_host.AddScriptLPS(1); | ||
7988 | bool result = World.LSLScriptDanger(m_host, pos); | 7605 | bool result = World.LSLScriptDanger(m_host, pos); |
7989 | if (result) | 7606 | if (result) |
7990 | { | 7607 | { |
@@ -8003,7 +7620,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8003 | if (dm == null) | 7620 | if (dm == null) |
8004 | return; | 7621 | return; |
8005 | 7622 | ||
8006 | m_host.AddScriptLPS(1); | ||
8007 | UUID av = new UUID(); | 7623 | UUID av = new UUID(); |
8008 | if (!UUID.TryParse(avatar,out av)) | 7624 | if (!UUID.TryParse(avatar,out av)) |
8009 | { | 7625 | { |
@@ -8059,29 +7675,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8059 | 7675 | ||
8060 | public void llVolumeDetect(int detect) | 7676 | public void llVolumeDetect(int detect) |
8061 | { | 7677 | { |
8062 | m_host.AddScriptLPS(1); | ||
8063 | |||
8064 | if (!m_host.ParentGroup.IsDeleted) | 7678 | if (!m_host.ParentGroup.IsDeleted) |
8065 | m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0); | 7679 | m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0); |
8066 | } | 7680 | } |
8067 | 7681 | ||
8068 | public void llRemoteLoadScript(string target, string name, int running, int start_param) | 7682 | public void llRemoteLoadScript(string target, string name, int running, int start_param) |
8069 | { | 7683 | { |
8070 | m_host.AddScriptLPS(1); | ||
8071 | Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); | 7684 | Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); |
8072 | ScriptSleep(m_sleepMsOnRemoteLoadScript); | 7685 | ScriptSleep(m_sleepMsOnRemoteLoadScript); |
8073 | } | 7686 | } |
8074 | 7687 | ||
8075 | public void llSetRemoteScriptAccessPin(int pin) | 7688 | public void llSetRemoteScriptAccessPin(int pin) |
8076 | { | 7689 | { |
8077 | m_host.AddScriptLPS(1); | ||
8078 | m_host.ScriptAccessPin = pin; | 7690 | m_host.ScriptAccessPin = pin; |
8079 | } | 7691 | } |
8080 | 7692 | ||
8081 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) | 7693 | public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) |
8082 | { | 7694 | { |
8083 | m_host.AddScriptLPS(1); | ||
8084 | |||
8085 | UUID destId = UUID.Zero; | 7695 | UUID destId = UUID.Zero; |
8086 | 7696 | ||
8087 | if (!UUID.TryParse(target, out destId)) | 7697 | if (!UUID.TryParse(target, out destId)) |
@@ -8124,7 +7734,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8124 | 7734 | ||
8125 | public void llOpenRemoteDataChannel() | 7735 | public void llOpenRemoteDataChannel() |
8126 | { | 7736 | { |
8127 | m_host.AddScriptLPS(1); | ||
8128 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7737 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
8129 | if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) | 7738 | if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) |
8130 | { | 7739 | { |
@@ -8155,7 +7764,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8155 | 7764 | ||
8156 | public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) | 7765 | public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) |
8157 | { | 7766 | { |
8158 | m_host.AddScriptLPS(1); | ||
8159 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7767 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
8160 | ScriptSleep(m_sleepMsOnSendRemoteData); | 7768 | ScriptSleep(m_sleepMsOnSendRemoteData); |
8161 | if (xmlrpcMod == null) | 7769 | if (xmlrpcMod == null) |
@@ -8165,7 +7773,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8165 | 7773 | ||
8166 | public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) | 7774 | public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) |
8167 | { | 7775 | { |
8168 | m_host.AddScriptLPS(1); | ||
8169 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7776 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
8170 | if (xmlrpcMod != null) | 7777 | if (xmlrpcMod != null) |
8171 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); | 7778 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); |
@@ -8174,8 +7781,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8174 | 7781 | ||
8175 | public void llCloseRemoteDataChannel(string channel) | 7782 | public void llCloseRemoteDataChannel(string channel) |
8176 | { | 7783 | { |
8177 | m_host.AddScriptLPS(1); | ||
8178 | |||
8179 | IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); | 7784 | IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); |
8180 | if (xmlRpcRouter != null) | 7785 | if (xmlRpcRouter != null) |
8181 | { | 7786 | { |
@@ -8190,13 +7795,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8190 | 7795 | ||
8191 | public LSL_String llMD5String(string src, int nonce) | 7796 | public LSL_String llMD5String(string src, int nonce) |
8192 | { | 7797 | { |
8193 | m_host.AddScriptLPS(1); | ||
8194 | return Util.Md5Hash(String.Format("{0}:{1}", src, nonce.ToString()), Encoding.UTF8); | 7798 | return Util.Md5Hash(String.Format("{0}:{1}", src, nonce.ToString()), Encoding.UTF8); |
8195 | } | 7799 | } |
8196 | 7800 | ||
8197 | public LSL_String llSHA1String(string src) | 7801 | public LSL_String llSHA1String(string src) |
8198 | { | 7802 | { |
8199 | m_host.AddScriptLPS(1); | ||
8200 | return Util.SHA1Hash(src, Encoding.UTF8).ToLower(); | 7803 | return Util.SHA1Hash(src, Encoding.UTF8).ToLower(); |
8201 | } | 7804 | } |
8202 | 7805 | ||
@@ -8588,8 +8191,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8588 | 8191 | ||
8589 | public void llSetPrimitiveParams(LSL_List rules) | 8192 | public void llSetPrimitiveParams(LSL_List rules) |
8590 | { | 8193 | { |
8591 | m_host.AddScriptLPS(1); | ||
8592 | |||
8593 | SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); | 8194 | SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); |
8594 | 8195 | ||
8595 | ScriptSleep(m_sleepMsOnSetPrimitiveParams); | 8196 | ScriptSleep(m_sleepMsOnSetPrimitiveParams); |
@@ -8597,8 +8198,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8597 | 8198 | ||
8598 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) | 8199 | public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) |
8599 | { | 8200 | { |
8600 | m_host.AddScriptLPS(1); | ||
8601 | |||
8602 | SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); | 8201 | SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); |
8603 | 8202 | ||
8604 | ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); | 8203 | ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); |
@@ -8606,8 +8205,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
8606 | 8205 | ||
8607 | public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) | 8206 | public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) |
8608 | { | 8207 | { |
8609 | m_host.AddScriptLPS(1); | ||
8610 | |||
8611 | SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); | 8208 | SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); |
8612 | } | 8209 | } |
8613 | 8210 | ||
@@ -10359,7 +9956,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10359 | 9956 | ||
10360 | public LSL_String llStringToBase64(string str) | 9957 | public LSL_String llStringToBase64(string str) |
10361 | { | 9958 | { |
10362 | m_host.AddScriptLPS(1); | ||
10363 | try | 9959 | try |
10364 | { | 9960 | { |
10365 | byte[] encData_byte; | 9961 | byte[] encData_byte; |
@@ -10376,7 +9972,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10376 | 9972 | ||
10377 | public LSL_String llBase64ToString(string str) | 9973 | public LSL_String llBase64ToString(string str) |
10378 | { | 9974 | { |
10379 | m_host.AddScriptLPS(1); | ||
10380 | try | 9975 | try |
10381 | { | 9976 | { |
10382 | byte[] b = Convert.FromBase64String(str); | 9977 | byte[] b = Convert.FromBase64String(str); |
@@ -10396,8 +9991,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10396 | string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | 9991 | string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; |
10397 | 9992 | ||
10398 | ScriptSleep(300); | 9993 | ScriptSleep(300); |
10399 | m_host.AddScriptLPS(1); | ||
10400 | |||
10401 | if (str1 == String.Empty) | 9994 | if (str1 == String.Empty) |
10402 | return String.Empty; | 9995 | return String.Empty; |
10403 | if (str2 == String.Empty) | 9996 | if (str2 == String.Empty) |
@@ -10493,26 +10086,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10493 | 10086 | ||
10494 | public void llRemoteDataSetRegion() | 10087 | public void llRemoteDataSetRegion() |
10495 | { | 10088 | { |
10496 | m_host.AddScriptLPS(1); | ||
10497 | Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead"); | 10089 | Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead"); |
10498 | } | 10090 | } |
10499 | 10091 | ||
10500 | public LSL_Float llLog10(double val) | 10092 | public LSL_Float llLog10(double val) |
10501 | { | 10093 | { |
10502 | m_host.AddScriptLPS(1); | ||
10503 | return (double)Math.Log10(val); | 10094 | return (double)Math.Log10(val); |
10504 | } | 10095 | } |
10505 | 10096 | ||
10506 | public LSL_Float llLog(double val) | 10097 | public LSL_Float llLog(double val) |
10507 | { | 10098 | { |
10508 | m_host.AddScriptLPS(1); | ||
10509 | return (double)Math.Log(val); | 10099 | return (double)Math.Log(val); |
10510 | } | 10100 | } |
10511 | 10101 | ||
10512 | public LSL_List llGetAnimationList(string id) | 10102 | public LSL_List llGetAnimationList(string id) |
10513 | { | 10103 | { |
10514 | m_host.AddScriptLPS(1); | ||
10515 | |||
10516 | LSL_List l = new LSL_List(); | 10104 | LSL_List l = new LSL_List(); |
10517 | ScenePresence av = World.GetScenePresence((UUID)id); | 10105 | ScenePresence av = World.GetScenePresence((UUID)id); |
10518 | if (av == null || av.IsChildAgent) // only if in the region | 10106 | if (av == null || av.IsChildAgent) // only if in the region |
@@ -10526,8 +10114,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10526 | 10114 | ||
10527 | public void llSetParcelMusicURL(string url) | 10115 | public void llSetParcelMusicURL(string url) |
10528 | { | 10116 | { |
10529 | m_host.AddScriptLPS(1); | ||
10530 | |||
10531 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10117 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10532 | 10118 | ||
10533 | if (land.LandData.OwnerID != m_host.OwnerID) | 10119 | if (land.LandData.OwnerID != m_host.OwnerID) |
@@ -10540,8 +10126,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10540 | 10126 | ||
10541 | public LSL_String llGetParcelMusicURL() | 10127 | public LSL_String llGetParcelMusicURL() |
10542 | { | 10128 | { |
10543 | m_host.AddScriptLPS(1); | ||
10544 | |||
10545 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 10129 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
10546 | 10130 | ||
10547 | if (land.LandData.OwnerID != m_host.OwnerID) | 10131 | if (land.LandData.OwnerID != m_host.OwnerID) |
@@ -10552,8 +10136,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10552 | 10136 | ||
10553 | public LSL_Vector llGetRootPosition() | 10137 | public LSL_Vector llGetRootPosition() |
10554 | { | 10138 | { |
10555 | m_host.AddScriptLPS(1); | ||
10556 | |||
10557 | return new LSL_Vector(m_host.ParentGroup.AbsolutePosition); | 10139 | return new LSL_Vector(m_host.ParentGroup.AbsolutePosition); |
10558 | } | 10140 | } |
10559 | 10141 | ||
@@ -10568,7 +10150,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10568 | /// </summary> | 10150 | /// </summary> |
10569 | public LSL_Rotation llGetRootRotation() | 10151 | public LSL_Rotation llGetRootRotation() |
10570 | { | 10152 | { |
10571 | m_host.AddScriptLPS(1); | ||
10572 | Quaternion q; | 10153 | Quaternion q; |
10573 | if (m_host.ParentGroup.AttachmentPoint != 0) | 10154 | if (m_host.ParentGroup.AttachmentPoint != 0) |
10574 | { | 10155 | { |
@@ -10594,26 +10175,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10594 | 10175 | ||
10595 | public void llSetObjectDesc(string desc) | 10176 | public void llSetObjectDesc(string desc) |
10596 | { | 10177 | { |
10597 | m_host.AddScriptLPS(1); | ||
10598 | m_host.Description = desc!=null?desc:String.Empty; | 10178 | m_host.Description = desc!=null?desc:String.Empty; |
10599 | } | 10179 | } |
10600 | 10180 | ||
10601 | public LSL_String llGetCreator() | 10181 | public LSL_String llGetCreator() |
10602 | { | 10182 | { |
10603 | m_host.AddScriptLPS(1); | ||
10604 | return m_host.CreatorID.ToString(); | 10183 | return m_host.CreatorID.ToString(); |
10605 | } | 10184 | } |
10606 | 10185 | ||
10607 | public LSL_String llGetTimestamp() | 10186 | public LSL_String llGetTimestamp() |
10608 | { | 10187 | { |
10609 | m_host.AddScriptLPS(1); | ||
10610 | return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); | 10188 | return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); |
10611 | } | 10189 | } |
10612 | 10190 | ||
10613 | public LSL_Integer llGetNumberOfPrims() | 10191 | public LSL_Integer llGetNumberOfPrims() |
10614 | { | 10192 | { |
10615 | m_host.AddScriptLPS(1); | ||
10616 | |||
10617 | return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); | 10193 | return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); |
10618 | } | 10194 | } |
10619 | 10195 | ||
@@ -10630,7 +10206,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10630 | /// </summary> | 10206 | /// </summary> |
10631 | public LSL_List llGetBoundingBox(string obj) | 10207 | public LSL_List llGetBoundingBox(string obj) |
10632 | { | 10208 | { |
10633 | m_host.AddScriptLPS(1); | ||
10634 | UUID objID = UUID.Zero; | 10209 | UUID objID = UUID.Zero; |
10635 | LSL_List result = new LSL_List(); | 10210 | LSL_List result = new LSL_List(); |
10636 | 10211 | ||
@@ -10796,8 +10371,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10796 | 10371 | ||
10797 | public LSL_List llGetPrimitiveParams(LSL_List rules) | 10372 | public LSL_List llGetPrimitiveParams(LSL_List rules) |
10798 | { | 10373 | { |
10799 | m_host.AddScriptLPS(1); | ||
10800 | |||
10801 | LSL_List result = new LSL_List(); | 10374 | LSL_List result = new LSL_List(); |
10802 | 10375 | ||
10803 | LSL_List remaining = GetPrimParams(m_host, rules, ref result); | 10376 | LSL_List remaining = GetPrimParams(m_host, rules, ref result); |
@@ -10817,8 +10390,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
10817 | 10390 | ||
10818 | public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) | 10391 | public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) |
10819 | { | 10392 | { |
10820 | m_host.AddScriptLPS(1); | ||
10821 | |||
10822 | // acording to SL wiki this must indicate a single link number or link_root or link_this. | 10393 | // acording to SL wiki this must indicate a single link number or link_root or link_this. |
10823 | // keep other options as before | 10394 | // keep other options as before |
10824 | 10395 | ||
@@ -11468,14 +11039,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11468 | 11039 | ||
11469 | public LSL_List llGetPrimMediaParams(int face, LSL_List rules) | 11040 | public LSL_List llGetPrimMediaParams(int face, LSL_List rules) |
11470 | { | 11041 | { |
11471 | m_host.AddScriptLPS(1); | ||
11472 | ScriptSleep(m_sleepMsOnGetPrimMediaParams); | 11042 | ScriptSleep(m_sleepMsOnGetPrimMediaParams); |
11473 | return GetPrimMediaParams(m_host, face, rules); | 11043 | return GetPrimMediaParams(m_host, face, rules); |
11474 | } | 11044 | } |
11475 | 11045 | ||
11476 | public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) | 11046 | public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) |
11477 | { | 11047 | { |
11478 | m_host.AddScriptLPS(1); | ||
11479 | ScriptSleep(m_sleepMsOnGetLinkMedia); | 11048 | ScriptSleep(m_sleepMsOnGetLinkMedia); |
11480 | if (link == ScriptBaseClass.LINK_ROOT) | 11049 | if (link == ScriptBaseClass.LINK_ROOT) |
11481 | return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); | 11050 | return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); |
@@ -11595,14 +11164,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11595 | 11164 | ||
11596 | public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) | 11165 | public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) |
11597 | { | 11166 | { |
11598 | m_host.AddScriptLPS(1); | ||
11599 | ScriptSleep(m_sleepMsOnSetPrimMediaParams); | 11167 | ScriptSleep(m_sleepMsOnSetPrimMediaParams); |
11600 | return SetPrimMediaParams(m_host, face, rules); | 11168 | return SetPrimMediaParams(m_host, face, rules); |
11601 | } | 11169 | } |
11602 | 11170 | ||
11603 | public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) | 11171 | public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) |
11604 | { | 11172 | { |
11605 | m_host.AddScriptLPS(1); | ||
11606 | ScriptSleep(m_sleepMsOnSetLinkMedia); | 11173 | ScriptSleep(m_sleepMsOnSetLinkMedia); |
11607 | if (link == ScriptBaseClass.LINK_ROOT) | 11174 | if (link == ScriptBaseClass.LINK_ROOT) |
11608 | return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); | 11175 | return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); |
@@ -11721,14 +11288,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11721 | 11288 | ||
11722 | public LSL_Integer llClearPrimMedia(LSL_Integer face) | 11289 | public LSL_Integer llClearPrimMedia(LSL_Integer face) |
11723 | { | 11290 | { |
11724 | m_host.AddScriptLPS(1); | ||
11725 | ScriptSleep(m_sleepMsOnClearPrimMedia); | 11291 | ScriptSleep(m_sleepMsOnClearPrimMedia); |
11726 | return ClearPrimMedia(m_host, face); | 11292 | return ClearPrimMedia(m_host, face); |
11727 | } | 11293 | } |
11728 | 11294 | ||
11729 | public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) | 11295 | public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) |
11730 | { | 11296 | { |
11731 | m_host.AddScriptLPS(1); | ||
11732 | ScriptSleep(m_sleepMsOnClearLinkMedia); | 11297 | ScriptSleep(m_sleepMsOnClearLinkMedia); |
11733 | if (link == ScriptBaseClass.LINK_ROOT) | 11298 | if (link == ScriptBaseClass.LINK_ROOT) |
11734 | return ClearPrimMedia(m_host.ParentGroup.RootPart, face); | 11299 | return ClearPrimMedia(m_host.ParentGroup.RootPart, face); |
@@ -11894,8 +11459,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11894 | 11459 | ||
11895 | char[] imdt = new char[8]; | 11460 | char[] imdt = new char[8]; |
11896 | 11461 | ||
11897 | m_host.AddScriptLPS(1); | ||
11898 | |||
11899 | // Manually unroll the loop | 11462 | // Manually unroll the loop |
11900 | 11463 | ||
11901 | imdt[7] = '='; | 11464 | imdt[7] = '='; |
@@ -11956,8 +11519,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11956 | int number = 0; | 11519 | int number = 0; |
11957 | int digit; | 11520 | int digit; |
11958 | 11521 | ||
11959 | m_host.AddScriptLPS(1); | ||
11960 | |||
11961 | // Require a well-fromed base64 string | 11522 | // Require a well-fromed base64 string |
11962 | 11523 | ||
11963 | if (str.Length > 8) | 11524 | if (str.Length > 8) |
@@ -12013,14 +11574,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12013 | 11574 | ||
12014 | public LSL_Float llGetGMTclock() | 11575 | public LSL_Float llGetGMTclock() |
12015 | { | 11576 | { |
12016 | m_host.AddScriptLPS(1); | ||
12017 | return DateTime.UtcNow.TimeOfDay.TotalSeconds; | 11577 | return DateTime.UtcNow.TimeOfDay.TotalSeconds; |
12018 | } | 11578 | } |
12019 | 11579 | ||
12020 | public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) | 11580 | public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) |
12021 | { | 11581 | { |
12022 | m_host.AddScriptLPS(1); | ||
12023 | |||
12024 | if (m_UrlModule != null) | 11582 | if (m_UrlModule != null) |
12025 | return m_UrlModule.GetHttpHeader(new UUID(request_id), header); | 11583 | return m_UrlModule.GetHttpHeader(new UUID(request_id), header); |
12026 | return String.Empty; | 11584 | return String.Empty; |
@@ -12029,7 +11587,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12029 | 11587 | ||
12030 | public LSL_String llGetSimulatorHostname() | 11588 | public LSL_String llGetSimulatorHostname() |
12031 | { | 11589 | { |
12032 | m_host.AddScriptLPS(1); | ||
12033 | IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>(); | 11590 | IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>(); |
12034 | return UrlModule.ExternalHostNameForLSL; | 11591 | return UrlModule.ExternalHostNameForLSL; |
12035 | } | 11592 | } |
@@ -12103,8 +11660,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12103 | int i, j; | 11660 | int i, j; |
12104 | string d; | 11661 | string d; |
12105 | 11662 | ||
12106 | m_host.AddScriptLPS(1); | ||
12107 | |||
12108 | /* | 11663 | /* |
12109 | * Convert separator and spacer lists to C# strings. | 11664 | * Convert separator and spacer lists to C# strings. |
12110 | * Also filter out null strings so we don't hang. | 11665 | * Also filter out null strings so we don't hang. |
@@ -12200,8 +11755,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12200 | 11755 | ||
12201 | public LSL_Integer llGetObjectPermMask(int mask) | 11756 | public LSL_Integer llGetObjectPermMask(int mask) |
12202 | { | 11757 | { |
12203 | m_host.AddScriptLPS(1); | ||
12204 | |||
12205 | int permmask = 0; | 11758 | int permmask = 0; |
12206 | 11759 | ||
12207 | if (mask == ScriptBaseClass.MASK_BASE)//0 | 11760 | if (mask == ScriptBaseClass.MASK_BASE)//0 |
@@ -12234,8 +11787,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12234 | 11787 | ||
12235 | public void llSetObjectPermMask(int mask, int value) | 11788 | public void llSetObjectPermMask(int mask, int value) |
12236 | { | 11789 | { |
12237 | m_host.AddScriptLPS(1); | ||
12238 | |||
12239 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) | 11790 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) |
12240 | { | 11791 | { |
12241 | if (World.Permissions.IsAdministrator(m_host.OwnerID)) | 11792 | if (World.Permissions.IsAdministrator(m_host.OwnerID)) |
@@ -12270,8 +11821,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12270 | 11821 | ||
12271 | public LSL_Integer llGetInventoryPermMask(string itemName, int mask) | 11822 | public LSL_Integer llGetInventoryPermMask(string itemName, int mask) |
12272 | { | 11823 | { |
12273 | m_host.AddScriptLPS(1); | ||
12274 | |||
12275 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); | 11824 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); |
12276 | 11825 | ||
12277 | if (item == null) | 11826 | if (item == null) |
@@ -12296,8 +11845,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12296 | 11845 | ||
12297 | public void llSetInventoryPermMask(string itemName, int mask, int value) | 11846 | public void llSetInventoryPermMask(string itemName, int mask, int value) |
12298 | { | 11847 | { |
12299 | m_host.AddScriptLPS(1); | ||
12300 | |||
12301 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) | 11848 | if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) |
12302 | { | 11849 | { |
12303 | if (World.Permissions.IsAdministrator(m_host.OwnerID)) | 11850 | if (World.Permissions.IsAdministrator(m_host.OwnerID)) |
@@ -12331,8 +11878,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12331 | 11878 | ||
12332 | public LSL_String llGetInventoryCreator(string itemName) | 11879 | public LSL_String llGetInventoryCreator(string itemName) |
12333 | { | 11880 | { |
12334 | m_host.AddScriptLPS(1); | ||
12335 | |||
12336 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); | 11881 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); |
12337 | 11882 | ||
12338 | if (item == null) | 11883 | if (item == null) |
@@ -12347,8 +11892,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12347 | 11892 | ||
12348 | public void llOwnerSay(string msg) | 11893 | public void llOwnerSay(string msg) |
12349 | { | 11894 | { |
12350 | m_host.AddScriptLPS(1); | ||
12351 | |||
12352 | World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, | 11895 | World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, |
12353 | m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); | 11896 | m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); |
12354 | // IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); | 11897 | // IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); |
@@ -12357,7 +11900,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12357 | 11900 | ||
12358 | public LSL_String llRequestSecureURL() | 11901 | public LSL_String llRequestSecureURL() |
12359 | { | 11902 | { |
12360 | m_host.AddScriptLPS(1); | ||
12361 | if (m_UrlModule != null) | 11903 | if (m_UrlModule != null) |
12362 | return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); | 11904 | return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); |
12363 | return UUID.Zero.ToString(); | 11905 | return UUID.Zero.ToString(); |
@@ -12369,8 +11911,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12369 | 11911 | ||
12370 | try | 11912 | try |
12371 | { | 11913 | { |
12372 | m_host.AddScriptLPS(1); | ||
12373 | |||
12374 | string reply = String.Empty; | 11914 | string reply = String.Empty; |
12375 | 11915 | ||
12376 | GridRegion info; | 11916 | GridRegion info; |
@@ -12474,8 +12014,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12474 | 12014 | ||
12475 | public LSL_String llRequestURL() | 12015 | public LSL_String llRequestURL() |
12476 | { | 12016 | { |
12477 | m_host.AddScriptLPS(1); | ||
12478 | |||
12479 | if (m_UrlModule != null) | 12017 | if (m_UrlModule != null) |
12480 | return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); | 12018 | return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); |
12481 | return UUID.Zero.ToString(); | 12019 | return UUID.Zero.ToString(); |
@@ -12483,13 +12021,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12483 | 12021 | ||
12484 | public void llForceMouselook(int mouselook) | 12022 | public void llForceMouselook(int mouselook) |
12485 | { | 12023 | { |
12486 | m_host.AddScriptLPS(1); | ||
12487 | m_host.SetForceMouselook(mouselook != 0); | 12024 | m_host.SetForceMouselook(mouselook != 0); |
12488 | } | 12025 | } |
12489 | 12026 | ||
12490 | public LSL_Float llGetObjectMass(string id) | 12027 | public LSL_Float llGetObjectMass(string id) |
12491 | { | 12028 | { |
12492 | m_host.AddScriptLPS(1); | ||
12493 | UUID key = new UUID(); | 12029 | UUID key = new UUID(); |
12494 | if (UUID.TryParse(id, out key)) | 12030 | if (UUID.TryParse(id, out key)) |
12495 | { | 12031 | { |
@@ -12533,8 +12069,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12533 | { | 12069 | { |
12534 | LSL_List pref; | 12070 | LSL_List pref; |
12535 | 12071 | ||
12536 | m_host.AddScriptLPS(1); | ||
12537 | |||
12538 | // Note that although we have normalized, both | 12072 | // Note that although we have normalized, both |
12539 | // indices could still be negative. | 12073 | // indices could still be negative. |
12540 | if (start < 0) | 12074 | if (start < 0) |
@@ -12604,8 +12138,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12604 | 12138 | ||
12605 | public void llLoadURL(string avatar_id, string message, string url) | 12139 | public void llLoadURL(string avatar_id, string message, string url) |
12606 | { | 12140 | { |
12607 | m_host.AddScriptLPS(1); | ||
12608 | |||
12609 | IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); | 12141 | IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); |
12610 | if (null != dm) | 12142 | if (null != dm) |
12611 | dm.SendUrlToUser( | 12143 | dm.SendUrlToUser( |
@@ -12619,8 +12151,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12619 | // TODO: Not implemented yet (missing in libomv?): | 12151 | // TODO: Not implemented yet (missing in libomv?): |
12620 | // 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) | 12152 | // 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) |
12621 | 12153 | ||
12622 | m_host.AddScriptLPS(1); | ||
12623 | |||
12624 | // according to the docs, this command only works if script owner and land owner are the same | 12154 | // according to the docs, this command only works if script owner and land owner are the same |
12625 | // lets add estate owners and gods, too, and use the generic permission check. | 12155 | // lets add estate owners and gods, too, and use the generic permission check. |
12626 | ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 12156 | ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
@@ -12857,7 +12387,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12857 | 12387 | ||
12858 | public LSL_List llParcelMediaQuery(LSL_List aList) | 12388 | public LSL_List llParcelMediaQuery(LSL_List aList) |
12859 | { | 12389 | { |
12860 | m_host.AddScriptLPS(1); | ||
12861 | LSL_List list = new LSL_List(); | 12390 | LSL_List list = new LSL_List(); |
12862 | //TO DO: make the implementation for the missing commands | 12391 | //TO DO: make the implementation for the missing commands |
12863 | //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) | 12392 | //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) |
@@ -12898,7 +12427,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12898 | 12427 | ||
12899 | public LSL_Integer llModPow(int a, int b, int c) | 12428 | public LSL_Integer llModPow(int a, int b, int c) |
12900 | { | 12429 | { |
12901 | m_host.AddScriptLPS(1); | ||
12902 | Int64 tmp = 0; | 12430 | Int64 tmp = 0; |
12903 | Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); | 12431 | Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); |
12904 | ScriptSleep(m_sleepMsOnModPow); | 12432 | ScriptSleep(m_sleepMsOnModPow); |
@@ -12907,8 +12435,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12907 | 12435 | ||
12908 | public LSL_Integer llGetInventoryType(string name) | 12436 | public LSL_Integer llGetInventoryType(string name) |
12909 | { | 12437 | { |
12910 | m_host.AddScriptLPS(1); | ||
12911 | |||
12912 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); | 12438 | TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); |
12913 | 12439 | ||
12914 | if (item == null) | 12440 | if (item == null) |
@@ -12919,8 +12445,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12919 | 12445 | ||
12920 | public void llSetPayPrice(int price, LSL_List quick_pay_buttons) | 12446 | public void llSetPayPrice(int price, LSL_List quick_pay_buttons) |
12921 | { | 12447 | { |
12922 | m_host.AddScriptLPS(1); | ||
12923 | |||
12924 | if (quick_pay_buttons.Data.Length < 4) | 12448 | if (quick_pay_buttons.Data.Length < 4) |
12925 | { | 12449 | { |
12926 | int x; | 12450 | int x; |
@@ -12941,8 +12465,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12941 | 12465 | ||
12942 | public LSL_Vector llGetCameraPos() | 12466 | public LSL_Vector llGetCameraPos() |
12943 | { | 12467 | { |
12944 | m_host.AddScriptLPS(1); | ||
12945 | |||
12946 | if (m_item.PermsGranter == UUID.Zero) | 12468 | if (m_item.PermsGranter == UUID.Zero) |
12947 | return Vector3.Zero; | 12469 | return Vector3.Zero; |
12948 | 12470 | ||
@@ -12965,8 +12487,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12965 | 12487 | ||
12966 | public LSL_Rotation llGetCameraRot() | 12488 | public LSL_Rotation llGetCameraRot() |
12967 | { | 12489 | { |
12968 | m_host.AddScriptLPS(1); | ||
12969 | |||
12970 | if (m_item.PermsGranter == UUID.Zero) | 12490 | if (m_item.PermsGranter == UUID.Zero) |
12971 | return Quaternion.Identity; | 12491 | return Quaternion.Identity; |
12972 | 12492 | ||
@@ -12988,21 +12508,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12988 | 12508 | ||
12989 | public void llSetPrimURL(string url) | 12509 | public void llSetPrimURL(string url) |
12990 | { | 12510 | { |
12991 | m_host.AddScriptLPS(1); | ||
12992 | Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); | 12511 | Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); |
12993 | ScriptSleep(m_sleepMsOnSetPrimURL); | 12512 | ScriptSleep(m_sleepMsOnSetPrimURL); |
12994 | } | 12513 | } |
12995 | 12514 | ||
12996 | public void llRefreshPrimURL() | 12515 | public void llRefreshPrimURL() |
12997 | { | 12516 | { |
12998 | m_host.AddScriptLPS(1); | ||
12999 | Deprecated("llRefreshPrimURL"); | 12517 | Deprecated("llRefreshPrimURL"); |
13000 | ScriptSleep(m_sleepMsOnRefreshPrimURL); | 12518 | ScriptSleep(m_sleepMsOnRefreshPrimURL); |
13001 | } | 12519 | } |
13002 | 12520 | ||
13003 | public LSL_String llEscapeURL(string url) | 12521 | public LSL_String llEscapeURL(string url) |
13004 | { | 12522 | { |
13005 | m_host.AddScriptLPS(1); | ||
13006 | try | 12523 | try |
13007 | { | 12524 | { |
13008 | return Uri.EscapeDataString(url); | 12525 | return Uri.EscapeDataString(url); |
@@ -13015,7 +12532,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13015 | 12532 | ||
13016 | public LSL_String llUnescapeURL(string url) | 12533 | public LSL_String llUnescapeURL(string url) |
13017 | { | 12534 | { |
13018 | m_host.AddScriptLPS(1); | ||
13019 | try | 12535 | try |
13020 | { | 12536 | { |
13021 | return Uri.UnescapeDataString(url); | 12537 | return Uri.UnescapeDataString(url); |
@@ -13028,7 +12544,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13028 | 12544 | ||
13029 | public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt) | 12545 | public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt) |
13030 | { | 12546 | { |
13031 | m_host.AddScriptLPS(1); | ||
13032 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); | 12547 | DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); |
13033 | if (detectedParams == null) | 12548 | if (detectedParams == null) |
13034 | { | 12549 | { |
@@ -13054,7 +12569,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13054 | 12569 | ||
13055 | public void llAddToLandBanList(string avatar, double hours) | 12570 | public void llAddToLandBanList(string avatar, double hours) |
13056 | { | 12571 | { |
13057 | m_host.AddScriptLPS(1); | ||
13058 | UUID key; | 12572 | UUID key; |
13059 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 12573 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
13060 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) | 12574 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
@@ -13095,7 +12609,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13095 | 12609 | ||
13096 | public void llRemoveFromLandPassList(string avatar) | 12610 | public void llRemoveFromLandPassList(string avatar) |
13097 | { | 12611 | { |
13098 | m_host.AddScriptLPS(1); | ||
13099 | UUID key; | 12612 | UUID key; |
13100 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 12613 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
13101 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManagePasses, false)) | 12614 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManagePasses, false)) |
@@ -13122,7 +12635,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13122 | 12635 | ||
13123 | public void llRemoveFromLandBanList(string avatar) | 12636 | public void llRemoveFromLandBanList(string avatar) |
13124 | { | 12637 | { |
13125 | m_host.AddScriptLPS(1); | ||
13126 | UUID key; | 12638 | UUID key; |
13127 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); | 12639 | ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); |
13128 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) | 12640 | if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) |
@@ -13149,8 +12661,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13149 | 12661 | ||
13150 | public void llSetCameraParams(LSL_List rules) | 12662 | public void llSetCameraParams(LSL_List rules) |
13151 | { | 12663 | { |
13152 | m_host.AddScriptLPS(1); | ||
13153 | |||
13154 | // the object we are in | 12664 | // the object we are in |
13155 | UUID objectID = m_host.ParentUUID; | 12665 | UUID objectID = m_host.ParentUUID; |
13156 | if (objectID == UUID.Zero) | 12666 | if (objectID == UUID.Zero) |
@@ -13276,8 +12786,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13276 | 12786 | ||
13277 | public void llClearCameraParams() | 12787 | public void llClearCameraParams() |
13278 | { | 12788 | { |
13279 | m_host.AddScriptLPS(1); | ||
13280 | |||
13281 | // the object we are in | 12789 | // the object we are in |
13282 | UUID objectID = m_host.ParentUUID; | 12790 | UUID objectID = m_host.ParentUUID; |
13283 | if (objectID == UUID.Zero) | 12791 | if (objectID == UUID.Zero) |
@@ -13303,7 +12811,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13303 | 12811 | ||
13304 | public LSL_Float llListStatistics(int operation, LSL_List src) | 12812 | public LSL_Float llListStatistics(int operation, LSL_List src) |
13305 | { | 12813 | { |
13306 | m_host.AddScriptLPS(1); | ||
13307 | switch (operation) | 12814 | switch (operation) |
13308 | { | 12815 | { |
13309 | case ScriptBaseClass.LIST_STAT_RANGE: | 12816 | case ScriptBaseClass.LIST_STAT_RANGE: |
@@ -13335,19 +12842,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13335 | 12842 | ||
13336 | public LSL_Integer llGetUnixTime() | 12843 | public LSL_Integer llGetUnixTime() |
13337 | { | 12844 | { |
13338 | m_host.AddScriptLPS(1); | ||
13339 | return Util.UnixTimeSinceEpoch(); | 12845 | return Util.UnixTimeSinceEpoch(); |
13340 | } | 12846 | } |
13341 | 12847 | ||
13342 | public LSL_Integer llGetParcelFlags(LSL_Vector pos) | 12848 | public LSL_Integer llGetParcelFlags(LSL_Vector pos) |
13343 | { | 12849 | { |
13344 | m_host.AddScriptLPS(1); | ||
13345 | return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags; | 12850 | return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags; |
13346 | } | 12851 | } |
13347 | 12852 | ||
13348 | public LSL_Integer llGetRegionFlags() | 12853 | public LSL_Integer llGetRegionFlags() |
13349 | { | 12854 | { |
13350 | m_host.AddScriptLPS(1); | ||
13351 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); | 12855 | IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); |
13352 | if (estate == null) | 12856 | if (estate == null) |
13353 | return 67108864; | 12857 | return 67108864; |
@@ -13356,8 +12860,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13356 | 12860 | ||
13357 | public LSL_String llXorBase64StringsCorrect(string str1, string str2) | 12861 | public LSL_String llXorBase64StringsCorrect(string str1, string str2) |
13358 | { | 12862 | { |
13359 | m_host.AddScriptLPS(1); | ||
13360 | |||
13361 | if (str1 == String.Empty) | 12863 | if (str1 == String.Empty) |
13362 | return String.Empty; | 12864 | return String.Empty; |
13363 | if (str2 == String.Empty) | 12865 | if (str2 == String.Empty) |
@@ -13425,7 +12927,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13425 | // parameter flags support are implemented in ScriptsHttpRequests.cs | 12927 | // parameter flags support are implemented in ScriptsHttpRequests.cs |
13426 | // in StartHttpRequest | 12928 | // in StartHttpRequest |
13427 | 12929 | ||
13428 | m_host.AddScriptLPS(1); | ||
13429 | IHttpRequestModule httpScriptMod = | 12930 | IHttpRequestModule httpScriptMod = |
13430 | m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); | 12931 | m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); |
13431 | List<string> param = new List<string>(); | 12932 | List<string> param = new List<string>(); |
@@ -13616,15 +13117,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13616 | // Partial implementation: support for parameter flags needed | 13117 | // Partial implementation: support for parameter flags needed |
13617 | // see http://wiki.secondlife.com/wiki/llHTTPResponse | 13118 | // see http://wiki.secondlife.com/wiki/llHTTPResponse |
13618 | 13119 | ||
13619 | m_host.AddScriptLPS(1); | ||
13620 | |||
13621 | if (m_UrlModule != null) | 13120 | if (m_UrlModule != null) |
13622 | m_UrlModule.HttpResponse(new UUID(id), status,body); | 13121 | m_UrlModule.HttpResponse(new UUID(id), status,body); |
13623 | } | 13122 | } |
13624 | 13123 | ||
13625 | public void llResetLandBanList() | 13124 | public void llResetLandBanList() |
13626 | { | 13125 | { |
13627 | m_host.AddScriptLPS(1); | ||
13628 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; | 13126 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; |
13629 | if (land.OwnerID == m_host.OwnerID) | 13127 | if (land.OwnerID == m_host.OwnerID) |
13630 | { | 13128 | { |
@@ -13641,7 +13139,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13641 | 13139 | ||
13642 | public void llResetLandPassList() | 13140 | public void llResetLandPassList() |
13643 | { | 13141 | { |
13644 | m_host.AddScriptLPS(1); | ||
13645 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; | 13142 | LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; |
13646 | if (land.OwnerID == m_host.OwnerID) | 13143 | if (land.OwnerID == m_host.OwnerID) |
13647 | { | 13144 | { |
@@ -13658,8 +13155,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13658 | 13155 | ||
13659 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) | 13156 | public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) |
13660 | { | 13157 | { |
13661 | m_host.AddScriptLPS(1); | ||
13662 | |||
13663 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | 13158 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
13664 | 13159 | ||
13665 | if (lo == null) | 13160 | if (lo == null) |
@@ -13700,7 +13195,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13700 | 13195 | ||
13701 | public LSL_List llGetParcelPrimOwners(LSL_Vector pos) | 13196 | public LSL_List llGetParcelPrimOwners(LSL_Vector pos) |
13702 | { | 13197 | { |
13703 | m_host.AddScriptLPS(1); | ||
13704 | LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | 13198 | LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
13705 | LSL_List ret = new LSL_List(); | 13199 | LSL_List ret = new LSL_List(); |
13706 | if (land != null) | 13200 | if (land != null) |
@@ -13717,7 +13211,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13717 | 13211 | ||
13718 | public LSL_Integer llGetObjectPrimCount(string object_id) | 13212 | public LSL_Integer llGetObjectPrimCount(string object_id) |
13719 | { | 13213 | { |
13720 | m_host.AddScriptLPS(1); | ||
13721 | SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id)); | 13214 | SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id)); |
13722 | if (part == null) | 13215 | if (part == null) |
13723 | { | 13216 | { |
@@ -13731,8 +13224,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13731 | 13224 | ||
13732 | public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide) | 13225 | public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide) |
13733 | { | 13226 | { |
13734 | m_host.AddScriptLPS(1); | ||
13735 | |||
13736 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); | 13227 | ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); |
13737 | 13228 | ||
13738 | if (lo == null) | 13229 | if (lo == null) |
@@ -13746,7 +13237,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13746 | 13237 | ||
13747 | public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) | 13238 | public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) |
13748 | { | 13239 | { |
13749 | m_host.AddScriptLPS(1); | ||
13750 | LandData land = World.GetLandData(pos); | 13240 | LandData land = World.GetLandData(pos); |
13751 | if (land == null) | 13241 | if (land == null) |
13752 | { | 13242 | { |
@@ -13785,7 +13275,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13785 | 13275 | ||
13786 | public LSL_String llStringTrim(string src, int type) | 13276 | public LSL_String llStringTrim(string src, int type) |
13787 | { | 13277 | { |
13788 | m_host.AddScriptLPS(1); | ||
13789 | if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } | 13278 | if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } |
13790 | if (type == (int)ScriptBaseClass.STRING_TRIM_TAIL) { return src.TrimEnd(); } | 13279 | if (type == (int)ScriptBaseClass.STRING_TRIM_TAIL) { return src.TrimEnd(); } |
13791 | if (type == (int)ScriptBaseClass.STRING_TRIM) { return src.Trim(); } | 13280 | if (type == (int)ScriptBaseClass.STRING_TRIM) { return src.Trim(); } |
@@ -13794,8 +13283,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
13794 | 13283 | ||
13795 | public LSL_List llGetObjectDetails(string id, LSL_List args) | 13284 | public LSL_List llGetObjectDetails(string id, LSL_List args) |
13796 | { | 13285 | { |
13797 | m_host.AddScriptLPS(1); | ||
13798 | |||
13799 | LSL_List ret = new LSL_List(); | 13286 | LSL_List ret = new LSL_List(); |
13800 | UUID key = new UUID(); | 13287 | UUID key = new UUID(); |
13801 | 13288 | ||
@@ -14276,8 +13763,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14276 | 13763 | ||
14277 | public LSL_String llGetNumberOfNotecardLines(string name) | 13764 | public LSL_String llGetNumberOfNotecardLines(string name) |
14278 | { | 13765 | { |
14279 | m_host.AddScriptLPS(1); | ||
14280 | |||
14281 | UUID assetID = UUID.Zero; | 13766 | UUID assetID = UUID.Zero; |
14282 | 13767 | ||
14283 | if (!UUID.TryParse(name, out assetID)) | 13768 | if (!UUID.TryParse(name, out assetID)) |
@@ -14327,8 +13812,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14327 | 13812 | ||
14328 | public LSL_String llGetNotecardLine(string name, int line) | 13813 | public LSL_String llGetNotecardLine(string name, int line) |
14329 | { | 13814 | { |
14330 | m_host.AddScriptLPS(1); | ||
14331 | |||
14332 | UUID assetID = UUID.Zero; | 13815 | UUID assetID = UUID.Zero; |
14333 | 13816 | ||
14334 | if (!UUID.TryParse(name, out assetID)) | 13817 | if (!UUID.TryParse(name, out assetID)) |
@@ -14801,8 +14284,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
14801 | 14284 | ||
14802 | LSL_List list = new LSL_List(); | 14285 | LSL_List list = new LSL_List(); |
14803 | 14286 | ||
14804 | m_host.AddScriptLPS(1); | ||
14805 | |||
14806 | Vector3 rayStart = start; | 14287 | Vector3 rayStart = start; |
14807 | Vector3 rayEnd = end; | 14288 | Vector3 rayEnd = end; |
14808 | Vector3 dir = rayEnd - rayStart; | 14289 | Vector3 dir = rayEnd - rayStart; |
@@ -15022,7 +14503,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15022 | /// </summary> | 14503 | /// </summary> |
15023 | public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options) | 14504 | public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options) |
15024 | { | 14505 | { |
15025 | m_host.AddScriptLPS(1); | ||
15026 | LSL_List result = new LSL_List(); | 14506 | LSL_List result = new LSL_List(); |
15027 | 14507 | ||
15028 | // Prepare throttle data | 14508 | // Prepare throttle data |
@@ -15874,7 +15354,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15874 | 15354 | ||
15875 | public LSL_Integer llManageEstateAccess(int action, string avatar) | 15355 | public LSL_Integer llManageEstateAccess(int action, string avatar) |
15876 | { | 15356 | { |
15877 | m_host.AddScriptLPS(1); | ||
15878 | EstateSettings estate = World.RegionInfo.EstateSettings; | 15357 | EstateSettings estate = World.RegionInfo.EstateSettings; |
15879 | bool isAccount = false; | 15358 | bool isAccount = false; |
15880 | bool isGroup = false; | 15359 | bool isGroup = false; |
@@ -15943,35 +15422,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15943 | 15422 | ||
15944 | public LSL_Integer llGetMemoryLimit() | 15423 | public LSL_Integer llGetMemoryLimit() |
15945 | { | 15424 | { |
15946 | m_host.AddScriptLPS(1); | ||
15947 | // The value returned for Mono scripts in SL | 15425 | // The value returned for Mono scripts in SL |
15948 | return 65536; | 15426 | return 65536; |
15949 | } | 15427 | } |
15950 | 15428 | ||
15951 | public LSL_Integer llSetMemoryLimit(LSL_Integer limit) | 15429 | public LSL_Integer llSetMemoryLimit(LSL_Integer limit) |
15952 | { | 15430 | { |
15953 | m_host.AddScriptLPS(1); | ||
15954 | // Treat as an LSO script | 15431 | // Treat as an LSO script |
15955 | return ScriptBaseClass.FALSE; | 15432 | return ScriptBaseClass.FALSE; |
15956 | } | 15433 | } |
15957 | 15434 | ||
15958 | public LSL_Integer llGetSPMaxMemory() | 15435 | public LSL_Integer llGetSPMaxMemory() |
15959 | { | 15436 | { |
15960 | m_host.AddScriptLPS(1); | ||
15961 | // The value returned for Mono scripts in SL | 15437 | // The value returned for Mono scripts in SL |
15962 | return 65536; | 15438 | return 65536; |
15963 | } | 15439 | } |
15964 | 15440 | ||
15965 | public virtual LSL_Integer llGetUsedMemory() | 15441 | public virtual LSL_Integer llGetUsedMemory() |
15966 | { | 15442 | { |
15967 | m_host.AddScriptLPS(1); | ||
15968 | // The value returned for Mono scripts in SL | 15443 | // The value returned for Mono scripts in SL |
15969 | return 65536; | 15444 | return 65536; |
15970 | } | 15445 | } |
15971 | 15446 | ||
15972 | public void llScriptProfiler(LSL_Integer flags) | 15447 | public void llScriptProfiler(LSL_Integer flags) |
15973 | { | 15448 | { |
15974 | m_host.AddScriptLPS(1); | ||
15975 | // This does nothing for LSO scripts in SL | 15449 | // This does nothing for LSO scripts in SL |
15976 | } | 15450 | } |
15977 | 15451 | ||
@@ -15983,23 +15457,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
15983 | 15457 | ||
15984 | public void llSetSoundQueueing(int queue) | 15458 | public void llSetSoundQueueing(int queue) |
15985 | { | 15459 | { |
15986 | m_host.AddScriptLPS(1); | ||
15987 | |||
15988 | if (m_SoundModule != null) | 15460 | if (m_SoundModule != null) |
15989 | m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); | 15461 | m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); |
15990 | } | 15462 | } |
15991 | 15463 | ||
15992 | public void llCollisionSprite(string impact_sprite) | 15464 | public void llCollisionSprite(string impact_sprite) |
15993 | { | 15465 | { |
15994 | m_host.AddScriptLPS(1); | ||
15995 | // Viewer 2.0 broke this and it's likely LL has no intention | 15466 | // Viewer 2.0 broke this and it's likely LL has no intention |
15996 | // of fixing it. Therefore, letting this be a NOP seems appropriate. | 15467 | // of fixing it. Therefore, letting this be a NOP seems appropriate. |
15997 | } | 15468 | } |
15998 | 15469 | ||
15999 | public void llGodLikeRezObject(string inventory, LSL_Vector pos) | 15470 | public void llGodLikeRezObject(string inventory, LSL_Vector pos) |
16000 | { | 15471 | { |
16001 | m_host.AddScriptLPS(1); | ||
16002 | |||
16003 | if (!World.Permissions.IsGod(m_host.OwnerID)) | 15472 | if (!World.Permissions.IsGod(m_host.OwnerID)) |
16004 | NotImplemented("llGodLikeRezObject"); | 15473 | NotImplemented("llGodLikeRezObject"); |
16005 | 15474 | ||
@@ -16080,8 +15549,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
16080 | return; | 15549 | return; |
16081 | } | 15550 | } |
16082 | 15551 | ||
16083 | m_host.AddScriptLPS(1); | ||
16084 | |||
16085 | if (item.PermsGranter == UUID.Zero) | 15552 | if (item.PermsGranter == UUID.Zero) |
16086 | { | 15553 | { |
16087 | replydata = "MISSING_PERMISSION_DEBIT"; | 15554 | replydata = "MISSING_PERMISSION_DEBIT"; |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 238fefb..e50b7fd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |||
@@ -120,7 +120,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
120 | LSShoutError("LightShare functions are not enabled."); | 120 | LSShoutError("LightShare functions are not enabled."); |
121 | return new LSL_List(); | 121 | return new LSL_List(); |
122 | } | 122 | } |
123 | m_host.AddScriptLPS(1); | ||
124 | RegionLightShareData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; | 123 | RegionLightShareData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; |
125 | 124 | ||
126 | LSL_List values = new LSL_List(); | 125 | LSL_List values = new LSL_List(); |
@@ -729,7 +728,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
729 | } | 728 | } |
730 | 729 | ||
731 | int success = 0; | 730 | int success = 0; |
732 | m_host.AddScriptLPS(1); | ||
733 | 731 | ||
734 | if (LightShareModule.EnableWindlight) | 732 | if (LightShareModule.EnableWindlight) |
735 | { | 733 | { |
@@ -807,7 +805,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
807 | } | 805 | } |
808 | 806 | ||
809 | int success = 0; | 807 | int success = 0; |
810 | m_host.AddScriptLPS(1); | ||
811 | 808 | ||
812 | if (LightShareModule.EnableWindlight) | 809 | if (LightShareModule.EnableWindlight) |
813 | { | 810 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 5c03191..2c025c1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -264,7 +264,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
264 | // for safe funtions always active | 264 | // for safe funtions always active |
265 | public void CheckThreatLevel() | 265 | public void CheckThreatLevel() |
266 | { | 266 | { |
267 | m_host.AddScriptLPS(1); | ||
268 | if (!m_OSFunctionsEnabled) | 267 | if (!m_OSFunctionsEnabled) |
269 | OSSLError(String.Format("{0} permission denied. All OS functions are disabled.")); // throws | 268 | OSSLError(String.Format("{0} permission denied. All OS functions are disabled.")); // throws |
270 | } | 269 | } |
@@ -272,7 +271,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
272 | // Returns if the function is allowed. Throws a script exception if not allowed. | 271 | // Returns if the function is allowed. Throws a script exception if not allowed. |
273 | public void CheckThreatLevel(ThreatLevel level, string function) | 272 | public void CheckThreatLevel(ThreatLevel level, string function) |
274 | { | 273 | { |
275 | m_host.AddScriptLPS(1); | ||
276 | if (!m_OSFunctionsEnabled) | 274 | if (!m_OSFunctionsEnabled) |
277 | OSSLError(String.Format("{0} permission denied. All OS functions are disabled.", function)); // throws | 275 | OSSLError(String.Format("{0} permission denied. All OS functions are disabled.", function)); // throws |
278 | 276 | ||
@@ -1811,7 +1809,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1811 | // the user does not have permission to see it. This as opposed to | 1809 | // the user does not have permission to see it. This as opposed to |
1812 | // throwing an exception. | 1810 | // throwing an exception. |
1813 | 1811 | ||
1814 | m_host.AddScriptLPS(1); | ||
1815 | string ret = String.Empty; | 1812 | string ret = String.Empty; |
1816 | // if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) | 1813 | // if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) |
1817 | { | 1814 | { |