aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
diff options
context:
space:
mode:
authoronefang2021-07-06 13:52:19 +1000
committeronefang2021-07-06 13:52:19 +1000
commit671ea405b272090e476b73ffd793279dfca75bb2 (patch)
tree9cdd85953f6daf72609f906795c6be8f93ed62a1 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
parentMove to dev version. (diff)
downloadopensim-SC-671ea405b272090e476b73ffd793279dfca75bb2.zip
opensim-SC-671ea405b272090e476b73ffd793279dfca75bb2.tar.gz
opensim-SC-671ea405b272090e476b73ffd793279dfca75bb2.tar.bz2
opensim-SC-671ea405b272090e476b73ffd793279dfca75bb2.tar.xz
Fix up the usual script messes.
Don't slow scripts down with bogus monitoring that isn't used anywhere. Don't make scripts sleep all the time. Don't bother with useless OhSilly Threat checks, and clean up the remains.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs632
1 files changed, 0 insertions, 632 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 993fc6f..628ab54 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -351,7 +351,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
351 m_internalObjectHost = smtpConfig.GetString("internal_object_host", m_internalObjectHost); 351 m_internalObjectHost = smtpConfig.GetString("internal_object_host", m_internalObjectHost);
352 } 352 }
353 } 353 }
354//// m_sleepMsOnEmail = EMAIL_PAUSE_TIME * 1000;
355 } 354 }
356 355
357 public override Object InitializeLifetimeService() 356 public override Object InitializeLifetimeService()
@@ -380,15 +379,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
380 return p; 379 return p;
381 } 380 }
382 381
383//// protected virtual void ScriptSleep(int delay)
384//// {
385//// delay = (int)(delay * m_ScriptDelayFactor);
386//// if (delay < 10)
387//// return;
388////
389//// Sleep(delay);
390//// }
391
392 protected virtual void Sleep(int delay) 382 protected virtual void Sleep(int delay)
393 { 383 {
394 if (m_item == null) // Some unit tests don't set this 384 if (m_item == null) // Some unit tests don't set this
@@ -420,8 +410,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
420 [DebuggerNonUserCode] 410 [DebuggerNonUserCode]
421 public void llResetScript() 411 public void llResetScript()
422 { 412 {
423//// m_host.AddScriptLPS(1);
424
425 // We need to tell the URL module, if we hav one, to release 413 // We need to tell the URL module, if we hav one, to release
426 // the allocated URLs 414 // the allocated URLs
427 if (m_UrlModule != null) 415 if (m_UrlModule != null)
@@ -436,7 +424,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
436 424
437 if ((item = GetScriptByName(name)) == UUID.Zero) 425 if ((item = GetScriptByName(name)) == UUID.Zero)
438 { 426 {
439//// m_host.AddScriptLPS(1);
440 Error("llResetOtherScript", "Can't find script '" + name + "'"); 427 Error("llResetOtherScript", "Can't find script '" + name + "'");
441 return; 428 return;
442 } 429 }
@@ -444,7 +431,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
444 llResetScript(); 431 llResetScript();
445 else 432 else
446 { 433 {
447//// m_host.AddScriptLPS(1);
448 m_ScriptEngine.ResetScript(item); 434 m_ScriptEngine.ResetScript(item);
449 } 435 }
450 } 436 }
@@ -453,8 +439,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
453 { 439 {
454 UUID item; 440 UUID item;
455 441
456//// m_host.AddScriptLPS(1);
457
458 if ((item = GetScriptByName(name)) != UUID.Zero) 442 if ((item = GetScriptByName(name)) != UUID.Zero)
459 { 443 {
460 return m_ScriptEngine.GetScriptState(item) ?1:0; 444 return m_ScriptEngine.GetScriptState(item) ?1:0;
@@ -472,8 +456,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
472 { 456 {
473 UUID item; 457 UUID item;
474 458
475//// m_host.AddScriptLPS(1);
476
477 // These functions are supposed to be robust, 459 // These functions are supposed to be robust,
478 // so get the state one step at a time. 460 // so get the state one step at a time.
479 461
@@ -716,44 +698,37 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
716 //These are the implementations of the various ll-functions used by the LSL scripts. 698 //These are the implementations of the various ll-functions used by the LSL scripts.
717 public LSL_Float llSin(double f) 699 public LSL_Float llSin(double f)
718 { 700 {
719//// m_host.AddScriptLPS(1);
720 return (double)Math.Sin(f); 701 return (double)Math.Sin(f);
721 } 702 }
722 703
723 public LSL_Float llCos(double f) 704 public LSL_Float llCos(double f)
724 { 705 {
725//// m_host.AddScriptLPS(1);
726 return Math.Cos(f); 706 return Math.Cos(f);
727 } 707 }
728 708
729 public LSL_Float llTan(double f) 709 public LSL_Float llTan(double f)
730 { 710 {
731//// m_host.AddScriptLPS(1);
732 return Math.Tan(f); 711 return Math.Tan(f);
733 } 712 }
734 713
735 public LSL_Float llAtan2(LSL_Float x, LSL_Float y) 714 public LSL_Float llAtan2(LSL_Float x, LSL_Float y)
736 { 715 {
737//// m_host.AddScriptLPS(1);
738 return Math.Atan2(x, y); 716 return Math.Atan2(x, y);
739 } 717 }
740 718
741 public LSL_Float llSqrt(double f) 719 public LSL_Float llSqrt(double f)
742 { 720 {
743//// m_host.AddScriptLPS(1);
744 return Math.Sqrt(f); 721 return Math.Sqrt(f);
745 } 722 }
746 723
747 public LSL_Float llPow(double fbase, double fexponent) 724 public LSL_Float llPow(double fbase, double fexponent)
748 { 725 {
749//// m_host.AddScriptLPS(1);
750 return (double)Math.Pow(fbase, fexponent); 726 return (double)Math.Pow(fbase, fexponent);
751 } 727 }
752 728
753 public LSL_Integer llAbs(LSL_Integer i) 729 public LSL_Integer llAbs(LSL_Integer i)
754 { 730 {
755 // changed to replicate LSL behaviour whereby minimum int value is returned untouched. 731 // changed to replicate LSL behaviour whereby minimum int value is returned untouched.
756//// m_host.AddScriptLPS(1);
757 if (i == Int32.MinValue) 732 if (i == Int32.MinValue)
758 return i; 733 return i;
759 else 734 else
@@ -762,13 +737,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
762 737
763 public LSL_Float llFabs(double f) 738 public LSL_Float llFabs(double f)
764 { 739 {
765//// m_host.AddScriptLPS(1);
766 return (double)Math.Abs(f); 740 return (double)Math.Abs(f);
767 } 741 }
768 742
769 public LSL_Float llFrand(double mag) 743 public LSL_Float llFrand(double mag)
770 { 744 {
771//// m_host.AddScriptLPS(1);
772 lock (Util.RandomClass) 745 lock (Util.RandomClass)
773 { 746 {
774 return Util.RandomClass.NextDouble() * mag; 747 return Util.RandomClass.NextDouble() * mag;
@@ -777,33 +750,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
777 750
778 public LSL_Integer llFloor(double f) 751 public LSL_Integer llFloor(double f)
779 { 752 {
780//// m_host.AddScriptLPS(1);
781 return (int)Math.Floor(f); 753 return (int)Math.Floor(f);
782 } 754 }
783 755
784 public LSL_Integer llCeil(double f) 756 public LSL_Integer llCeil(double f)
785 { 757 {
786//// m_host.AddScriptLPS(1);
787 return (int)Math.Ceiling(f); 758 return (int)Math.Ceiling(f);
788 } 759 }
789 760
790 // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven) 761 // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven)
791 public LSL_Integer llRound(double f) 762 public LSL_Integer llRound(double f)
792 { 763 {
793//// m_host.AddScriptLPS(1);
794 return (int)Math.Round(f, MidpointRounding.AwayFromZero); 764 return (int)Math.Round(f, MidpointRounding.AwayFromZero);
795 } 765 }
796 766
797 //This next group are vector operations involving squaring and square root. ckrinke 767 //This next group are vector operations involving squaring and square root. ckrinke
798 public LSL_Float llVecMag(LSL_Vector v) 768 public LSL_Float llVecMag(LSL_Vector v)
799 { 769 {
800//// m_host.AddScriptLPS(1);
801 return LSL_Vector.Mag(v); 770 return LSL_Vector.Mag(v);
802 } 771 }
803 772
804 public LSL_Vector llVecNorm(LSL_Vector v) 773 public LSL_Vector llVecNorm(LSL_Vector v)
805 { 774 {
806//// m_host.AddScriptLPS(1);
807 return LSL_Vector.Norm(v); 775 return LSL_Vector.Norm(v);
808 } 776 }
809 777
@@ -817,7 +785,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
817 785
818 public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) 786 public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b)
819 { 787 {
820//// m_host.AddScriptLPS(1);
821 return VecDist(a, b); 788 return VecDist(a, b);
822 } 789 }
823 790
@@ -827,7 +794,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
827 794
828 public LSL_Vector llRot2Euler(LSL_Rotation q1) 795 public LSL_Vector llRot2Euler(LSL_Rotation q1)
829 { 796 {
830//// m_host.AddScriptLPS(1);
831 LSL_Vector eul = new LSL_Vector(); 797 LSL_Vector eul = new LSL_Vector();
832 798
833 double sqw = q1.s*q1.s; 799 double sqw = q1.s*q1.s;
@@ -901,8 +867,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
901 867
902 public LSL_Rotation llEuler2Rot(LSL_Vector v) 868 public LSL_Rotation llEuler2Rot(LSL_Vector v)
903 { 869 {
904//// m_host.AddScriptLPS(1);
905
906 double x,y,z,s; 870 double x,y,z,s;
907 v.x *= 0.5; 871 v.x *= 0.5;
908 v.y *= 0.5; 872 v.y *= 0.5;
@@ -928,7 +892,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
928 892
929 public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up) 893 public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up)
930 { 894 {
931//// m_host.AddScriptLPS(1);
932 double s; 895 double s;
933 double tr = fwd.x + left.y + up.z + 1.0; 896 double tr = fwd.x + left.y + up.z + 1.0;
934 897
@@ -983,8 +946,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
983 946
984 public LSL_Vector llRot2Fwd(LSL_Rotation r) 947 public LSL_Vector llRot2Fwd(LSL_Rotation r)
985 { 948 {
986//// m_host.AddScriptLPS(1);
987
988 double x, y, z, m; 949 double x, y, z, m;
989 950
990 m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; 951 m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s;
@@ -1008,8 +969,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1008 969
1009 public LSL_Vector llRot2Left(LSL_Rotation r) 970 public LSL_Vector llRot2Left(LSL_Rotation r)
1010 { 971 {
1011//// m_host.AddScriptLPS(1);
1012
1013 double x, y, z, m; 972 double x, y, z, m;
1014 973
1015 m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; 974 m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s;
@@ -1033,7 +992,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1033 992
1034 public LSL_Vector llRot2Up(LSL_Rotation r) 993 public LSL_Vector llRot2Up(LSL_Rotation r)
1035 { 994 {
1036//// m_host.AddScriptLPS(1);
1037 double x, y, z, m; 995 double x, y, z, m;
1038 996
1039 m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; 997 m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s;
@@ -1058,7 +1016,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1058 public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b) 1016 public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b)
1059 { 1017 {
1060 //A and B should both be normalized 1018 //A and B should both be normalized
1061//// m_host.AddScriptLPS(1);
1062 /* This method is more accurate than the SL one, and thus causes problems 1019 /* This method is more accurate than the SL one, and thus causes problems
1063 for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. 1020 for scripts that deal with the SL inaccuracy around 180-degrees -.- .._.
1064 1021
@@ -1131,8 +1088,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1131 1088
1132 public void llWhisper(int channelID, string text) 1089 public void llWhisper(int channelID, string text)
1133 { 1090 {
1134//// m_host.AddScriptLPS(1);
1135
1136 if (text.Length > 1023) 1091 if (text.Length > 1023)
1137 text = text.Substring(0, 1023); 1092 text = text.Substring(0, 1023);
1138 1093
@@ -1158,15 +1113,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1158 1113
1159 public void llSay(int channelID, string text) 1114 public void llSay(int channelID, string text)
1160 { 1115 {
1161//// m_host.AddScriptLPS(1);
1162
1163 if (channelID == 0) 1116 if (channelID == 0)
1164// m_SayShoutCount++;
1165 CheckSayShoutTime(); 1117 CheckSayShoutTime();
1166 1118
1167//// if (m_SayShoutCount >= 11)
1168//// ScriptSleep(2000);
1169
1170 if (m_scriptConsoleChannelEnabled && (channelID == m_scriptConsoleChannel)) 1119 if (m_scriptConsoleChannelEnabled && (channelID == m_scriptConsoleChannel))
1171 { 1120 {
1172 Console.WriteLine(text); 1121 Console.WriteLine(text);
@@ -1187,15 +1136,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1187 1136
1188 public void llShout(int channelID, string text) 1137 public void llShout(int channelID, string text)
1189 { 1138 {
1190//// m_host.AddScriptLPS(1);
1191
1192 if (channelID == 0) 1139 if (channelID == 0)
1193// m_SayShoutCount++;
1194 CheckSayShoutTime(); 1140 CheckSayShoutTime();
1195 1141
1196//// if (m_SayShoutCount >= 11)
1197//// ScriptSleep(2000);
1198
1199 if (text.Length > 1023) 1142 if (text.Length > 1023)
1200 text = text.Substring(0, 1023); 1143 text = text.Substring(0, 1023);
1201 1144
@@ -1217,9 +1160,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1217 1160
1218 if (text.Length > 1023) 1161 if (text.Length > 1023)
1219 text = text.Substring(0, 1023); 1162 text = text.Substring(0, 1023);
1220
1221//// m_host.AddScriptLPS(1);
1222
1223 // debug channel is also sent to avatars 1163 // debug channel is also sent to avatars
1224 if (channelID == ScriptBaseClass.DEBUG_CHANNEL) 1164 if (channelID == ScriptBaseClass.DEBUG_CHANNEL)
1225 { 1165 {
@@ -1238,8 +1178,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1238 if (msg.Length > 1023) 1178 if (msg.Length > 1023)
1239 msg = msg.Substring(0, 1023); 1179 msg = msg.Substring(0, 1023);
1240 1180
1241//// m_host.AddScriptLPS(1);
1242
1243 if (channel == ScriptBaseClass.DEBUG_CHANNEL) 1181 if (channel == ScriptBaseClass.DEBUG_CHANNEL)
1244 return; 1182 return;
1245 1183
@@ -1253,7 +1191,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1253 1191
1254 public LSL_Integer llListen(int channelID, string name, string ID, string msg) 1192 public LSL_Integer llListen(int channelID, string name, string ID, string msg)
1255 { 1193 {
1256//// m_host.AddScriptLPS(1);
1257 UUID keyID; 1194 UUID keyID;
1258 UUID.TryParse(ID, out keyID); 1195 UUID.TryParse(ID, out keyID);
1259 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 1196 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -1265,7 +1202,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1265 1202
1266 public void llListenControl(int number, int active) 1203 public void llListenControl(int number, int active)
1267 { 1204 {
1268//// m_host.AddScriptLPS(1);
1269 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 1205 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
1270 if (wComm != null) 1206 if (wComm != null)
1271 wComm.ListenControl(m_item.ItemID, number, active); 1207 wComm.ListenControl(m_item.ItemID, number, active);
@@ -1273,7 +1209,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1273 1209
1274 public void llListenRemove(int number) 1210 public void llListenRemove(int number)
1275 { 1211 {
1276//// m_host.AddScriptLPS(1);
1277 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 1212 IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
1278 if (wComm != null) 1213 if (wComm != null)
1279 wComm.ListenRemove(m_item.ItemID, number); 1214 wComm.ListenRemove(m_item.ItemID, number);
@@ -1281,7 +1216,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1281 1216
1282 public void llSensor(string name, string id, int type, double range, double arc) 1217 public void llSensor(string name, string id, int type, double range, double arc)
1283 { 1218 {
1284//// m_host.AddScriptLPS(1);
1285 UUID keyID = UUID.Zero; 1219 UUID keyID = UUID.Zero;
1286 UUID.TryParse(id, out keyID); 1220 UUID.TryParse(id, out keyID);
1287 1221
@@ -1290,7 +1224,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1290 1224
1291 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) 1225 public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate)
1292 { 1226 {
1293//// m_host.AddScriptLPS(1);
1294 UUID keyID = UUID.Zero; 1227 UUID keyID = UUID.Zero;
1295 UUID.TryParse(id, out keyID); 1228 UUID.TryParse(id, out keyID);
1296 1229
@@ -1299,7 +1232,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1299 1232
1300 public void llSensorRemove() 1233 public void llSensorRemove()
1301 { 1234 {
1302//// m_host.AddScriptLPS(1);
1303 AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID); 1235 AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID);
1304 } 1236 }
1305 1237
@@ -1340,7 +1272,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1340 1272
1341 public LSL_String llDetectedName(int number) 1273 public LSL_String llDetectedName(int number)
1342 { 1274 {
1343//// m_host.AddScriptLPS(1);
1344 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1275 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1345 if (detectedParams == null) 1276 if (detectedParams == null)
1346 return String.Empty; 1277 return String.Empty;
@@ -1349,7 +1280,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1349 1280
1350 public LSL_Key llDetectedKey(int number) 1281 public LSL_Key llDetectedKey(int number)
1351 { 1282 {
1352//// m_host.AddScriptLPS(1);
1353 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1283 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1354 if (detectedParams == null) 1284 if (detectedParams == null)
1355 return String.Empty; 1285 return String.Empty;
@@ -1358,7 +1288,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1358 1288
1359 public LSL_Key llDetectedOwner(int number) 1289 public LSL_Key llDetectedOwner(int number)
1360 { 1290 {
1361//// m_host.AddScriptLPS(1);
1362 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1291 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1363 if (detectedParams == null) 1292 if (detectedParams == null)
1364 return String.Empty; 1293 return String.Empty;
@@ -1367,7 +1296,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1367 1296
1368 public LSL_Integer llDetectedType(int number) 1297 public LSL_Integer llDetectedType(int number)
1369 { 1298 {
1370//// m_host.AddScriptLPS(1);
1371 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1299 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1372 if (detectedParams == null) 1300 if (detectedParams == null)
1373 return 0; 1301 return 0;
@@ -1376,7 +1304,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1376 1304
1377 public LSL_Vector llDetectedPos(int number) 1305 public LSL_Vector llDetectedPos(int number)
1378 { 1306 {
1379//// m_host.AddScriptLPS(1);
1380 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1307 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1381 if (detectedParams == null) 1308 if (detectedParams == null)
1382 return new LSL_Vector(); 1309 return new LSL_Vector();
@@ -1385,7 +1312,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1385 1312
1386 public LSL_Vector llDetectedVel(int number) 1313 public LSL_Vector llDetectedVel(int number)
1387 { 1314 {
1388//// m_host.AddScriptLPS(1);
1389 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1315 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1390 if (detectedParams == null) 1316 if (detectedParams == null)
1391 return new LSL_Vector(); 1317 return new LSL_Vector();
@@ -1394,7 +1320,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1394 1320
1395 public LSL_Vector llDetectedGrab(int number) 1321 public LSL_Vector llDetectedGrab(int number)
1396 { 1322 {
1397//// m_host.AddScriptLPS(1);
1398 DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1323 DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1399 if (parms == null) 1324 if (parms == null)
1400 return new LSL_Vector(0, 0, 0); 1325 return new LSL_Vector(0, 0, 0);
@@ -1404,7 +1329,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1404 1329
1405 public LSL_Rotation llDetectedRot(int number) 1330 public LSL_Rotation llDetectedRot(int number)
1406 { 1331 {
1407//// m_host.AddScriptLPS(1);
1408 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1332 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1409 if (detectedParams == null) 1333 if (detectedParams == null)
1410 return new LSL_Rotation(); 1334 return new LSL_Rotation();
@@ -1413,7 +1337,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1413 1337
1414 public LSL_Integer llDetectedGroup(int number) 1338 public LSL_Integer llDetectedGroup(int number)
1415 { 1339 {
1416//// m_host.AddScriptLPS(1);
1417 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1340 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1418 if (detectedParams == null) 1341 if (detectedParams == null)
1419 return new LSL_Integer(0); 1342 return new LSL_Integer(0);
@@ -1424,7 +1347,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1424 1347
1425 public LSL_Integer llDetectedLinkNumber(int number) 1348 public LSL_Integer llDetectedLinkNumber(int number)
1426 { 1349 {
1427//// m_host.AddScriptLPS(1);
1428 DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); 1350 DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number);
1429 if (parms == null) 1351 if (parms == null)
1430 return new LSL_Integer(0); 1352 return new LSL_Integer(0);
@@ -1437,7 +1359,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1437 /// </summary> 1359 /// </summary>
1438 public LSL_Vector llDetectedTouchBinormal(int index) 1360 public LSL_Vector llDetectedTouchBinormal(int index)
1439 { 1361 {
1440//// m_host.AddScriptLPS(1);
1441 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); 1362 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index);
1442 if (detectedParams == null) 1363 if (detectedParams == null)
1443 return new LSL_Vector(); 1364 return new LSL_Vector();
@@ -1449,7 +1370,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1449 /// </summary> 1370 /// </summary>
1450 public LSL_Integer llDetectedTouchFace(int index) 1371 public LSL_Integer llDetectedTouchFace(int index)
1451 { 1372 {
1452//// m_host.AddScriptLPS(1);
1453 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); 1373 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index);
1454 if (detectedParams == null) 1374 if (detectedParams == null)
1455 return new LSL_Integer(-1); 1375 return new LSL_Integer(-1);
@@ -1461,7 +1381,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1461 /// </summary> 1381 /// </summary>
1462 public LSL_Vector llDetectedTouchNormal(int index) 1382 public LSL_Vector llDetectedTouchNormal(int index)
1463 { 1383 {
1464//// m_host.AddScriptLPS(1);
1465 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); 1384 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index);
1466 if (detectedParams == null) 1385 if (detectedParams == null)
1467 return new LSL_Vector(); 1386 return new LSL_Vector();
@@ -1473,7 +1392,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1473 /// </summary> 1392 /// </summary>
1474 public LSL_Vector llDetectedTouchPos(int index) 1393 public LSL_Vector llDetectedTouchPos(int index)
1475 { 1394 {
1476//// m_host.AddScriptLPS(1);
1477 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); 1395 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index);
1478 if (detectedParams == null) 1396 if (detectedParams == null)
1479 return new LSL_Vector(); 1397 return new LSL_Vector();
@@ -1485,7 +1403,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1485 /// </summary> 1403 /// </summary>
1486 public LSL_Vector llDetectedTouchST(int index) 1404 public LSL_Vector llDetectedTouchST(int index)
1487 { 1405 {
1488//// m_host.AddScriptLPS(1);
1489 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); 1406 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index);
1490 if (detectedParams == null) 1407 if (detectedParams == null)
1491 return new LSL_Vector(-1.0, -1.0, 0.0); 1408 return new LSL_Vector(-1.0, -1.0, 0.0);
@@ -1497,7 +1414,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1497 /// </summary> 1414 /// </summary>
1498 public LSL_Vector llDetectedTouchUV(int index) 1415 public LSL_Vector llDetectedTouchUV(int index)
1499 { 1416 {
1500//// m_host.AddScriptLPS(1);
1501 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); 1417 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index);
1502 if (detectedParams == null) 1418 if (detectedParams == null)
1503 return new LSL_Vector(-1.0, -1.0, 0.0); 1419 return new LSL_Vector(-1.0, -1.0, 0.0);
@@ -1507,13 +1423,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1507 [DebuggerNonUserCode] 1423 [DebuggerNonUserCode]
1508 public virtual void llDie() 1424 public virtual void llDie()
1509 { 1425 {
1510//// m_host.AddScriptLPS(1);
1511 if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException(); 1426 if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException();
1512 } 1427 }
1513 1428
1514 public LSL_Float llGround(LSL_Vector offset) 1429 public LSL_Float llGround(LSL_Vector offset)
1515 { 1430 {
1516//// m_host.AddScriptLPS(1);
1517 Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; 1431 Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset;
1518 1432
1519 //Get the slope normal. This gives us the equation of the plane tangent to the slope. 1433 //Get the slope normal. This gives us the equation of the plane tangent to the slope.
@@ -1543,7 +1457,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1543 1457
1544 public LSL_Float llCloud(LSL_Vector offset) 1458 public LSL_Float llCloud(LSL_Vector offset)
1545 { 1459 {
1546//// m_host.AddScriptLPS(1);
1547 float cloudCover = 0f; 1460 float cloudCover = 0f;
1548 ICloudModule module = World.RequestModuleInterface<ICloudModule>(); 1461 ICloudModule module = World.RequestModuleInterface<ICloudModule>();
1549 if (module != null) 1462 if (module != null)
@@ -1560,7 +1473,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1560 1473
1561 public LSL_Vector llWind(LSL_Vector offset) 1474 public LSL_Vector llWind(LSL_Vector offset)
1562 { 1475 {
1563//// m_host.AddScriptLPS(1);
1564 LSL_Vector wind = new LSL_Vector(0, 0, 0); 1476 LSL_Vector wind = new LSL_Vector(0, 0, 0);
1565 IWindModule module = World.RequestModuleInterface<IWindModule>(); 1477 IWindModule module = World.RequestModuleInterface<IWindModule>();
1566 if (module != null) 1478 if (module != null)
@@ -1581,7 +1493,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1581 { 1493 {
1582 if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) 1494 if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted)
1583 return; 1495 return;
1584//// m_host.AddScriptLPS(1);
1585 1496
1586 int statusrotationaxis = 0; 1497 int statusrotationaxis = 0;
1587 1498
@@ -1698,7 +1609,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1698 1609
1699 public LSL_Integer llGetStatus(int status) 1610 public LSL_Integer llGetStatus(int status)
1700 { 1611 {
1701//// m_host.AddScriptLPS(1);
1702 // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); 1612 // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString());
1703 switch (status) 1613 switch (status)
1704 { 1614 {
@@ -1767,7 +1677,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1767 1677
1768 public LSL_Integer llScaleByFactor(double scaling_factor) 1678 public LSL_Integer llScaleByFactor(double scaling_factor)
1769 { 1679 {
1770//// m_host.AddScriptLPS(1);
1771 SceneObjectGroup group = m_host.ParentGroup; 1680 SceneObjectGroup group = m_host.ParentGroup;
1772 1681
1773 if(scaling_factor < 1e-6) 1682 if(scaling_factor < 1e-6)
@@ -1792,7 +1701,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1792 1701
1793 public LSL_Float llGetMaxScaleFactor() 1702 public LSL_Float llGetMaxScaleFactor()
1794 { 1703 {
1795//// m_host.AddScriptLPS(1);
1796 SceneObjectGroup group = m_host.ParentGroup; 1704 SceneObjectGroup group = m_host.ParentGroup;
1797 1705
1798 if (group == null || group.IsDeleted || group.inTransit) 1706 if (group == null || group.IsDeleted || group.inTransit)
@@ -1803,7 +1711,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1803 1711
1804 public LSL_Float llGetMinScaleFactor() 1712 public LSL_Float llGetMinScaleFactor()
1805 { 1713 {
1806//// m_host.AddScriptLPS(1);
1807 SceneObjectGroup group = m_host.ParentGroup; 1714 SceneObjectGroup group = m_host.ParentGroup;
1808 1715
1809 if (group == null || group.IsDeleted || group.inTransit) 1716 if (group == null || group.IsDeleted || group.inTransit)
@@ -1814,7 +1721,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1814 1721
1815 public void llSetScale(LSL_Vector scale) 1722 public void llSetScale(LSL_Vector scale)
1816 { 1723 {
1817//// m_host.AddScriptLPS(1);
1818 SetScale(m_host, scale); 1724 SetScale(m_host, scale);
1819 } 1725 }
1820 1726
@@ -1850,13 +1756,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1850 1756
1851 public LSL_Vector llGetScale() 1757 public LSL_Vector llGetScale()
1852 { 1758 {
1853//// m_host.AddScriptLPS(1);
1854 return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); 1759 return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z);
1855 } 1760 }
1856 1761
1857 public void llSetClickAction(int action) 1762 public void llSetClickAction(int action)
1858 { 1763 {
1859//// m_host.AddScriptLPS(1);
1860 m_host.ClickAction = (byte)action; 1764 m_host.ClickAction = (byte)action;
1861 m_host.ParentGroup.HasGroupChanged = true; 1765 m_host.ParentGroup.HasGroupChanged = true;
1862 m_host.ScheduleFullUpdate(); 1766 m_host.ScheduleFullUpdate();
@@ -1865,7 +1769,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1865 1769
1866 public void llSetColor(LSL_Vector color, int face) 1770 public void llSetColor(LSL_Vector color, int face)
1867 { 1771 {
1868//// m_host.AddScriptLPS(1);
1869 1772
1870 SetColor(m_host, color, face); 1773 SetColor(m_host, color, face);
1871 } 1774 }
@@ -1880,8 +1783,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1880 1783
1881 public void llSetContentType(LSL_Key reqid, LSL_Integer type) 1784 public void llSetContentType(LSL_Key reqid, LSL_Integer type)
1882 { 1785 {
1883//// m_host.AddScriptLPS(1);
1884
1885 if (m_UrlModule == null) 1786 if (m_UrlModule == null)
1886 return; 1787 return;
1887 1788
@@ -2102,8 +2003,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2102 2003
2103 public LSL_Float llGetAlpha(int face) 2004 public LSL_Float llGetAlpha(int face)
2104 { 2005 {
2105//// m_host.AddScriptLPS(1);
2106
2107 return GetAlpha(m_host, face); 2006 return GetAlpha(m_host, face);
2108 } 2007 }
2109 2008
@@ -2128,15 +2027,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2128 2027
2129 public void llSetAlpha(double alpha, int face) 2028 public void llSetAlpha(double alpha, int face)
2130 { 2029 {
2131//// m_host.AddScriptLPS(1);
2132
2133 SetAlpha(m_host, alpha, face); 2030 SetAlpha(m_host, alpha, face);
2134 } 2031 }
2135 2032
2136 public void llSetLinkAlpha(int linknumber, double alpha, int face) 2033 public void llSetLinkAlpha(int linknumber, double alpha, int face)
2137 { 2034 {
2138//// m_host.AddScriptLPS(1);
2139
2140 List<SceneObjectPart> parts = GetLinkParts(linknumber); 2035 List<SceneObjectPart> parts = GetLinkParts(linknumber);
2141 if (parts.Count > 0) 2036 if (parts.Count > 0)
2142 { 2037 {
@@ -2273,7 +2168,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2273 2168
2274 public LSL_Vector llGetColor(int face) 2169 public LSL_Vector llGetColor(int face)
2275 { 2170 {
2276//// m_host.AddScriptLPS(1);
2277 return GetColor(m_host, face); 2171 return GetColor(m_host, face);
2278 } 2172 }
2279 2173
@@ -2320,15 +2214,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2320 2214
2321 public void llSetTexture(string texture, int face) 2215 public void llSetTexture(string texture, int face)
2322 { 2216 {
2323//// m_host.AddScriptLPS(1);
2324 SetTexture(m_host, texture, face); 2217 SetTexture(m_host, texture, face);
2325//// ScriptSleep(m_sleepMsOnSetTexture);
2326 } 2218 }
2327 2219
2328 public void llSetLinkTexture(int linknumber, string texture, int face) 2220 public void llSetLinkTexture(int linknumber, string texture, int face)
2329 { 2221 {
2330//// m_host.AddScriptLPS(1);
2331
2332 List<SceneObjectPart> parts = GetLinkParts(linknumber); 2222 List<SceneObjectPart> parts = GetLinkParts(linknumber);
2333 if (parts.Count > 0) 2223 if (parts.Count > 0)
2334 { 2224 {
@@ -2339,7 +2229,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2339 } 2229 }
2340 finally { } 2230 finally { }
2341 } 2231 }
2342//// ScriptSleep(m_sleepMsOnSetLinkTexture);
2343 } 2232 }
2344 2233
2345 protected void SetTextureParams(SceneObjectPart part, string texture, double scaleU, double ScaleV, 2234 protected void SetTextureParams(SceneObjectPart part, string texture, double scaleU, double ScaleV,
@@ -2448,10 +2337,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2448 2337
2449 public void llScaleTexture(double u, double v, int face) 2338 public void llScaleTexture(double u, double v, int face)
2450 { 2339 {
2451//// m_host.AddScriptLPS(1);
2452
2453 ScaleTexture(m_host, u, v, face); 2340 ScaleTexture(m_host, u, v, face);
2454//// ScriptSleep(m_sleepMsOnScaleTexture);
2455 } 2341 }
2456 2342
2457 protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) 2343 protected void ScaleTexture(SceneObjectPart part, double u, double v, int face)
@@ -2490,9 +2376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2490 2376
2491 public void llOffsetTexture(double u, double v, int face) 2377 public void llOffsetTexture(double u, double v, int face)
2492 { 2378 {
2493//// m_host.AddScriptLPS(1);
2494 OffsetTexture(m_host, u, v, face); 2379 OffsetTexture(m_host, u, v, face);
2495//// ScriptSleep(m_sleepMsOnOffsetTexture);
2496 } 2380 }
2497 2381
2498 protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) 2382 protected void OffsetTexture(SceneObjectPart part, double u, double v, int face)
@@ -2531,9 +2415,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2531 2415
2532 public void llRotateTexture(double rotation, int face) 2416 public void llRotateTexture(double rotation, int face)
2533 { 2417 {
2534//// m_host.AddScriptLPS(1);
2535 RotateTexture(m_host, rotation, face); 2418 RotateTexture(m_host, rotation, face);
2536//// ScriptSleep(m_sleepMsOnRotateTexture);
2537 } 2419 }
2538 2420
2539 protected void RotateTexture(SceneObjectPart part, double rotation, int face) 2421 protected void RotateTexture(SceneObjectPart part, double rotation, int face)
@@ -2569,7 +2451,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2569 2451
2570 public LSL_String llGetTexture(int face) 2452 public LSL_String llGetTexture(int face)
2571 { 2453 {
2572//// m_host.AddScriptLPS(1);
2573 return GetTexture(m_host, face); 2454 return GetTexture(m_host, face);
2574 } 2455 }
2575 2456
@@ -2611,11 +2492,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2611 2492
2612 public void llSetPos(LSL_Vector pos) 2493 public void llSetPos(LSL_Vector pos)
2613 { 2494 {
2614//// m_host.AddScriptLPS(1);
2615
2616 SetPos(m_host, pos, true); 2495 SetPos(m_host, pos, true);
2617
2618//// ScriptSleep(m_sleepMsOnSetPos);
2619 } 2496 }
2620 2497
2621 /// <summary> 2498 /// <summary>
@@ -2627,8 +2504,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2627 /// <returns>1 if successful, 0 otherwise.</returns> 2504 /// <returns>1 if successful, 0 otherwise.</returns>
2628 public LSL_Integer llSetRegionPos(LSL_Vector pos) 2505 public LSL_Integer llSetRegionPos(LSL_Vector pos)
2629 { 2506 {
2630//// m_host.AddScriptLPS(1);
2631
2632 // BEGIN WORKAROUND 2507 // BEGIN WORKAROUND
2633 // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND. 2508 // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND.
2634 // 2509 //
@@ -2742,20 +2617,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2742 2617
2743 public LSL_Vector llGetPos() 2618 public LSL_Vector llGetPos()
2744 { 2619 {
2745//// m_host.AddScriptLPS(1);
2746 return m_host.GetWorldPosition(); 2620 return m_host.GetWorldPosition();
2747 } 2621 }
2748 2622
2749 public LSL_Vector llGetLocalPos() 2623 public LSL_Vector llGetLocalPos()
2750 { 2624 {
2751//// m_host.AddScriptLPS(1);
2752 return GetPartLocalPos(m_host); 2625 return GetPartLocalPos(m_host);
2753 } 2626 }
2754 2627
2755 protected LSL_Vector GetPartLocalPos(SceneObjectPart part) 2628 protected LSL_Vector GetPartLocalPos(SceneObjectPart part)
2756 { 2629 {
2757//// m_host.AddScriptLPS(1);
2758
2759 Vector3 pos; 2630 Vector3 pos;
2760 2631
2761 if (!part.IsRoot) 2632 if (!part.IsRoot)
@@ -2777,8 +2648,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2777 2648
2778 public void llSetRot(LSL_Rotation rot) 2649 public void llSetRot(LSL_Rotation rot)
2779 { 2650 {
2780//// m_host.AddScriptLPS(1);
2781
2782 // try to let this work as in SL... 2651 // try to let this work as in SL...
2783 if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) 2652 if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart))
2784 { 2653 {
@@ -2794,15 +2663,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2794 SetRot(m_host, rootPart.RotationOffset * (Quaternion)rot); 2663 SetRot(m_host, rootPart.RotationOffset * (Quaternion)rot);
2795 } 2664 }
2796 } 2665 }
2797
2798//// ScriptSleep(m_sleepMsOnSetRot);
2799 } 2666 }
2800 2667
2801 public void llSetLocalRot(LSL_Rotation rot) 2668 public void llSetLocalRot(LSL_Rotation rot)
2802 { 2669 {
2803//// m_host.AddScriptLPS(1);
2804 SetRot(m_host, rot); 2670 SetRot(m_host, rot);
2805//// ScriptSleep(m_sleepMsOnSetLocalRot);
2806 } 2671 }
2807 2672
2808 protected void SetRot(SceneObjectPart part, Quaternion rot) 2673 protected void SetRot(SceneObjectPart part, Quaternion rot)
@@ -2862,7 +2727,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2862 return llGetRootRotation(); 2727 return llGetRootRotation();
2863 } 2728 }
2864 2729
2865//// m_host.AddScriptLPS(1);
2866 Quaternion q = m_host.GetWorldRotation(); 2730 Quaternion q = m_host.GetWorldRotation();
2867 2731
2868 if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0) 2732 if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0)
@@ -2927,15 +2791,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2927 2791
2928 private LSL_Rotation GetPartLocalRot(SceneObjectPart part) 2792 private LSL_Rotation GetPartLocalRot(SceneObjectPart part)
2929 { 2793 {
2930//// m_host.AddScriptLPS(1);
2931 Quaternion rot = part.RotationOffset; 2794 Quaternion rot = part.RotationOffset;
2932 return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); 2795 return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W);
2933 } 2796 }
2934 2797
2935 public void llSetForce(LSL_Vector force, int local) 2798 public void llSetForce(LSL_Vector force, int local)
2936 { 2799 {
2937//// m_host.AddScriptLPS(1);
2938
2939 if (!m_host.ParentGroup.IsDeleted) 2800 if (!m_host.ParentGroup.IsDeleted)
2940 { 2801 {
2941 if (local != 0) 2802 if (local != 0)
@@ -2949,8 +2810,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2949 { 2810 {
2950 LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0); 2811 LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0);
2951 2812
2952//// m_host.AddScriptLPS(1);
2953
2954 if (!m_host.ParentGroup.IsDeleted) 2813 if (!m_host.ParentGroup.IsDeleted)
2955 { 2814 {
2956 force = m_host.ParentGroup.RootPart.GetForce(); 2815 force = m_host.ParentGroup.RootPart.GetForce();
@@ -2961,55 +2820,46 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
2961 2820
2962 public void llSetVelocity(LSL_Vector vel, int local) 2821 public void llSetVelocity(LSL_Vector vel, int local)
2963 { 2822 {
2964//// m_host.AddScriptLPS(1);
2965 m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0); 2823 m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0);
2966 } 2824 }
2967 2825
2968 public void llSetAngularVelocity(LSL_Vector avel, int local) 2826 public void llSetAngularVelocity(LSL_Vector avel, int local)
2969 { 2827 {
2970//// m_host.AddScriptLPS(1);
2971 m_host.SetAngularVelocity(new Vector3((float)avel.x, (float)avel.y, (float)avel.z), local != 0); 2828 m_host.SetAngularVelocity(new Vector3((float)avel.x, (float)avel.y, (float)avel.z), local != 0);
2972 } 2829 }
2973 public LSL_Integer llTarget(LSL_Vector position, double range) 2830 public LSL_Integer llTarget(LSL_Vector position, double range)
2974 { 2831 {
2975//// m_host.AddScriptLPS(1);
2976 return m_host.ParentGroup.registerTargetWaypoint(position, 2832 return m_host.ParentGroup.registerTargetWaypoint(position,
2977 (float)range); 2833 (float)range);
2978 } 2834 }
2979 2835
2980 public void llTargetRemove(int number) 2836 public void llTargetRemove(int number)
2981 { 2837 {
2982//// m_host.AddScriptLPS(1);
2983 m_host.ParentGroup.unregisterTargetWaypoint(number); 2838 m_host.ParentGroup.unregisterTargetWaypoint(number);
2984 } 2839 }
2985 2840
2986 public LSL_Integer llRotTarget(LSL_Rotation rot, double error) 2841 public LSL_Integer llRotTarget(LSL_Rotation rot, double error)
2987 { 2842 {
2988//// m_host.AddScriptLPS(1);
2989 return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error); 2843 return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error);
2990 } 2844 }
2991 2845
2992 public void llRotTargetRemove(int number) 2846 public void llRotTargetRemove(int number)
2993 { 2847 {
2994//// m_host.AddScriptLPS(1);
2995 m_host.ParentGroup.unregisterRotTargetWaypoint(number); 2848 m_host.ParentGroup.unregisterRotTargetWaypoint(number);
2996 } 2849 }
2997 2850
2998 public void llMoveToTarget(LSL_Vector target, double tau) 2851 public void llMoveToTarget(LSL_Vector target, double tau)
2999 { 2852 {
3000//// m_host.AddScriptLPS(1);
3001 m_host.ParentGroup.MoveToTarget(target, (float)tau); 2853 m_host.ParentGroup.MoveToTarget(target, (float)tau);
3002 } 2854 }
3003 2855
3004 public void llStopMoveToTarget() 2856 public void llStopMoveToTarget()
3005 { 2857 {
3006//// m_host.AddScriptLPS(1);
3007 m_host.ParentGroup.StopMoveToTarget(); 2858 m_host.ParentGroup.StopMoveToTarget();
3008 } 2859 }
3009 2860
3010 public void llApplyImpulse(LSL_Vector force, LSL_Integer local) 2861 public void llApplyImpulse(LSL_Vector force, LSL_Integer local)
3011 { 2862 {
3012//// m_host.AddScriptLPS(1);
3013 //No energy force yet 2863 //No energy force yet
3014 Vector3 v = force; 2864 Vector3 v = force;
3015 if (v.Length() > 20000.0f) 2865 if (v.Length() > 20000.0f)
@@ -3023,26 +2873,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3023 2873
3024 public void llApplyRotationalImpulse(LSL_Vector force, int local) 2874 public void llApplyRotationalImpulse(LSL_Vector force, int local)
3025 { 2875 {
3026//// m_host.AddScriptLPS(1);
3027 m_host.ParentGroup.RootPart.ApplyAngularImpulse(force, local != 0); 2876 m_host.ParentGroup.RootPart.ApplyAngularImpulse(force, local != 0);
3028 } 2877 }
3029 2878
3030 public void llSetTorque(LSL_Vector torque, int local) 2879 public void llSetTorque(LSL_Vector torque, int local)
3031 { 2880 {
3032//// m_host.AddScriptLPS(1);
3033 m_host.ParentGroup.RootPart.SetAngularImpulse(torque, local != 0); 2881 m_host.ParentGroup.RootPart.SetAngularImpulse(torque, local != 0);
3034 } 2882 }
3035 2883
3036 public LSL_Vector llGetTorque() 2884 public LSL_Vector llGetTorque()
3037 { 2885 {
3038//// m_host.AddScriptLPS(1);
3039
3040 return new LSL_Vector(m_host.ParentGroup.GetTorque()); 2886 return new LSL_Vector(m_host.ParentGroup.GetTorque());
3041 } 2887 }
3042 2888
3043 public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) 2889 public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local)
3044 { 2890 {
3045//// m_host.AddScriptLPS(1);
3046 llSetForce(force, local); 2891 llSetForce(force, local);
3047 llSetTorque(torque, local); 2892 llSetTorque(torque, local);
3048 } 2893 }
@@ -3050,8 +2895,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3050 2895
3051 public LSL_Vector llGetVel() 2896 public LSL_Vector llGetVel()
3052 { 2897 {
3053//// m_host.AddScriptLPS(1);
3054
3055 Vector3 vel = Vector3.Zero; 2898 Vector3 vel = Vector3.Zero;
3056 2899
3057 if (m_host.ParentGroup.IsAttachment) 2900 if (m_host.ParentGroup.IsAttachment)
@@ -3070,46 +2913,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3070 2913
3071 public LSL_Vector llGetAccel() 2914 public LSL_Vector llGetAccel()
3072 { 2915 {
3073//// m_host.AddScriptLPS(1);
3074
3075 return new LSL_Vector(m_host.Acceleration); 2916 return new LSL_Vector(m_host.Acceleration);
3076 } 2917 }
3077 2918
3078 public LSL_Vector llGetOmega() 2919 public LSL_Vector llGetOmega()
3079 { 2920 {
3080//// m_host.AddScriptLPS(1);
3081 Vector3 avel = m_host.AngularVelocity; 2921 Vector3 avel = m_host.AngularVelocity;
3082 return new LSL_Vector(avel.X, avel.Y, avel.Z); 2922 return new LSL_Vector(avel.X, avel.Y, avel.Z);
3083 } 2923 }
3084 2924
3085 public LSL_Float llGetTimeOfDay() 2925 public LSL_Float llGetTimeOfDay()
3086 { 2926 {
3087//// m_host.AddScriptLPS(1);
3088 return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); 2927 return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4));
3089 } 2928 }
3090 2929
3091 public LSL_Float llGetWallclock() 2930 public LSL_Float llGetWallclock()
3092 { 2931 {
3093//// m_host.AddScriptLPS(1);
3094 return DateTime.Now.TimeOfDay.TotalSeconds; 2932 return DateTime.Now.TimeOfDay.TotalSeconds;
3095 } 2933 }
3096 2934
3097 public LSL_Float llGetTime() 2935 public LSL_Float llGetTime()
3098 { 2936 {
3099//// m_host.AddScriptLPS(1);
3100 double ScriptTime = Util.GetTimeStampMS() - m_timer; 2937 double ScriptTime = Util.GetTimeStampMS() - m_timer;
3101 return (float)Math.Round((ScriptTime / 1000.0), 3); 2938 return (float)Math.Round((ScriptTime / 1000.0), 3);
3102 } 2939 }
3103 2940
3104 public void llResetTime() 2941 public void llResetTime()
3105 { 2942 {
3106//// m_host.AddScriptLPS(1);
3107 m_timer = Util.GetTimeStampMS(); 2943 m_timer = Util.GetTimeStampMS();
3108 } 2944 }
3109 2945
3110 public LSL_Float llGetAndResetTime() 2946 public LSL_Float llGetAndResetTime()
3111 { 2947 {
3112//// m_host.AddScriptLPS(1);
3113 double now = Util.GetTimeStampMS(); 2948 double now = Util.GetTimeStampMS();
3114 double ScriptTime = now - m_timer; 2949 double ScriptTime = now - m_timer;
3115 m_timer = now; 2950 m_timer = now;
@@ -3118,7 +2953,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3118 2953
3119 public void llSound(string sound, double volume, int queue, int loop) 2954 public void llSound(string sound, double volume, int queue, int loop)
3120 { 2955 {
3121//// m_host.AddScriptLPS(1);
3122 Deprecated("llSound", "Use llPlaySound instead"); 2956 Deprecated("llSound", "Use llPlaySound instead");
3123 } 2957 }
3124 2958
@@ -3126,8 +2960,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3126 // 20080530 Updated to remove code duplication 2960 // 20080530 Updated to remove code duplication
3127 public void llPlaySound(string sound, double volume) 2961 public void llPlaySound(string sound, double volume)
3128 { 2962 {
3129//// m_host.AddScriptLPS(1);
3130
3131 if (m_SoundModule == null) 2963 if (m_SoundModule == null)
3132 return; 2964 return;
3133 2965
@@ -3141,8 +2973,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3141 2973
3142 public void llLoopSound(string sound, double volume) 2974 public void llLoopSound(string sound, double volume)
3143 { 2975 {
3144//// m_host.AddScriptLPS(1);
3145
3146 if (m_SoundModule == null) 2976 if (m_SoundModule == null)
3147 return; 2977 return;
3148 2978
@@ -3155,8 +2985,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3155 2985
3156 public void llLoopSoundMaster(string sound, double volume) 2986 public void llLoopSoundMaster(string sound, double volume)
3157 { 2987 {
3158//// m_host.AddScriptLPS(1);
3159
3160 if (m_SoundModule == null) 2988 if (m_SoundModule == null)
3161 return; 2989 return;
3162 2990
@@ -3169,8 +2997,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3169 2997
3170 public void llLoopSoundSlave(string sound, double volume) 2998 public void llLoopSoundSlave(string sound, double volume)
3171 { 2999 {
3172//// m_host.AddScriptLPS(1);
3173
3174 if (m_SoundModule == null) 3000 if (m_SoundModule == null)
3175 return; 3001 return;
3176 3002
@@ -3183,8 +3009,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3183 3009
3184 public void llPlaySoundSlave(string sound, double volume) 3010 public void llPlaySoundSlave(string sound, double volume)
3185 { 3011 {
3186//// m_host.AddScriptLPS(1);
3187
3188 if (m_SoundModule == null) 3012 if (m_SoundModule == null)
3189 return; 3013 return;
3190 3014
@@ -3198,8 +3022,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3198 3022
3199 public void llTriggerSound(string sound, double volume) 3023 public void llTriggerSound(string sound, double volume)
3200 { 3024 {
3201//// m_host.AddScriptLPS(1);
3202
3203 if (m_SoundModule == null) 3025 if (m_SoundModule == null)
3204 return; 3026 return;
3205 3027
@@ -3213,16 +3035,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3213 3035
3214 public void llStopSound() 3036 public void llStopSound()
3215 { 3037 {
3216//// m_host.AddScriptLPS(1);
3217
3218 if (m_SoundModule != null) 3038 if (m_SoundModule != null)
3219 m_SoundModule.StopSound(m_host.UUID); 3039 m_SoundModule.StopSound(m_host.UUID);
3220 } 3040 }
3221 3041
3222 public void llPreloadSound(string sound) 3042 public void llPreloadSound(string sound)
3223 { 3043 {
3224//// m_host.AddScriptLPS(1);
3225
3226 if (m_SoundModule == null) 3044 if (m_SoundModule == null)
3227 return; 3045 return;
3228 3046
@@ -3231,7 +3049,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3231 return; 3049 return;
3232 3050
3233 m_SoundModule.PreloadSound(m_host.UUID, soundID); 3051 m_SoundModule.PreloadSound(m_host.UUID, soundID);
3234//// ScriptSleep(m_sleepMsOnPreloadSound);
3235 } 3052 }
3236 3053
3237 /// <summary> 3054 /// <summary>
@@ -3242,8 +3059,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3242 /// </summary> 3059 /// </summary>
3243 public LSL_String llGetSubString(string src, int start, int end) 3060 public LSL_String llGetSubString(string src, int start, int end)
3244 { 3061 {
3245//// m_host.AddScriptLPS(1);
3246
3247 // Normalize indices (if negative). 3062 // Normalize indices (if negative).
3248 // After normlaization they may still be 3063 // After normlaization they may still be
3249 // negative, but that is now relative to 3064 // negative, but that is now relative to
@@ -3336,8 +3151,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3336 /// </summary> 3151 /// </summary>
3337 public LSL_String llDeleteSubString(string src, int start, int end) 3152 public LSL_String llDeleteSubString(string src, int start, int end)
3338 { 3153 {
3339//// m_host.AddScriptLPS(1);
3340
3341 // Normalize indices (if negative). 3154 // Normalize indices (if negative).
3342 // After normlaization they may still be 3155 // After normlaization they may still be
3343 // negative, but that is now relative to 3156 // negative, but that is now relative to
@@ -3417,8 +3230,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3417 /// </summary> 3230 /// </summary>
3418 public LSL_String llInsertString(string dest, int index, string src) 3231 public LSL_String llInsertString(string dest, int index, string src)
3419 { 3232 {
3420//// m_host.AddScriptLPS(1);
3421
3422 // Normalize indices (if negative). 3233 // Normalize indices (if negative).
3423 // After normlaization they may still be 3234 // After normlaization they may still be
3424 // negative, but that is now relative to 3235 // negative, but that is now relative to
@@ -3454,13 +3265,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3454 3265
3455 public LSL_String llToUpper(string src) 3266 public LSL_String llToUpper(string src)
3456 { 3267 {
3457//// m_host.AddScriptLPS(1);
3458 return src.ToUpper(); 3268 return src.ToUpper();
3459 } 3269 }
3460 3270
3461 public LSL_String llToLower(string src) 3271 public LSL_String llToLower(string src)
3462 { 3272 {
3463//// m_host.AddScriptLPS(1);
3464 return src.ToLower(); 3273 return src.ToLower();
3465 } 3274 }
3466 3275
@@ -3468,8 +3277,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3468 { 3277 {
3469 Util.FireAndForget(x => 3278 Util.FireAndForget(x =>
3470 { 3279 {
3471//// m_host.AddScriptLPS(1);
3472
3473 if (m_item.PermsGranter == UUID.Zero) 3280 if (m_item.PermsGranter == UUID.Zero)
3474 return; 3281 return;
3475 3282
@@ -3506,30 +3313,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3506 3313
3507 public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 3314 public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
3508 { 3315 {
3509//// m_host.AddScriptLPS(1);
3510 Deprecated("llMakeExplosion", "Use llParticleSystem instead"); 3316 Deprecated("llMakeExplosion", "Use llParticleSystem instead");
3511//// ScriptSleep(m_sleepMsOnMakeExplosion);
3512 } 3317 }
3513 3318
3514 public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) 3319 public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset)
3515 { 3320 {
3516//// m_host.AddScriptLPS(1);
3517 Deprecated("llMakeFountain", "Use llParticleSystem instead"); 3321 Deprecated("llMakeFountain", "Use llParticleSystem instead");
3518//// ScriptSleep(m_sleepMsOnMakeFountain);
3519 } 3322 }
3520 3323
3521 public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 3324 public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
3522 { 3325 {
3523//// m_host.AddScriptLPS(1);
3524 Deprecated("llMakeSmoke", "Use llParticleSystem instead"); 3326 Deprecated("llMakeSmoke", "Use llParticleSystem instead");
3525//// ScriptSleep(m_sleepMsOnMakeSmoke);
3526 } 3327 }
3527 3328
3528 public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) 3329 public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset)
3529 { 3330 {
3530//// m_host.AddScriptLPS(1);
3531 Deprecated("llMakeFire", "Use llParticleSystem instead"); 3331 Deprecated("llMakeFire", "Use llParticleSystem instead");
3532//// ScriptSleep(m_sleepMsOnMakeFire);
3533 } 3332 }
3534 3333
3535 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) 3334 public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
@@ -3539,7 +3338,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3539 3338
3540 public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) 3339 public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot)
3541 { 3340 {
3542//// m_host.AddScriptLPS(1);
3543 if (string.IsNullOrEmpty(inventory) || Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) 3341 if (string.IsNullOrEmpty(inventory) || Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s))
3544 return; 3342 return;
3545 3343
@@ -3603,9 +3401,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3603 } 3401 }
3604 } 3402 }
3605 }, null, "LSL_Api.doObjectRez"); 3403 }, null, "LSL_Api.doObjectRez");
3606
3607//// //ScriptSleep((int)((groupmass * velmag) / 10));
3608//// ScriptSleep(m_sleepMsOnRezAtRoot);
3609 } 3404 }
3610 3405
3611 public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) 3406 public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param)
@@ -3615,8 +3410,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3615 3410
3616 public void llLookAt(LSL_Vector target, double strength, double damping) 3411 public void llLookAt(LSL_Vector target, double strength, double damping)
3617 { 3412 {
3618//// m_host.AddScriptLPS(1);
3619
3620 // Get the normalized vector to the target 3413 // Get the normalized vector to the target
3621 LSL_Vector from = llGetPos(); 3414 LSL_Vector from = llGetPos();
3622 3415
@@ -3663,7 +3456,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3663 3456
3664 public void llStopLookAt() 3457 public void llStopLookAt()
3665 { 3458 {
3666//// m_host.AddScriptLPS(1);
3667 m_host.StopLookAt(); 3459 m_host.StopLookAt();
3668 } 3460 }
3669 3461
@@ -3671,7 +3463,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3671 { 3463 {
3672 if (sec != 0.0 && sec < m_MinTimerInterval) 3464 if (sec != 0.0 && sec < m_MinTimerInterval)
3673 sec = m_MinTimerInterval; 3465 sec = m_MinTimerInterval;
3674//// m_host.AddScriptLPS(1);
3675 // Setting timer repeat 3466 // Setting timer repeat
3676 AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec); 3467 AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec);
3677 } 3468 }
@@ -3679,15 +3470,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3679 public virtual void llSleep(double sec) 3470 public virtual void llSleep(double sec)
3680 { 3471 {
3681// m_log.Info("llSleep snoozing " + sec + "s."); 3472// m_log.Info("llSleep snoozing " + sec + "s.");
3682//// m_host.AddScriptLPS(1);
3683
3684 Sleep((int)(sec * 1000)); 3473 Sleep((int)(sec * 1000));
3685 } 3474 }
3686 3475
3687 public LSL_Float llGetMass() 3476 public LSL_Float llGetMass()
3688 { 3477 {
3689//// m_host.AddScriptLPS(1);
3690
3691 if (m_host.ParentGroup.IsAttachment) 3478 if (m_host.ParentGroup.IsAttachment)
3692 { 3479 {
3693 ScenePresence attachedAvatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar); 3480 ScenePresence attachedAvatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar);
@@ -3722,7 +3509,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3722 3509
3723 public void llCollisionFilter(LSL_String name, LSL_Key id, LSL_Integer accept) 3510 public void llCollisionFilter(LSL_String name, LSL_Key id, LSL_Integer accept)
3724 { 3511 {
3725//// m_host.AddScriptLPS(1);
3726 m_host.CollisionFilter.Clear(); 3512 m_host.CollisionFilter.Clear();
3727 UUID objectID; 3513 UUID objectID;
3728 3514
@@ -3749,14 +3535,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3749 } 3535 }
3750 } 3536 }
3751 } 3537 }
3752
3753//// m_host.AddScriptLPS(1);
3754 } 3538 }
3755 3539
3756 public void llReleaseControls() 3540 public void llReleaseControls()
3757 { 3541 {
3758//// m_host.AddScriptLPS(1);
3759
3760 if (m_item.PermsGranter != UUID.Zero) 3542 if (m_item.PermsGranter != UUID.Zero)
3761 { 3543 {
3762 ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); 3544 ScenePresence presence = World.GetScenePresence(m_item.PermsGranter);
@@ -3776,7 +3558,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3776 3558
3777 public void llReleaseURL(string url) 3559 public void llReleaseURL(string url)
3778 { 3560 {
3779//// m_host.AddScriptLPS(1);
3780 if (m_UrlModule != null) 3561 if (m_UrlModule != null)
3781 m_UrlModule.ReleaseURL(url); 3562 m_UrlModule.ReleaseURL(url);
3782 } 3563 }
@@ -3824,8 +3605,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3824 3605
3825 public void llAttachToAvatar(LSL_Integer attachmentPoint) 3606 public void llAttachToAvatar(LSL_Integer attachmentPoint)
3826 { 3607 {
3827//// m_host.AddScriptLPS(1);
3828
3829 if (m_item.PermsGranter != m_host.OwnerID) 3608 if (m_item.PermsGranter != m_host.OwnerID)
3830 return; 3609 return;
3831 3610
@@ -3887,8 +3666,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3887 3666
3888 public void llDetachFromAvatar() 3667 public void llDetachFromAvatar()
3889 { 3668 {
3890//// m_host.AddScriptLPS(1);
3891
3892 if (m_host.ParentGroup.AttachmentPoint == 0) 3669 if (m_host.ParentGroup.AttachmentPoint == 0)
3893 return; 3670 return;
3894 3671
@@ -3901,31 +3678,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3901 3678
3902 public void llTakeCamera(string avatar) 3679 public void llTakeCamera(string avatar)
3903 { 3680 {
3904//// m_host.AddScriptLPS(1);
3905 Deprecated("llTakeCamera", "Use llSetCameraParams instead"); 3681 Deprecated("llTakeCamera", "Use llSetCameraParams instead");
3906 } 3682 }
3907 3683
3908 public void llReleaseCamera(string avatar) 3684 public void llReleaseCamera(string avatar)
3909 { 3685 {
3910//// m_host.AddScriptLPS(1);
3911 Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); 3686 Deprecated("llReleaseCamera", "Use llClearCameraParams instead");
3912 } 3687 }
3913 3688
3914 public LSL_Key llGetOwner() 3689 public LSL_Key llGetOwner()
3915 { 3690 {
3916//// m_host.AddScriptLPS(1);
3917
3918 return m_host.OwnerID.ToString(); 3691 return m_host.OwnerID.ToString();
3919 } 3692 }
3920 3693
3921 public void llInstantMessage(string user, string message) 3694 public void llInstantMessage(string user, string message)
3922 { 3695 {
3923//// m_host.AddScriptLPS(1);
3924 UUID result; 3696 UUID result;
3925 if (!UUID.TryParse(user, out result) || result == UUID.Zero) 3697 if (!UUID.TryParse(user, out result) || result == UUID.Zero)
3926 { 3698 {
3927 Error("llInstantMessage","An invalid key was passed to llInstantMessage"); 3699 Error("llInstantMessage","An invalid key was passed to llInstantMessage");
3928//// ScriptSleep(2000);
3929 return; 3700 return;
3930 } 3701 }
3931 3702
@@ -3973,12 +3744,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3973 { 3744 {
3974 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); 3745 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
3975 } 3746 }
3976//// ScriptSleep(m_sleepMsOnInstantMessage);
3977 } 3747 }
3978 3748
3979 public void llEmail(string address, string subject, string message) 3749 public void llEmail(string address, string subject, string message)
3980 { 3750 {
3981//// m_host.AddScriptLPS(1);
3982 IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); 3751 IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>();
3983 if (emailModule == null) 3752 if (emailModule == null)
3984 { 3753 {
@@ -4011,12 +3780,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4011 } 3780 }
4012 3781
4013 emailModule.SendEmail(m_host.UUID, address, subject, message); 3782 emailModule.SendEmail(m_host.UUID, address, subject, message);
4014//// ScriptSleep(m_sleepMsOnEmail);
4015 } 3783 }
4016 3784
4017 public void llGetNextEmail(string address, string subject) 3785 public void llGetNextEmail(string address, string subject)
4018 { 3786 {
4019//// m_host.AddScriptLPS(1);
4020 IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>(); 3787 IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface<IEmailModule>();
4021 if (emailModule == null) 3788 if (emailModule == null)
4022 { 3789 {
@@ -4044,20 +3811,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4044 3811
4045 public LSL_Key llGetKey() 3812 public LSL_Key llGetKey()
4046 { 3813 {
4047//// m_host.AddScriptLPS(1);
4048 return m_host.UUID.ToString(); 3814 return m_host.UUID.ToString();
4049 } 3815 }
4050 3816
4051 public LSL_Key llGenerateKey() 3817 public LSL_Key llGenerateKey()
4052 { 3818 {
4053//// m_host.AddScriptLPS(1);
4054 return UUID.Random().ToString(); 3819 return UUID.Random().ToString();
4055 } 3820 }
4056 3821
4057 public void llSetBuoyancy(double buoyancy) 3822 public void llSetBuoyancy(double buoyancy)
4058 { 3823 {
4059//// m_host.AddScriptLPS(1);
4060
4061 if (!m_host.ParentGroup.IsDeleted) 3824 if (!m_host.ParentGroup.IsDeleted)
4062 { 3825 {
4063 m_host.ParentGroup.RootPart.SetBuoyancy((float)buoyancy); 3826 m_host.ParentGroup.RootPart.SetBuoyancy((float)buoyancy);
@@ -4072,8 +3835,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4072 /// <param name="tau">Number of seconds over which to reach target</param> 3835 /// <param name="tau">Number of seconds over which to reach target</param>
4073 public void llSetHoverHeight(double height, int water, double tau) 3836 public void llSetHoverHeight(double height, int water, double tau)
4074 { 3837 {
4075//// m_host.AddScriptLPS(1);
4076
4077 PIDHoverType hoverType = PIDHoverType.Ground; 3838 PIDHoverType hoverType = PIDHoverType.Ground;
4078 if (water != 0) 3839 if (water != 0)
4079 { 3840 {
@@ -4084,13 +3845,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4084 3845
4085 public void llStopHover() 3846 public void llStopHover()
4086 { 3847 {
4087//// m_host.AddScriptLPS(1);
4088 m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f); 3848 m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f);
4089 } 3849 }
4090 3850
4091 public void llMinEventDelay(double delay) 3851 public void llMinEventDelay(double delay)
4092 { 3852 {
4093//// m_host.AddScriptLPS(1);
4094 try 3853 try
4095 { 3854 {
4096 m_ScriptEngine.SetMinEventDelay(m_item.ItemID, delay); 3855 m_ScriptEngine.SetMinEventDelay(m_item.ItemID, delay);
@@ -4104,14 +3863,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4104 3863
4105 public void llSoundPreload(string sound) 3864 public void llSoundPreload(string sound)
4106 { 3865 {
4107//// m_host.AddScriptLPS(1);
4108 Deprecated("llSoundPreload", "Use llPreloadSound instead"); 3866 Deprecated("llSoundPreload", "Use llPreloadSound instead");
4109 } 3867 }
4110 3868
4111 public void llRotLookAt(LSL_Rotation target, double strength, double damping) 3869 public void llRotLookAt(LSL_Rotation target, double strength, double damping)
4112 { 3870 {
4113//// m_host.AddScriptLPS(1);
4114
4115 // Per discussion with Melanie, for non-physical objects llLookAt appears to simply 3871 // Per discussion with Melanie, for non-physical objects llLookAt appears to simply
4116 // set the rotation of the object, copy that behavior 3872 // set the rotation of the object, copy that behavior
4117 SceneObjectGroup sog = m_host.ParentGroup; 3873 SceneObjectGroup sog = m_host.ParentGroup;
@@ -4130,7 +3886,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4130 3886
4131 public LSL_Integer llStringLength(string str) 3887 public LSL_Integer llStringLength(string str)
4132 { 3888 {
4133//// m_host.AddScriptLPS(1);
4134 if (str.Length > 0) 3889 if (str.Length > 0)
4135 { 3890 {
4136 return str.Length; 3891 return str.Length;
@@ -4143,8 +3898,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4143 3898
4144 public void llStartAnimation(string anim) 3899 public void llStartAnimation(string anim)
4145 { 3900 {
4146//// m_host.AddScriptLPS(1);
4147
4148 if (m_item.PermsGranter == UUID.Zero) 3901 if (m_item.PermsGranter == UUID.Zero)
4149 return; 3902 return;
4150 3903
@@ -4166,8 +3919,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4166 3919
4167 public void llStopAnimation(string anim) 3920 public void llStopAnimation(string anim)
4168 { 3921 {
4169//// m_host.AddScriptLPS(1);
4170
4171 if (m_item.PermsGranter == UUID.Zero) 3922 if (m_item.PermsGranter == UUID.Zero)
4172 return; 3923 return;
4173 3924
@@ -4189,8 +3940,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4189 3940
4190 public void llStartObjectAnimation(string anim) 3941 public void llStartObjectAnimation(string anim)
4191 { 3942 {
4192//// m_host.AddScriptLPS(1);
4193
4194 // Do NOT try to parse UUID, animations cannot be triggered by ID 3943 // Do NOT try to parse UUID, animations cannot be triggered by ID
4195 UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); 3944 UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation);
4196 if (animID == UUID.Zero) 3945 if (animID == UUID.Zero)
@@ -4200,7 +3949,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4200 3949
4201 public void llStopObjectAnimation(string anim) 3950 public void llStopObjectAnimation(string anim)
4202 { 3951 {
4203//// m_host.AddScriptLPS(1);
4204 UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation); 3952 UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation);
4205 if (animID != UUID.Zero) 3953 if (animID != UUID.Zero)
4206 m_host.RemoveAnimation(animID); 3954 m_host.RemoveAnimation(animID);
@@ -4208,7 +3956,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4208 3956
4209 public LSL_List llGetObjectAnimationNames() 3957 public LSL_List llGetObjectAnimationNames()
4210 { 3958 {
4211//// m_host.AddScriptLPS(1);
4212 LSL_List ret = new LSL_List(); 3959 LSL_List ret = new LSL_List();
4213 3960
4214 if(m_host.AnimationsNames == null || m_host.AnimationsNames.Count == 0) 3961 if(m_host.AnimationsNames == null || m_host.AnimationsNames.Count == 0)
@@ -4221,17 +3968,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4221 3968
4222 public void llPointAt(LSL_Vector pos) 3969 public void llPointAt(LSL_Vector pos)
4223 { 3970 {
4224//// m_host.AddScriptLPS(1);
4225 } 3971 }
4226 3972
4227 public void llStopPointAt() 3973 public void llStopPointAt()
4228 { 3974 {
4229//// m_host.AddScriptLPS(1);
4230 } 3975 }
4231 3976
4232 public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) 3977 public void llTargetOmega(LSL_Vector axis, double spinrate, double gain)
4233 { 3978 {
4234//// m_host.AddScriptLPS(1);
4235 TargetOmega(m_host, axis, spinrate, gain); 3979 TargetOmega(m_host, axis, spinrate, gain);
4236 } 3980 }
4237 3981
@@ -4245,7 +3989,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4245 3989
4246 public LSL_Integer llGetStartParameter() 3990 public LSL_Integer llGetStartParameter()
4247 { 3991 {
4248//// m_host.AddScriptLPS(1);
4249 return m_ScriptEngine.GetStartParameter(m_item.ItemID); 3992 return m_ScriptEngine.GetStartParameter(m_item.ItemID);
4250 } 3993 }
4251 3994
@@ -4274,8 +4017,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4274 if (m_item.PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) 4017 if (m_item.PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0)
4275 llReleaseControls(); 4018 llReleaseControls();
4276 4019
4277//// m_host.AddScriptLPS(1);
4278
4279 int implicitPerms = 0; 4020 int implicitPerms = 0;
4280 4021
4281 if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.AttachedAvatar) 4022 if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.AttachedAvatar)
@@ -4402,15 +4143,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4402 4143
4403 public LSL_Key llGetPermissionsKey() 4144 public LSL_Key llGetPermissionsKey()
4404 { 4145 {
4405//// m_host.AddScriptLPS(1);
4406
4407 return m_item.PermsGranter.ToString(); 4146 return m_item.PermsGranter.ToString();
4408 } 4147 }
4409 4148
4410 public LSL_Integer llGetPermissions() 4149 public LSL_Integer llGetPermissions()
4411 { 4150 {
4412//// m_host.AddScriptLPS(1);
4413
4414 int perms = m_item.PermsMask; 4151 int perms = m_item.PermsMask;
4415 4152
4416 if (m_automaticLinkPermission) 4153 if (m_automaticLinkPermission)
@@ -4421,8 +4158,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4421 4158
4422 public LSL_Integer llGetLinkNumber() 4159 public LSL_Integer llGetLinkNumber()
4423 { 4160 {
4424//// m_host.AddScriptLPS(1);
4425
4426 if (m_host.ParentGroup.PrimCount > 1) 4161 if (m_host.ParentGroup.PrimCount > 1)
4427 { 4162 {
4428 return m_host.LinkNum; 4163 return m_host.LinkNum;
@@ -4449,8 +4184,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4449 4184
4450 public void llCreateLink(LSL_Key target, LSL_Integer parent) 4185 public void llCreateLink(LSL_Key target, LSL_Integer parent)
4451 { 4186 {
4452//// m_host.AddScriptLPS(1);
4453
4454 UUID targetID; 4187 UUID targetID;
4455 4188
4456 if (!UUID.TryParse(target, out targetID)) 4189 if (!UUID.TryParse(target, out targetID))
@@ -4513,14 +4246,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4513 4246
4514 if (client != null) 4247 if (client != null)
4515 parentPrim.SendPropertiesToClient(client); 4248 parentPrim.SendPropertiesToClient(client);
4516
4517//// ScriptSleep(m_sleepMsOnCreateLink);
4518 } 4249 }
4519 4250
4520 public void llBreakLink(int linknum) 4251 public void llBreakLink(int linknum)
4521 { 4252 {
4522//// m_host.AddScriptLPS(1);
4523
4524 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 4253 if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0
4525 && !m_automaticLinkPermission) 4254 && !m_automaticLinkPermission)
4526 { 4255 {
@@ -4620,8 +4349,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4620 4349
4621 public void llBreakAllLinks() 4350 public void llBreakAllLinks()
4622 { 4351 {
4623//// m_host.AddScriptLPS(1);
4624
4625 TaskInventoryItem item = m_item; 4352 TaskInventoryItem item = m_item;
4626 4353
4627 if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 4354 if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0
@@ -4653,7 +4380,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4653 4380
4654 public LSL_Key llGetLinkKey(int linknum) 4381 public LSL_Key llGetLinkKey(int linknum)
4655 { 4382 {
4656//// m_host.AddScriptLPS(1);
4657 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); 4383 SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum);
4658 if (part != null) 4384 if (part != null)
4659 { 4385 {
@@ -4719,8 +4445,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4719 /// </remarks> 4445 /// </remarks>
4720 public LSL_String llGetLinkName(int linknum) 4446 public LSL_String llGetLinkName(int linknum)
4721 { 4447 {
4722//// m_host.AddScriptLPS(1);
4723
4724 ISceneEntity entity = GetLinkEntity(m_host, linknum); 4448 ISceneEntity entity = GetLinkEntity(m_host, linknum);
4725 4449
4726 if (entity != null) 4450 if (entity != null)
@@ -4731,7 +4455,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4731 4455
4732 public LSL_Integer llGetInventoryNumber(int type) 4456 public LSL_Integer llGetInventoryNumber(int type)
4733 { 4457 {
4734//// m_host.AddScriptLPS(1);
4735 int count = 0; 4458 int count = 0;
4736 4459
4737 m_host.TaskInventory.LockItemsForRead(true); 4460 m_host.TaskInventory.LockItemsForRead(true);
@@ -4749,7 +4472,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4749 4472
4750 public LSL_String llGetInventoryName(int type, int number) 4473 public LSL_String llGetInventoryName(int type, int number)
4751 { 4474 {
4752//// m_host.AddScriptLPS(1);
4753 ArrayList keys = new ArrayList(); 4475 ArrayList keys = new ArrayList();
4754 4476
4755 m_host.TaskInventory.LockItemsForRead(true); 4477 m_host.TaskInventory.LockItemsForRead(true);
@@ -4776,15 +4498,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4776 4498
4777 public LSL_Float llGetEnergy() 4499 public LSL_Float llGetEnergy()
4778 { 4500 {
4779//// m_host.AddScriptLPS(1);
4780 // TODO: figure out real energy value 4501 // TODO: figure out real energy value
4781 return 1.0f; 4502 return 1.0f;
4782 } 4503 }
4783 4504
4784 public void llGiveInventory(LSL_Key destination, LSL_String inventory) 4505 public void llGiveInventory(LSL_Key destination, LSL_String inventory)
4785 { 4506 {
4786//// m_host.AddScriptLPS(1);
4787
4788 UUID destId = UUID.Zero; 4507 UUID destId = UUID.Zero;
4789 4508
4790 if (!UUID.TryParse(destination, out destId)) 4509 if (!UUID.TryParse(destination, out destId))
@@ -4866,17 +4585,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4866 if (m_TransferModule != null) 4585 if (m_TransferModule != null)
4867 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); 4586 m_TransferModule.SendInstantMessage(msg, delegate(bool success) {});
4868 } 4587 }
4869
4870//// //This delay should only occur when giving inventory to avatars.
4871//// ScriptSleep(m_sleepMsOnGiveInventory);
4872 } 4588 }
4873 } 4589 }
4874 4590
4875 [DebuggerNonUserCode] 4591 [DebuggerNonUserCode]
4876 public void llRemoveInventory(string name) 4592 public void llRemoveInventory(string name)
4877 { 4593 {
4878//// m_host.AddScriptLPS(1);
4879
4880 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); 4594 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
4881 4595
4882 if (item == null) 4596 if (item == null)
@@ -4890,7 +4604,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4890 4604
4891 public void llSetText(string text, LSL_Vector color, double alpha) 4605 public void llSetText(string text, LSL_Vector color, double alpha)
4892 { 4606 {
4893//// m_host.AddScriptLPS(1);
4894 Vector3 av3 = Util.Clip(color, 0.0f, 1.0f); 4607 Vector3 av3 = Util.Clip(color, 0.0f, 1.0f);
4895 byte[] data; 4608 byte[] data;
4896 data = Util.StringToBytes256(text); 4609 data = Util.StringToBytes256(text);
@@ -4900,13 +4613,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4900 4613
4901 public LSL_Float llWater(LSL_Vector offset) 4614 public LSL_Float llWater(LSL_Vector offset)
4902 { 4615 {
4903//// m_host.AddScriptLPS(1);
4904 return World.RegionInfo.RegionSettings.WaterHeight; 4616 return World.RegionInfo.RegionSettings.WaterHeight;
4905 } 4617 }
4906 4618
4907 public void llPassTouches(int pass) 4619 public void llPassTouches(int pass)
4908 { 4620 {
4909//// m_host.AddScriptLPS(1);
4910 if (pass != 0) 4621 if (pass != 0)
4911 m_host.PassTouches = true; 4622 m_host.PassTouches = true;
4912 else 4623 else
@@ -4915,8 +4626,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4915 4626
4916 public LSL_Key llRequestAgentData(string id, int data) 4627 public LSL_Key llRequestAgentData(string id, int data)
4917 { 4628 {
4918//// m_host.AddScriptLPS(1);
4919
4920 UUID uuid; 4629 UUID uuid;
4921 if (UUID.TryParse(id, out uuid)) 4630 if (UUID.TryParse(id, out uuid))
4922 { 4631 {
@@ -5021,7 +4730,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5021 AsyncCommands. 4730 AsyncCommands.
5022 DataserverPlugin.DataserverReply(rq.ToString(), reply); 4731 DataserverPlugin.DataserverReply(rq.ToString(), reply);
5023 4732
5024//// ScriptSleep(m_sleepMsOnRequestAgentData);
5025 return tid.ToString(); 4733 return tid.ToString();
5026 } 4734 }
5027 else 4735 else
@@ -5033,8 +4741,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5033 4741
5034 public LSL_Key llRequestInventoryData(string name) 4742 public LSL_Key llRequestInventoryData(string name)
5035 { 4743 {
5036//// m_host.AddScriptLPS(1);
5037
5038 foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems()) 4744 foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems())
5039 { 4745 {
5040 if (item.Type == 3 && item.Name == name) 4746 if (item.Type == 3 && item.Name == name)
@@ -5060,24 +4766,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5060 reply); 4766 reply);
5061 }); 4767 });
5062 4768
5063//// ScriptSleep(m_sleepMsOnRequestInventoryData);
5064 return tid.ToString(); 4769 return tid.ToString();
5065 } 4770 }
5066 } 4771 }
5067 4772
5068//// ScriptSleep(m_sleepMsOnRequestInventoryData);
5069 return String.Empty; 4773 return String.Empty;
5070 } 4774 }
5071 4775
5072 public void llSetDamage(double damage) 4776 public void llSetDamage(double damage)
5073 { 4777 {
5074//// m_host.AddScriptLPS(1);
5075 m_host.ParentGroup.Damage = (float)damage; 4778 m_host.ParentGroup.Damage = (float)damage;
5076 } 4779 }
5077 4780
5078 public void llTeleportAgentHome(string agent) 4781 public void llTeleportAgentHome(string agent)
5079 { 4782 {
5080//// m_host.AddScriptLPS(1);
5081 UUID agentId = new UUID(); 4783 UUID agentId = new UUID();
5082 if (UUID.TryParse(agent, out agentId)) 4784 if (UUID.TryParse(agent, out agentId))
5083 { 4785 {
@@ -5104,13 +4806,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5104 } 4806 }
5105 } 4807 }
5106 } 4808 }
5107
5108//// ScriptSleep(m_sleepMsOnSetDamage);
5109 } 4809 }
5110 4810
5111 public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) 4811 public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt)
5112 { 4812 {
5113//// m_host.AddScriptLPS(1);
5114 UUID agentId = new UUID(); 4813 UUID agentId = new UUID();
5115 4814
5116 if (UUID.TryParse(agent, out agentId)) 4815 if (UUID.TryParse(agent, out agentId))
@@ -5153,7 +4852,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5153 4852
5154 public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global_coords, LSL_Vector targetPos, LSL_Vector targetLookAt) 4853 public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global_coords, LSL_Vector targetPos, LSL_Vector targetLookAt)
5155 { 4854 {
5156//// m_host.AddScriptLPS(1);
5157 UUID agentId = new UUID(); 4855 UUID agentId = new UUID();
5158 4856
5159 ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y); 4857 ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y);
@@ -5218,7 +4916,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5218 if (dm == null) 4916 if (dm == null)
5219 return; 4917 return;
5220 4918
5221//// m_host.AddScriptLPS(1);
5222 UUID av = new UUID(); 4919 UUID av = new UUID();
5223 if (!UUID.TryParse(agent,out av)) 4920 if (!UUID.TryParse(agent,out av))
5224 { 4921 {
@@ -5237,13 +4934,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5237 else 4934 else
5238 { 4935 {
5239 dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); 4936 dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID);
5240//// ScriptSleep(m_sleepMsOnTextBox);
5241 } 4937 }
5242 } 4938 }
5243 4939
5244 public void llModifyLand(int action, int brush) 4940 public void llModifyLand(int action, int brush)
5245 { 4941 {
5246//// m_host.AddScriptLPS(1);
5247 ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface<ITerrainModule>(); 4942 ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface<ITerrainModule>();
5248 if (tm != null) 4943 if (tm != null)
5249 { 4944 {
@@ -5253,8 +4948,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5253 4948
5254 public void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume) 4949 public void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume)
5255 { 4950 {
5256//// m_host.AddScriptLPS(1);
5257
5258 if(impact_sound == "") 4951 if(impact_sound == "")
5259 { 4952 {
5260 m_host.CollisionSoundVolume = (float)impact_volume; 4953 m_host.CollisionSoundVolume = (float)impact_volume;
@@ -5281,7 +4974,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5281 public LSL_String llGetAnimation(LSL_Key id) 4974 public LSL_String llGetAnimation(LSL_Key id)
5282 { 4975 {
5283 // This should only return a value if the avatar is in the same region 4976 // This should only return a value if the avatar is in the same region
5284//// m_host.AddScriptLPS(1);
5285 UUID avatar; 4977 UUID avatar;
5286 if(!UUID.TryParse(id, out avatar)) 4978 if(!UUID.TryParse(id, out avatar))
5287 return ""; 4979 return "";
@@ -5311,8 +5003,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5311 5003
5312 public void llMessageLinked(int linknumber, int num, string msg, string id) 5004 public void llMessageLinked(int linknumber, int num, string msg, string id)
5313 { 5005 {
5314//// m_host.AddScriptLPS(1);
5315
5316 List<SceneObjectPart> parts = GetLinkParts(linknumber); 5006 List<SceneObjectPart> parts = GetLinkParts(linknumber);
5317 5007
5318 UUID partItemID; 5008 UUID partItemID;
@@ -5342,7 +5032,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5342 5032
5343 public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) 5033 public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local)
5344 { 5034 {
5345//// m_host.AddScriptLPS(1);
5346 bool pushrestricted = World.RegionInfo.RegionSettings.RestrictPushing; 5035 bool pushrestricted = World.RegionInfo.RegionSettings.RestrictPushing;
5347 bool pushAllowed = false; 5036 bool pushAllowed = false;
5348 5037
@@ -5509,7 +5198,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5509 5198
5510 public void llPassCollisions(int pass) 5199 public void llPassCollisions(int pass)
5511 { 5200 {
5512//// m_host.AddScriptLPS(1);
5513 if (pass == 0) 5201 if (pass == 0)
5514 { 5202 {
5515 m_host.PassCollisions = false; 5203 m_host.PassCollisions = false;
@@ -5522,15 +5210,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5522 5210
5523 public LSL_String llGetScriptName() 5211 public LSL_String llGetScriptName()
5524 { 5212 {
5525//// m_host.AddScriptLPS(1);
5526
5527 return m_item.Name != null ? m_item.Name : String.Empty; 5213 return m_item.Name != null ? m_item.Name : String.Empty;
5528 } 5214 }
5529 5215
5530 public LSL_Integer llGetLinkNumberOfSides(int link) 5216 public LSL_Integer llGetLinkNumberOfSides(int link)
5531 { 5217 {
5532//// m_host.AddScriptLPS(1);
5533
5534 SceneObjectPart linkedPart; 5218 SceneObjectPart linkedPart;
5535 5219
5536 if (link == ScriptBaseClass.LINK_ROOT) 5220 if (link == ScriptBaseClass.LINK_ROOT)
@@ -5545,8 +5229,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5545 5229
5546 public LSL_Integer llGetNumberOfSides() 5230 public LSL_Integer llGetNumberOfSides()
5547 { 5231 {
5548//// m_host.AddScriptLPS(1);
5549
5550 return m_host.GetNumberOfSides(); 5232 return m_host.GetNumberOfSides();
5551 } 5233 }
5552 5234
@@ -5584,8 +5266,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5584 // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) 5266 // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2))
5585 public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle) 5267 public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle)
5586 { 5268 {
5587//// m_host.AddScriptLPS(1);
5588
5589 double x, y, z, s, t; 5269 double x, y, z, s, t;
5590 5270
5591 s = Math.Cos(angle * 0.5); 5271 s = Math.Cos(angle * 0.5);
@@ -5605,8 +5285,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5605 /// <param name='rot'></param> 5285 /// <param name='rot'></param>
5606 public LSL_Vector llRot2Axis(LSL_Rotation rot) 5286 public LSL_Vector llRot2Axis(LSL_Rotation rot)
5607 { 5287 {
5608//// m_host.AddScriptLPS(1);
5609
5610 rot.Normalize(); 5288 rot.Normalize();
5611 5289
5612 double s = Math.Sqrt(1 - rot.s * rot.s); 5290 double s = Math.Sqrt(1 - rot.s * rot.s);
@@ -5623,8 +5301,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5623 // Returns the angle of a quaternion (see llRot2Axis for the axis) 5301 // Returns the angle of a quaternion (see llRot2Axis for the axis)
5624 public LSL_Float llRot2Angle(LSL_Rotation rot) 5302 public LSL_Float llRot2Angle(LSL_Rotation rot)
5625 { 5303 {
5626//// m_host.AddScriptLPS(1);
5627
5628 rot.Normalize(); 5304 rot.Normalize();
5629 5305
5630 double angle = 2 * Math.Acos(rot.s); 5306 double angle = 2 * Math.Acos(rot.s);
@@ -5636,21 +5312,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5636 5312
5637 public LSL_Float llAcos(LSL_Float val) 5313 public LSL_Float llAcos(LSL_Float val)
5638 { 5314 {
5639//// m_host.AddScriptLPS(1);
5640 return (double)Math.Acos(val); 5315 return (double)Math.Acos(val);
5641 } 5316 }
5642 5317
5643 public LSL_Float llAsin(LSL_Float val) 5318 public LSL_Float llAsin(LSL_Float val)
5644 { 5319 {
5645//// m_host.AddScriptLPS(1);
5646 return (double)Math.Asin(val); 5320 return (double)Math.Asin(val);
5647 } 5321 }
5648 5322
5649 // jcochran 5/jan/2012 5323 // jcochran 5/jan/2012
5650 public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b) 5324 public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b)
5651 { 5325 {
5652//// m_host.AddScriptLPS(1);
5653
5654 double aa = (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s); 5326 double aa = (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s);
5655 double bb = (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s); 5327 double bb = (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s);
5656 double aa_bb = aa * bb; 5328 double aa_bb = aa * bb;
@@ -5663,8 +5335,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5663 5335
5664 public LSL_Key llGetInventoryKey(string name) 5336 public LSL_Key llGetInventoryKey(string name)
5665 { 5337 {
5666//// m_host.AddScriptLPS(1);
5667
5668 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); 5338 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
5669 5339
5670 if (item == null) 5340 if (item == null)
@@ -5682,8 +5352,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5682 5352
5683 public void llAllowInventoryDrop(LSL_Integer add) 5353 public void llAllowInventoryDrop(LSL_Integer add)
5684 { 5354 {
5685//// m_host.AddScriptLPS(1);
5686
5687 if (add != 0) 5355 if (add != 0)
5688 m_host.ParentGroup.RootPart.AllowedDrop = true; 5356 m_host.ParentGroup.RootPart.AllowedDrop = true;
5689 else 5357 else
@@ -5695,15 +5363,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5695 5363
5696 public LSL_Vector llGetSunDirection() 5364 public LSL_Vector llGetSunDirection()
5697 { 5365 {
5698//// m_host.AddScriptLPS(1);
5699
5700 Vector3 sun = World.RegionInfo.RegionSettings.SunVector; 5366 Vector3 sun = World.RegionInfo.RegionSettings.SunVector;
5701 return new LSL_Vector(sun); 5367 return new LSL_Vector(sun);
5702 } 5368 }
5703 5369
5704 public LSL_Vector llGetTextureOffset(int face) 5370 public LSL_Vector llGetTextureOffset(int face)
5705 { 5371 {
5706//// m_host.AddScriptLPS(1);
5707 return GetTextureOffset(m_host, face); 5372 return GetTextureOffset(m_host, face);
5708 } 5373 }
5709 5374
@@ -5730,7 +5395,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5730 5395
5731 public LSL_Vector llGetTextureScale(int side) 5396 public LSL_Vector llGetTextureScale(int side)
5732 { 5397 {
5733//// m_host.AddScriptLPS(1);
5734 Primitive.TextureEntry tex = m_host.Shape.Textures; 5398 Primitive.TextureEntry tex = m_host.Shape.Textures;
5735 LSL_Vector scale; 5399 LSL_Vector scale;
5736 if (side == -1) 5400 if (side == -1)
@@ -5745,7 +5409,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5745 5409
5746 public LSL_Float llGetTextureRot(int face) 5410 public LSL_Float llGetTextureRot(int face)
5747 { 5411 {
5748//// m_host.AddScriptLPS(1);
5749 return GetTextureRot(m_host, face); 5412 return GetTextureRot(m_host, face);
5750 } 5413 }
5751 5414
@@ -5768,7 +5431,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5768 5431
5769 public LSL_Integer llSubStringIndex(string source, string pattern) 5432 public LSL_Integer llSubStringIndex(string source, string pattern)
5770 { 5433 {
5771//// m_host.AddScriptLPS(1);
5772 if (string.IsNullOrEmpty(source)) 5434 if (string.IsNullOrEmpty(source))
5773 return -1; 5435 return -1;
5774 if (string.IsNullOrEmpty(pattern)) 5436 if (string.IsNullOrEmpty(pattern))
@@ -5778,7 +5440,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5778 5440
5779 public LSL_Key llGetOwnerKey(string id) 5441 public LSL_Key llGetOwnerKey(string id)
5780 { 5442 {
5781//// m_host.AddScriptLPS(1);
5782 UUID key = new UUID(); 5443 UUID key = new UUID();
5783 if (UUID.TryParse(id, out key)) 5444 if (UUID.TryParse(id, out key))
5784 { 5445 {
@@ -5803,15 +5464,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5803 5464
5804 public LSL_Vector llGetCenterOfMass() 5465 public LSL_Vector llGetCenterOfMass()
5805 { 5466 {
5806//// m_host.AddScriptLPS(1);
5807
5808 return new LSL_Vector(m_host.GetCenterOfMass()); 5467 return new LSL_Vector(m_host.GetCenterOfMass());
5809 } 5468 }
5810 5469
5811 public LSL_List llListSort(LSL_List src, int stride, int ascending) 5470 public LSL_List llListSort(LSL_List src, int stride, int ascending)
5812 { 5471 {
5813//// m_host.AddScriptLPS(1);
5814
5815 if (stride <= 0) 5472 if (stride <= 0)
5816 { 5473 {
5817 stride = 1; 5474 stride = 1;
@@ -5821,14 +5478,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5821 5478
5822 public LSL_Integer llGetListLength(LSL_List src) 5479 public LSL_Integer llGetListLength(LSL_List src)
5823 { 5480 {
5824//// m_host.AddScriptLPS(1);
5825
5826 return src.Length; 5481 return src.Length;
5827 } 5482 }
5828 5483
5829 public LSL_Integer llList2Integer(LSL_List src, int index) 5484 public LSL_Integer llList2Integer(LSL_List src, int index)
5830 { 5485 {
5831//// m_host.AddScriptLPS(1);
5832 if (index < 0) 5486 if (index < 0)
5833 index = src.Length + index; 5487 index = src.Length + index;
5834 5488
@@ -5858,7 +5512,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5858 5512
5859 public LSL_Float llList2Float(LSL_List src, int index) 5513 public LSL_Float llList2Float(LSL_List src, int index)
5860 { 5514 {
5861//// m_host.AddScriptLPS(1);
5862 if (index < 0) 5515 if (index < 0)
5863 index = src.Length + index; 5516 index = src.Length + index;
5864 5517
@@ -5913,7 +5566,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5913 5566
5914 public LSL_String llList2String(LSL_List src, int index) 5567 public LSL_String llList2String(LSL_List src, int index)
5915 { 5568 {
5916//// m_host.AddScriptLPS(1);
5917 if (index < 0) 5569 if (index < 0)
5918 index = src.Length + index; 5570 index = src.Length + index;
5919 5571
@@ -5925,7 +5577,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5925 5577
5926 public LSL_Key llList2Key(LSL_List src, int index) 5578 public LSL_Key llList2Key(LSL_List src, int index)
5927 { 5579 {
5928//// m_host.AddScriptLPS(1);
5929 if (index < 0) 5580 if (index < 0)
5930 index = src.Length + index; 5581 index = src.Length + index;
5931 5582
@@ -5953,7 +5604,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5953 5604
5954 public LSL_Vector llList2Vector(LSL_List src, int index) 5605 public LSL_Vector llList2Vector(LSL_List src, int index)
5955 { 5606 {
5956//// m_host.AddScriptLPS(1);
5957 if (index < 0) 5607 if (index < 0)
5958 index = src.Length + index; 5608 index = src.Length + index;
5959 5609
@@ -5982,7 +5632,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5982 5632
5983 public LSL_Rotation llList2Rot(LSL_List src, int index) 5633 public LSL_Rotation llList2Rot(LSL_List src, int index)
5984 { 5634 {
5985//// m_host.AddScriptLPS(1);
5986 if (index < 0) 5635 if (index < 0)
5987 index = src.Length + index; 5636 index = src.Length + index;
5988 5637
@@ -6009,7 +5658,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6009 5658
6010 public LSL_List llList2List(LSL_List src, int start, int end) 5659 public LSL_List llList2List(LSL_List src, int start, int end)
6011 { 5660 {
6012//// m_host.AddScriptLPS(1);
6013 return src.GetSublist(start, end); 5661 return src.GetSublist(start, end);
6014 } 5662 }
6015 5663
@@ -6020,7 +5668,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6020 5668
6021 public LSL_Integer llGetListEntryType(LSL_List src, int index) 5669 public LSL_Integer llGetListEntryType(LSL_List src, int index)
6022 { 5670 {
6023//// m_host.AddScriptLPS(1);
6024 if (index < 0) 5671 if (index < 0)
6025 { 5672 {
6026 index = src.Length + index; 5673 index = src.Length + index;
@@ -6064,8 +5711,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6064 /// </summary> 5711 /// </summary>
6065 public LSL_String llList2CSV(LSL_List src) 5712 public LSL_String llList2CSV(LSL_List src)
6066 { 5713 {
6067//// m_host.AddScriptLPS(1);
6068
6069 return string.Join(", ", 5714 return string.Join(", ",
6070 (new List<object>(src.Data)).ConvertAll<string>(o => 5715 (new List<object>(src.Data)).ConvertAll<string>(o =>
6071 { 5716 {
@@ -6089,8 +5734,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6089 int start = 0; 5734 int start = 0;
6090 int length = 0; 5735 int length = 0;
6091 5736
6092//// m_host.AddScriptLPS(1);
6093
6094 for (int i = 0; i < src.Length; i++) 5737 for (int i = 0; i < src.Length; i++)
6095 { 5738 {
6096 switch (src[i]) 5739 switch (src[i])
@@ -6146,8 +5789,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6146 int chunkk; 5789 int chunkk;
6147 int[] chunks; 5790 int[] chunks;
6148 5791
6149//// m_host.AddScriptLPS(1);
6150
6151 if (stride <= 0) 5792 if (stride <= 0)
6152 { 5793 {
6153 stride = 1; 5794 stride = 1;
@@ -6218,8 +5859,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6218 int[] ei = new int[2]; 5859 int[] ei = new int[2];
6219 bool twopass = false; 5860 bool twopass = false;
6220 5861
6221//// m_host.AddScriptLPS(1);
6222
6223 // First step is always to deal with negative indices 5862 // First step is always to deal with negative indices
6224 5863
6225 if (start < 0) 5864 if (start < 0)
@@ -6299,8 +5938,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6299 5938
6300 public LSL_Integer llGetRegionAgentCount() 5939 public LSL_Integer llGetRegionAgentCount()
6301 { 5940 {
6302//// m_host.AddScriptLPS(1);
6303
6304 int count = 0; 5941 int count = 0;
6305 World.ForEachRootScenePresence(delegate(ScenePresence sp) { 5942 World.ForEachRootScenePresence(delegate(ScenePresence sp) {
6306 count++; 5943 count++;
@@ -6311,13 +5948,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6311 5948
6312 public LSL_Vector llGetRegionCorner() 5949 public LSL_Vector llGetRegionCorner()
6313 { 5950 {
6314//// m_host.AddScriptLPS(1);
6315 return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); 5951 return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0);
6316 } 5952 }
6317 5953
6318 public LSL_String llGetEnv(LSL_String name) 5954 public LSL_String llGetEnv(LSL_String name)
6319 { 5955 {
6320//// m_host.AddScriptLPS(1);
6321 switch(name) 5956 switch(name)
6322 { 5957 {
6323 case "agent_limit": 5958 case "agent_limit":
@@ -6390,8 +6025,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6390 LSL_List pref; 6025 LSL_List pref;
6391 LSL_List suff; 6026 LSL_List suff;
6392 6027
6393//// m_host.AddScriptLPS(1);
6394
6395 if (index < 0) 6028 if (index < 0)
6396 { 6029 {
6397 index = index+dest.Length; 6030 index = index+dest.Length;
@@ -6444,8 +6077,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6444 int index = -1; 6077 int index = -1;
6445 int length = src.Length - test.Length + 1; 6078 int length = src.Length - test.Length + 1;
6446 6079
6447//// m_host.AddScriptLPS(1);
6448
6449 // If either list is empty, do not match 6080 // If either list is empty, do not match
6450 if (src.Length != 0 && test.Length != 0) 6081 if (src.Length != 0 && test.Length != 0)
6451 { 6082 {
@@ -6489,19 +6120,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6489 6120
6490 public LSL_String llGetObjectName() 6121 public LSL_String llGetObjectName()
6491 { 6122 {
6492//// m_host.AddScriptLPS(1);
6493 return m_host.Name !=null ? m_host.Name : String.Empty; 6123 return m_host.Name !=null ? m_host.Name : String.Empty;
6494 } 6124 }
6495 6125
6496 public void llSetObjectName(string name) 6126 public void llSetObjectName(string name)
6497 { 6127 {
6498//// m_host.AddScriptLPS(1);
6499 m_host.Name = name != null ? name : String.Empty; 6128 m_host.Name = name != null ? name : String.Empty;
6500 } 6129 }
6501 6130
6502 public LSL_String llGetDate() 6131 public LSL_String llGetDate()
6503 { 6132 {
6504//// m_host.AddScriptLPS(1);
6505 DateTime date = DateTime.Now.ToUniversalTime(); 6133 DateTime date = DateTime.Now.ToUniversalTime();
6506 string result = date.ToString("yyyy-MM-dd"); 6134 string result = date.ToString("yyyy-MM-dd");
6507 return result; 6135 return result;
@@ -6509,8 +6137,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6509 6137
6510 public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir) 6138 public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir)
6511 { 6139 {
6512//// m_host.AddScriptLPS(1);
6513
6514 if(dir.x == 0 && dir.y == 0) 6140 if(dir.x == 0 && dir.y == 0)
6515 return 1; // SL wiki 6141 return 1; // SL wiki
6516 6142
@@ -6576,8 +6202,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6576 /// </summary> 6202 /// </summary>
6577 public LSL_Integer llGetAgentInfo(LSL_Key id) 6203 public LSL_Integer llGetAgentInfo(LSL_Key id)
6578 { 6204 {
6579//// m_host.AddScriptLPS(1);
6580
6581 UUID key = new UUID(); 6205 UUID key = new UUID();
6582 if (!UUID.TryParse(id, out key)) 6206 if (!UUID.TryParse(id, out key))
6583 { 6207 {
@@ -6684,7 +6308,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6684 public LSL_String llGetAgentLanguage(LSL_Key id) 6308 public LSL_String llGetAgentLanguage(LSL_Key id)
6685 { 6309 {
6686 // This should only return a value if the avatar is in the same region, but eh. idc. 6310 // This should only return a value if the avatar is in the same region, but eh. idc.
6687//// m_host.AddScriptLPS(1);
6688 if (World.AgentPreferencesService == null) 6311 if (World.AgentPreferencesService == null)
6689 { 6312 {
6690 Error("llGetAgentLanguage", "No AgentPreferencesService present"); 6313 Error("llGetAgentLanguage", "No AgentPreferencesService present");
@@ -6711,8 +6334,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6711 /// </summary> 6334 /// </summary>
6712 public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) 6335 public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options)
6713 { 6336 {
6714//// m_host.AddScriptLPS(1);
6715
6716 // do our bit masks part 6337 // do our bit masks part
6717 bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0; 6338 bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0;
6718 6339
@@ -6794,20 +6415,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6794 6415
6795 public void llAdjustSoundVolume(LSL_Float volume) 6416 public void llAdjustSoundVolume(LSL_Float volume)
6796 { 6417 {
6797//// m_host.AddScriptLPS(1);
6798 m_host.AdjustSoundGain(volume); 6418 m_host.AdjustSoundGain(volume);
6799//// ScriptSleep(m_sleepMsOnAdjustSoundVolume);
6800 } 6419 }
6801 6420
6802 public void llSetSoundRadius(double radius) 6421 public void llSetSoundRadius(double radius)
6803 { 6422 {
6804//// m_host.AddScriptLPS(1);
6805 m_host.SoundRadius = radius; 6423 m_host.SoundRadius = radius;
6806 } 6424 }
6807 6425
6808 public LSL_String llKey2Name(LSL_Key id) 6426 public LSL_String llKey2Name(LSL_Key id)
6809 { 6427 {
6810//// m_host.AddScriptLPS(1);
6811 UUID key = new UUID(); 6428 UUID key = new UUID();
6812 if (UUID.TryParse(id,out key)) 6429 if (UUID.TryParse(id,out key))
6813 { 6430 {
@@ -6829,8 +6446,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6829 6446
6830 public LSL_Key llName2Key(LSL_String name) 6447 public LSL_Key llName2Key(LSL_String name)
6831 { 6448 {
6832//// m_host.AddScriptLPS(1);
6833
6834 foreach (ScenePresence sp in World.GetScenePresences()) 6449 foreach (ScenePresence sp in World.GetScenePresences())
6835 { 6450 {
6836 if (sp.IsDeleted || sp.IsChildAgent) 6451 if (sp.IsDeleted || sp.IsChildAgent)
@@ -6849,15 +6464,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6849 6464
6850 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) 6465 public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate)
6851 { 6466 {
6852//// m_host.AddScriptLPS(1);
6853
6854 SetTextureAnim(m_host, mode, face, sizex, sizey, start, length, rate); 6467 SetTextureAnim(m_host, mode, face, sizex, sizey, start, length, rate);
6855 } 6468 }
6856 6469
6857 public void llSetLinkTextureAnim(int linknumber, int mode, int face, int sizex, int sizey, double start, double length, double rate) 6470 public void llSetLinkTextureAnim(int linknumber, int mode, int face, int sizex, int sizey, double start, double length, double rate)
6858 { 6471 {
6859//// m_host.AddScriptLPS(1);
6860
6861 List<SceneObjectPart> parts = GetLinkParts(linknumber); 6472 List<SceneObjectPart> parts = GetLinkParts(linknumber);
6862 6473
6863 try 6474 try
@@ -6897,7 +6508,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6897 public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, 6508 public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east,
6898 LSL_Vector bottom_south_west) 6509 LSL_Vector bottom_south_west)
6899 { 6510 {
6900//// m_host.AddScriptLPS(1);
6901 if (m_SoundModule != null) 6511 if (m_SoundModule != null)
6902 { 6512 {
6903 m_SoundModule.TriggerSoundLimited(m_host.UUID, 6513 m_SoundModule.TriggerSoundLimited(m_host.UUID,
@@ -6908,7 +6518,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6908 6518
6909 public void llEjectFromLand(LSL_Key pest) 6519 public void llEjectFromLand(LSL_Key pest)
6910 { 6520 {
6911//// m_host.AddScriptLPS(1);
6912 UUID agentID = new UUID(); 6521 UUID agentID = new UUID();
6913 if (UUID.TryParse(pest, out agentID)) 6522 if (UUID.TryParse(pest, out agentID))
6914 { 6523 {
@@ -6928,7 +6537,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6928 } 6537 }
6929 } 6538 }
6930 } 6539 }
6931//// ScriptSleep(m_sleepMsOnEjectFromLand);
6932 } 6540 }
6933 6541
6934 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) 6542 public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers)
@@ -6938,7 +6546,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6938 6546
6939 public LSL_Integer llOverMyLand(string id) 6547 public LSL_Integer llOverMyLand(string id)
6940 { 6548 {
6941//// m_host.AddScriptLPS(1);
6942 UUID key = new UUID(); 6549 UUID key = new UUID();
6943 if (UUID.TryParse(id, out key)) 6550 if (UUID.TryParse(id, out key))
6944 { 6551 {
@@ -6967,7 +6574,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6967 6574
6968 public LSL_Key llGetLandOwnerAt(LSL_Vector pos) 6575 public LSL_Key llGetLandOwnerAt(LSL_Vector pos)
6969 { 6576 {
6970//// m_host.AddScriptLPS(1);
6971 ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); 6577 ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
6972 if (land == null) 6578 if (land == null)
6973 return UUID.Zero.ToString(); 6579 return UUID.Zero.ToString();
@@ -6981,7 +6587,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6981 /// </summary> 6587 /// </summary>
6982 public LSL_Vector llGetAgentSize(LSL_Key id) 6588 public LSL_Vector llGetAgentSize(LSL_Key id)
6983 { 6589 {
6984//// m_host.AddScriptLPS(1);
6985 UUID avID; 6590 UUID avID;
6986 if(!UUID.TryParse(id, out avID)) 6591 if(!UUID.TryParse(id, out avID))
6987 return ScriptBaseClass.ZERO_VECTOR; 6592 return ScriptBaseClass.ZERO_VECTOR;
@@ -6997,7 +6602,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
6997 6602
6998 public LSL_Integer llSameGroup(string id) 6603 public LSL_Integer llSameGroup(string id)
6999 { 6604 {
7000//// m_host.AddScriptLPS(1);
7001 UUID uuid = new UUID(); 6605 UUID uuid = new UUID();
7002 if (!UUID.TryParse(id, out uuid)) 6606 if (!UUID.TryParse(id, out uuid))
7003 return new LSL_Integer(0); 6607 return new LSL_Integer(0);
@@ -7045,8 +6649,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7045 6649
7046 public void llUnSit(string id) 6650 public void llUnSit(string id)
7047 { 6651 {
7048//// m_host.AddScriptLPS(1);
7049
7050 UUID key = new UUID(); 6652 UUID key = new UUID();
7051 if (UUID.TryParse(id, out key)) 6653 if (UUID.TryParse(id, out key))
7052 { 6654 {
@@ -7086,8 +6688,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7086 6688
7087 public LSL_Vector llGroundSlope(LSL_Vector offset) 6689 public LSL_Vector llGroundSlope(LSL_Vector offset)
7088 { 6690 {
7089//// m_host.AddScriptLPS(1);
7090
7091 //Get the slope normal. This gives us the equation of the plane tangent to the slope. 6691 //Get the slope normal. This gives us the equation of the plane tangent to the slope.
7092 LSL_Vector vsn = llGroundNormal(offset); 6692 LSL_Vector vsn = llGroundNormal(offset);
7093 6693
@@ -7107,7 +6707,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7107 6707
7108 public LSL_Vector llGroundNormal(LSL_Vector offset) 6708 public LSL_Vector llGroundNormal(LSL_Vector offset)
7109 { 6709 {
7110//// m_host.AddScriptLPS(1);
7111 Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; 6710 Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset;
7112 // Clamp to valid position 6711 // Clamp to valid position
7113 if (pos.X < 0) 6712 if (pos.X < 0)
@@ -7157,21 +6756,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7157 6756
7158 public LSL_Vector llGroundContour(LSL_Vector offset) 6757 public LSL_Vector llGroundContour(LSL_Vector offset)
7159 { 6758 {
7160//// m_host.AddScriptLPS(1);
7161 LSL_Vector x = llGroundSlope(offset); 6759 LSL_Vector x = llGroundSlope(offset);
7162 return new LSL_Vector(-x.y, x.x, 0.0); 6760 return new LSL_Vector(-x.y, x.x, 0.0);
7163 } 6761 }
7164 6762
7165 public LSL_Integer llGetAttached() 6763 public LSL_Integer llGetAttached()
7166 { 6764 {
7167//// m_host.AddScriptLPS(1);
7168 return m_host.ParentGroup.AttachmentPoint; 6765 return m_host.ParentGroup.AttachmentPoint;
7169 } 6766 }
7170 6767
7171 public LSL_List llGetAttachedList(LSL_Key id) 6768 public LSL_List llGetAttachedList(LSL_Key id)
7172 { 6769 {
7173//// m_host.AddScriptLPS(1);
7174
7175 UUID avID; 6770 UUID avID;
7176 if(!UUID.TryParse(id, out avID)) 6771 if(!UUID.TryParse(id, out avID))
7177 return new LSL_List("NOT_FOUND"); 6772 return new LSL_List("NOT_FOUND");
@@ -7200,14 +6795,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7200 6795
7201 public virtual LSL_Integer llGetFreeMemory() 6796 public virtual LSL_Integer llGetFreeMemory()
7202 { 6797 {
7203//// m_host.AddScriptLPS(1);
7204 // Make scripts designed for Mono happy 6798 // Make scripts designed for Mono happy
7205 return 65536; 6799 return 65536;
7206 } 6800 }
7207 6801
7208 public LSL_Integer llGetFreeURLs() 6802 public LSL_Integer llGetFreeURLs()
7209 { 6803 {
7210//// m_host.AddScriptLPS(1);
7211 if (m_UrlModule != null) 6804 if (m_UrlModule != null)
7212 return new LSL_Integer(m_UrlModule.GetFreeUrls()); 6805 return new LSL_Integer(m_UrlModule.GetFreeUrls());
7213 return new LSL_Integer(0); 6806 return new LSL_Integer(0);
@@ -7216,13 +6809,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7216 6809
7217 public LSL_String llGetRegionName() 6810 public LSL_String llGetRegionName()
7218 { 6811 {
7219//// m_host.AddScriptLPS(1);
7220 return World.RegionInfo.RegionName; 6812 return World.RegionInfo.RegionName;
7221 } 6813 }
7222 6814
7223 public LSL_Float llGetRegionTimeDilation() 6815 public LSL_Float llGetRegionTimeDilation()
7224 { 6816 {
7225//// m_host.AddScriptLPS(1);
7226 return (double)World.TimeDilation; 6817 return (double)World.TimeDilation;
7227 } 6818 }
7228 6819
@@ -7231,7 +6822,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7231 /// </summary> 6822 /// </summary>
7232 public LSL_Float llGetRegionFPS() 6823 public LSL_Float llGetRegionFPS()
7233 { 6824 {
7234//// m_host.AddScriptLPS(1);
7235 return World.StatsReporter.LastReportedSimFPS; 6825 return World.StatsReporter.LastReportedSimFPS;
7236 } 6826 }
7237 6827
@@ -7309,8 +6899,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7309 6899
7310 public void llLinkParticleSystem(int linknumber, LSL_List rules) 6900 public void llLinkParticleSystem(int linknumber, LSL_List rules)
7311 { 6901 {
7312//// m_host.AddScriptLPS(1);
7313
7314 List<SceneObjectPart> parts = GetLinkParts(linknumber); 6902 List<SceneObjectPart> parts = GetLinkParts(linknumber);
7315 6903
7316 foreach (SceneObjectPart part in parts) 6904 foreach (SceneObjectPart part in parts)
@@ -7321,7 +6909,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7321 6909
7322 public void llParticleSystem(LSL_List rules) 6910 public void llParticleSystem(LSL_List rules)
7323 { 6911 {
7324//// m_host.AddScriptLPS(1);
7325 SetParticleSystem(m_host, rules, "llParticleSystem"); 6912 SetParticleSystem(m_host, rules, "llParticleSystem");
7326 } 6913 }
7327 6914
@@ -7738,7 +7325,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7738 7325
7739 public void llGroundRepel(double height, int water, double tau) 7326 public void llGroundRepel(double height, int water, double tau)
7740 { 7327 {
7741//// m_host.AddScriptLPS(1);
7742 if (m_host.PhysActor != null) 7328 if (m_host.PhysActor != null)
7743 { 7329 {
7744 float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0)); 7330 float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0));
@@ -7763,8 +7349,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7763 7349
7764 public void llGiveInventoryList(LSL_Key destination, LSL_String category, LSL_List inventory) 7350 public void llGiveInventoryList(LSL_Key destination, LSL_String category, LSL_List inventory)
7765 { 7351 {
7766//// m_host.AddScriptLPS(1);
7767
7768 UUID destID; 7352 UUID destID;
7769 if (!UUID.TryParse(destination, out destID)) 7353 if (!UUID.TryParse(destination, out destID))
7770 return; 7354 return;
@@ -7818,8 +7402,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7818 7402
7819 public void llSetVehicleType(int type) 7403 public void llSetVehicleType(int type)
7820 { 7404 {
7821//// m_host.AddScriptLPS(1);
7822
7823 if (!m_host.ParentGroup.IsDeleted) 7405 if (!m_host.ParentGroup.IsDeleted)
7824 { 7406 {
7825 m_host.ParentGroup.RootPart.SetVehicleType(type); 7407 m_host.ParentGroup.RootPart.SetVehicleType(type);
@@ -7830,8 +7412,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7830 //CFK 9/28: so these are not complete yet. 7412 //CFK 9/28: so these are not complete yet.
7831 public void llSetVehicleFloatParam(int param, LSL_Float value) 7413 public void llSetVehicleFloatParam(int param, LSL_Float value)
7832 { 7414 {
7833//// m_host.AddScriptLPS(1);
7834
7835 if (!m_host.ParentGroup.IsDeleted) 7415 if (!m_host.ParentGroup.IsDeleted)
7836 { 7416 {
7837 m_host.ParentGroup.RootPart.SetVehicleFloatParam(param, (float)value); 7417 m_host.ParentGroup.RootPart.SetVehicleFloatParam(param, (float)value);
@@ -7842,8 +7422,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7842 //CFK 9/28: so these are not complete yet. 7422 //CFK 9/28: so these are not complete yet.
7843 public void llSetVehicleVectorParam(int param, LSL_Vector vec) 7423 public void llSetVehicleVectorParam(int param, LSL_Vector vec)
7844 { 7424 {
7845//// m_host.AddScriptLPS(1);
7846
7847 if (!m_host.ParentGroup.IsDeleted) 7425 if (!m_host.ParentGroup.IsDeleted)
7848 { 7426 {
7849 m_host.ParentGroup.RootPart.SetVehicleVectorParam(param, vec); 7427 m_host.ParentGroup.RootPart.SetVehicleVectorParam(param, vec);
@@ -7854,8 +7432,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7854 //CFK 9/28: so these are not complete yet. 7432 //CFK 9/28: so these are not complete yet.
7855 public void llSetVehicleRotationParam(int param, LSL_Rotation rot) 7433 public void llSetVehicleRotationParam(int param, LSL_Rotation rot)
7856 { 7434 {
7857//// m_host.AddScriptLPS(1);
7858
7859 if (!m_host.ParentGroup.IsDeleted) 7435 if (!m_host.ParentGroup.IsDeleted)
7860 { 7436 {
7861 m_host.ParentGroup.RootPart.SetVehicleRotationParam(param, rot); 7437 m_host.ParentGroup.RootPart.SetVehicleRotationParam(param, rot);
@@ -7864,8 +7440,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7864 7440
7865 public void llSetVehicleFlags(int flags) 7441 public void llSetVehicleFlags(int flags)
7866 { 7442 {
7867//// m_host.AddScriptLPS(1);
7868
7869 if (!m_host.ParentGroup.IsDeleted) 7443 if (!m_host.ParentGroup.IsDeleted)
7870 { 7444 {
7871 m_host.ParentGroup.RootPart.SetVehicleFlags(flags, false); 7445 m_host.ParentGroup.RootPart.SetVehicleFlags(flags, false);
@@ -7874,8 +7448,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7874 7448
7875 public void llRemoveVehicleFlags(int flags) 7449 public void llRemoveVehicleFlags(int flags)
7876 { 7450 {
7877//// m_host.AddScriptLPS(1);
7878
7879 if (!m_host.ParentGroup.IsDeleted) 7451 if (!m_host.ParentGroup.IsDeleted)
7880 { 7452 {
7881 m_host.ParentGroup.RootPart.SetVehicleFlags(flags, true); 7453 m_host.ParentGroup.RootPart.SetVehicleFlags(flags, true);
@@ -7895,13 +7467,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7895 7467
7896 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) 7468 public void llSitTarget(LSL_Vector offset, LSL_Rotation rot)
7897 { 7469 {
7898//// m_host.AddScriptLPS(1);
7899 SitTarget(m_host, offset, rot); 7470 SitTarget(m_host, offset, rot);
7900 } 7471 }
7901 7472
7902 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) 7473 public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot)
7903 { 7474 {
7904//// m_host.AddScriptLPS(1);
7905 if (link == ScriptBaseClass.LINK_ROOT) 7475 if (link == ScriptBaseClass.LINK_ROOT)
7906 SitTarget(m_host.ParentGroup.RootPart, offset, rot); 7476 SitTarget(m_host.ParentGroup.RootPart, offset, rot);
7907 else if (link == ScriptBaseClass.LINK_THIS) 7477 else if (link == ScriptBaseClass.LINK_THIS)
@@ -7918,14 +7488,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7918 7488
7919 public LSL_Key llAvatarOnSitTarget() 7489 public LSL_Key llAvatarOnSitTarget()
7920 { 7490 {
7921//// m_host.AddScriptLPS(1);
7922 return m_host.SitTargetAvatar.ToString(); 7491 return m_host.SitTargetAvatar.ToString();
7923 } 7492 }
7924 7493
7925 // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget 7494 // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget
7926 public LSL_Key llAvatarOnLinkSitTarget(LSL_Integer linknum) 7495 public LSL_Key llAvatarOnLinkSitTarget(LSL_Integer linknum)
7927 { 7496 {
7928//// m_host.AddScriptLPS(1);
7929 if(linknum == ScriptBaseClass.LINK_SET || 7497 if(linknum == ScriptBaseClass.LINK_SET ||
7930 linknum == ScriptBaseClass.LINK_ALL_CHILDREN || 7498 linknum == ScriptBaseClass.LINK_ALL_CHILDREN ||
7931 linknum == ScriptBaseClass.LINK_ALL_OTHERS || 7499 linknum == ScriptBaseClass.LINK_ALL_OTHERS ||
@@ -7941,7 +7509,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7941 7509
7942 public void llAddToLandPassList(LSL_Key avatar, LSL_Float hours) 7510 public void llAddToLandPassList(LSL_Key avatar, LSL_Float hours)
7943 { 7511 {
7944//// m_host.AddScriptLPS(1);
7945 UUID key; 7512 UUID key;
7946 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); 7513 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
7947 7514
@@ -7978,12 +7545,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7978 World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); 7545 World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land);
7979 } 7546 }
7980 } 7547 }
7981//// ScriptSleep(m_sleepMsOnAddToLandPassList);
7982 } 7548 }
7983 7549
7984 public void llSetTouchText(string text) 7550 public void llSetTouchText(string text)
7985 { 7551 {
7986//// m_host.AddScriptLPS(1);
7987 if(text.Length <= 9) 7552 if(text.Length <= 9)
7988 m_host.TouchName = text; 7553 m_host.TouchName = text;
7989 else 7554 else
@@ -7992,7 +7557,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
7992 7557
7993 public void llSetSitText(string text) 7558 public void llSetSitText(string text)
7994 { 7559 {
7995//// m_host.AddScriptLPS(1);
7996 if (text.Length <= 9) 7560 if (text.Length <= 9)
7997 m_host.SitName = text; 7561 m_host.SitName = text;
7998 else 7562 else
@@ -8001,7 +7565,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8001 7565
8002 public void llSetCameraEyeOffset(LSL_Vector offset) 7566 public void llSetCameraEyeOffset(LSL_Vector offset)
8003 { 7567 {
8004//// m_host.AddScriptLPS(1);
8005 m_host.SetCameraEyeOffset(offset); 7568 m_host.SetCameraEyeOffset(offset);
8006 7569
8007 if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) 7570 if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero)
@@ -8010,7 +7573,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8010 7573
8011 public void llSetCameraAtOffset(LSL_Vector offset) 7574 public void llSetCameraAtOffset(LSL_Vector offset)
8012 { 7575 {
8013//// m_host.AddScriptLPS(1);
8014 m_host.SetCameraAtOffset(offset); 7576 m_host.SetCameraAtOffset(offset);
8015 7577
8016 if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) 7578 if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero)
@@ -8019,8 +7581,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8019 7581
8020 public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) 7582 public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at)
8021 { 7583 {
8022//// m_host.AddScriptLPS(1);
8023
8024 if (link == ScriptBaseClass.LINK_SET || 7584 if (link == ScriptBaseClass.LINK_SET ||
8025 link == ScriptBaseClass.LINK_ALL_CHILDREN || 7585 link == ScriptBaseClass.LINK_ALL_CHILDREN ||
8026 link == ScriptBaseClass.LINK_ALL_OTHERS) return; 7586 link == ScriptBaseClass.LINK_ALL_OTHERS) return;
@@ -8049,7 +7609,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8049 7609
8050 public LSL_String llDumpList2String(LSL_List src, string seperator) 7610 public LSL_String llDumpList2String(LSL_List src, string seperator)
8051 { 7611 {
8052//// m_host.AddScriptLPS(1);
8053 if (src.Length == 0) 7612 if (src.Length == 0)
8054 { 7613 {
8055 return String.Empty; 7614 return String.Empty;
@@ -8065,7 +7624,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8065 7624
8066 public LSL_Integer llScriptDanger(LSL_Vector pos) 7625 public LSL_Integer llScriptDanger(LSL_Vector pos)
8067 { 7626 {
8068//// m_host.AddScriptLPS(1);
8069 bool result = World.LSLScriptDanger(m_host, pos); 7627 bool result = World.LSLScriptDanger(m_host, pos);
8070 if (result) 7628 if (result)
8071 { 7629 {
@@ -8084,7 +7642,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8084 if (dm == null) 7642 if (dm == null)
8085 return; 7643 return;
8086 7644
8087//// m_host.AddScriptLPS(1);
8088 UUID av = new UUID(); 7645 UUID av = new UUID();
8089 if (!UUID.TryParse(avatar,out av)) 7646 if (!UUID.TryParse(avatar,out av))
8090 { 7647 {
@@ -8131,35 +7688,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8131 dm.SendDialogToUser( 7688 dm.SendDialogToUser(
8132 av, m_host.Name, m_host.UUID, m_host.OwnerID, 7689 av, m_host.Name, m_host.UUID, m_host.OwnerID,
8133 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); 7690 message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts);
8134
8135//// ScriptSleep(m_sleepMsOnDialog);
8136 } 7691 }
8137 7692
8138 public void llVolumeDetect(int detect) 7693 public void llVolumeDetect(int detect)
8139 { 7694 {
8140//// m_host.AddScriptLPS(1);
8141
8142 if (!m_host.ParentGroup.IsDeleted) 7695 if (!m_host.ParentGroup.IsDeleted)
8143 m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0); 7696 m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0);
8144 } 7697 }
8145 7698
8146 public void llRemoteLoadScript(string target, string name, int running, int start_param) 7699 public void llRemoteLoadScript(string target, string name, int running, int start_param)
8147 { 7700 {
8148//// m_host.AddScriptLPS(1);
8149 Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); 7701 Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead");
8150//// ScriptSleep(m_sleepMsOnRemoteLoadScript);
8151 } 7702 }
8152 7703
8153 public void llSetRemoteScriptAccessPin(int pin) 7704 public void llSetRemoteScriptAccessPin(int pin)
8154 { 7705 {
8155//// m_host.AddScriptLPS(1);
8156 m_host.ScriptAccessPin = pin; 7706 m_host.ScriptAccessPin = pin;
8157 } 7707 }
8158 7708
8159 public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) 7709 public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param)
8160 { 7710 {
8161//// m_host.AddScriptLPS(1);
8162
8163 UUID destId = UUID.Zero; 7711 UUID destId = UUID.Zero;
8164 7712
8165 if (!UUID.TryParse(target, out destId)) 7713 if (!UUID.TryParse(target, out destId))
@@ -8196,13 +7744,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8196 m_host.Inventory.RemoveInventoryItem(item.ItemID); 7744 m_host.Inventory.RemoveInventoryItem(item.ItemID);
8197 } 7745 }
8198 } 7746 }
8199//// // this will cause the delay even if the script pin or permissions were wrong - seems ok
8200//// ScriptSleep(m_sleepMsOnRemoteLoadScriptPin);
8201 } 7747 }
8202 7748
8203 public void llOpenRemoteDataChannel() 7749 public void llOpenRemoteDataChannel()
8204 { 7750 {
8205//// m_host.AddScriptLPS(1);
8206 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 7751 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
8207 if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) 7752 if (xmlrpcMod != null && xmlrpcMod.IsEnabled())
8208 { 7753 {
@@ -8228,14 +7773,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8228 m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams("remote_data", resobj, 7773 m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams("remote_data", resobj,
8229 new DetectParams[0])); 7774 new DetectParams[0]));
8230 } 7775 }
8231//// ScriptSleep(m_sleepMsOnOpenRemoteDataChannel);
8232 } 7776 }
8233 7777
8234 public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata) 7778 public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata)
8235 { 7779 {
8236//// m_host.AddScriptLPS(1);
8237 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 7780 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
8238//// ScriptSleep(m_sleepMsOnSendRemoteData);
8239 if (xmlrpcMod == null) 7781 if (xmlrpcMod == null)
8240 return ""; 7782 return "";
8241 return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); 7783 return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString();
@@ -8243,17 +7785,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8243 7785
8244 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) 7786 public void llRemoteDataReply(string channel, string message_id, string sdata, int idata)
8245 { 7787 {
8246//// m_host.AddScriptLPS(1);
8247 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 7788 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
8248 if (xmlrpcMod != null) 7789 if (xmlrpcMod != null)
8249 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); 7790 xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
8250//// ScriptSleep(m_sleepMsOnRemoteDataReply);
8251 } 7791 }
8252 7792
8253 public void llCloseRemoteDataChannel(string channel) 7793 public void llCloseRemoteDataChannel(string channel)
8254 { 7794 {
8255//// m_host.AddScriptLPS(1);
8256
8257 IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); 7795 IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>();
8258 if (xmlRpcRouter != null) 7796 if (xmlRpcRouter != null)
8259 { 7797 {
@@ -8263,18 +7801,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8263 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); 7801 IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
8264 if (xmlrpcMod != null) 7802 if (xmlrpcMod != null)
8265 xmlrpcMod.CloseXMLRPCChannel((UUID)channel); 7803 xmlrpcMod.CloseXMLRPCChannel((UUID)channel);
8266//// ScriptSleep(m_sleepMsOnCloseRemoteDataChannel);
8267 } 7804 }
8268 7805
8269 public LSL_String llMD5String(string src, int nonce) 7806 public LSL_String llMD5String(string src, int nonce)
8270 { 7807 {
8271//// m_host.AddScriptLPS(1);
8272 return Util.Md5Hash(String.Format("{0}:{1}", src, nonce.ToString()), Encoding.UTF8); 7808 return Util.Md5Hash(String.Format("{0}:{1}", src, nonce.ToString()), Encoding.UTF8);
8273 } 7809 }
8274 7810
8275 public LSL_String llSHA1String(string src) 7811 public LSL_String llSHA1String(string src)
8276 { 7812 {
8277//// m_host.AddScriptLPS(1);
8278 return Util.SHA1Hash(src, Encoding.UTF8).ToLower(); 7813 return Util.SHA1Hash(src, Encoding.UTF8).ToLower();
8279 } 7814 }
8280 7815
@@ -8710,25 +8245,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
8710 8245
8711 public void llSetPrimitiveParams(LSL_List rules) 8246 public void llSetPrimitiveParams(LSL_List rules)
8712 { 8247 {
8713//// m_host.AddScriptLPS(1);
8714
8715 SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); 8248 SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams");
8716
8717//// ScriptSleep(m_sleepMsOnSetPrimitiveParams);
8718 } 8249 }
8719 8250
8720 public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) 8251 public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules)
8721 { 8252 {
8722//// m_host.AddScriptLPS(1);
8723
8724 SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); 8253 SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams");
8725//// ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams);
8726 } 8254 }
8727 8255
8728 public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) 8256 public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules)
8729 { 8257 {
8730//// m_host.AddScriptLPS(1);
8731
8732 SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); 8258 SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast");
8733 } 8259 }
8734 8260
@@ -10858,7 +10384,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10858 10384
10859 public LSL_String llStringToBase64(string str) 10385 public LSL_String llStringToBase64(string str)
10860 { 10386 {
10861//// m_host.AddScriptLPS(1);
10862 try 10387 try
10863 { 10388 {
10864 byte[] encData_byte; 10389 byte[] encData_byte;
@@ -10875,7 +10400,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10875 10400
10876 public LSL_String llBase64ToString(string str) 10401 public LSL_String llBase64ToString(string str)
10877 { 10402 {
10878//// m_host.AddScriptLPS(1);
10879 try 10403 try
10880 { 10404 {
10881 byte[] b = Convert.FromBase64String(str); 10405 byte[] b = Convert.FromBase64String(str);
@@ -10894,9 +10418,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10894 10418
10895 string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 10419 string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
10896 10420
10897//// ScriptSleep(300);
10898//// m_host.AddScriptLPS(1);
10899
10900 if (str1 == String.Empty) 10421 if (str1 == String.Empty)
10901 return String.Empty; 10422 return String.Empty;
10902 if (str2 == String.Empty) 10423 if (str2 == String.Empty)
@@ -10992,26 +10513,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10992 10513
10993 public void llRemoteDataSetRegion() 10514 public void llRemoteDataSetRegion()
10994 { 10515 {
10995//// m_host.AddScriptLPS(1);
10996 Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead"); 10516 Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead");
10997 } 10517 }
10998 10518
10999 public LSL_Float llLog10(double val) 10519 public LSL_Float llLog10(double val)
11000 { 10520 {
11001//// m_host.AddScriptLPS(1);
11002 return (double)Math.Log10(val); 10521 return (double)Math.Log10(val);
11003 } 10522 }
11004 10523
11005 public LSL_Float llLog(double val) 10524 public LSL_Float llLog(double val)
11006 { 10525 {
11007//// m_host.AddScriptLPS(1);
11008 return (double)Math.Log(val); 10526 return (double)Math.Log(val);
11009 } 10527 }
11010 10528
11011 public LSL_List llGetAnimationList(LSL_Key id) 10529 public LSL_List llGetAnimationList(LSL_Key id)
11012 { 10530 {
11013//// m_host.AddScriptLPS(1);
11014
11015 UUID avID; 10531 UUID avID;
11016 if(!UUID.TryParse(id, out avID)) 10532 if(!UUID.TryParse(id, out avID))
11017 return new LSL_List(); 10533 return new LSL_List();
@@ -11030,21 +10546,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11030 10546
11031 public void llSetParcelMusicURL(string url) 10547 public void llSetParcelMusicURL(string url)
11032 { 10548 {
11033//// m_host.AddScriptLPS(1);
11034
11035 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); 10549 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
11036 10550
11037 if (land.LandData.OwnerID != m_host.OwnerID) 10551 if (land.LandData.OwnerID != m_host.OwnerID)
11038 return; 10552 return;
11039 10553
11040 land.SetMusicUrl(url); 10554 land.SetMusicUrl(url);
11041//// ScriptSleep(m_sleepMsOnSetParcelMusicURL);
11042 } 10555 }
11043 10556
11044 public LSL_String llGetParcelMusicURL() 10557 public LSL_String llGetParcelMusicURL()
11045 { 10558 {
11046//// m_host.AddScriptLPS(1);
11047
11048 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); 10559 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
11049 10560
11050 if (land.LandData.OwnerID != m_host.OwnerID) 10561 if (land.LandData.OwnerID != m_host.OwnerID)
@@ -11055,8 +10566,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11055 10566
11056 public LSL_Vector llGetRootPosition() 10567 public LSL_Vector llGetRootPosition()
11057 { 10568 {
11058//// m_host.AddScriptLPS(1);
11059
11060 return new LSL_Vector(m_host.ParentGroup.AbsolutePosition); 10569 return new LSL_Vector(m_host.ParentGroup.AbsolutePosition);
11061 } 10570 }
11062 10571
@@ -11071,7 +10580,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11071 /// </summary> 10580 /// </summary>
11072 public LSL_Rotation llGetRootRotation() 10581 public LSL_Rotation llGetRootRotation()
11073 { 10582 {
11074//// m_host.AddScriptLPS(1);
11075 Quaternion q; 10583 Quaternion q;
11076 if (m_host.ParentGroup.AttachmentPoint != 0) 10584 if (m_host.ParentGroup.AttachmentPoint != 0)
11077 { 10585 {
@@ -11097,26 +10605,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11097 10605
11098 public void llSetObjectDesc(string desc) 10606 public void llSetObjectDesc(string desc)
11099 { 10607 {
11100//// m_host.AddScriptLPS(1);
11101 m_host.Description = desc!=null?desc:String.Empty; 10608 m_host.Description = desc!=null?desc:String.Empty;
11102 } 10609 }
11103 10610
11104 public LSL_Key llGetCreator() 10611 public LSL_Key llGetCreator()
11105 { 10612 {
11106//// m_host.AddScriptLPS(1);
11107 return m_host.CreatorID.ToString(); 10613 return m_host.CreatorID.ToString();
11108 } 10614 }
11109 10615
11110 public LSL_String llGetTimestamp() 10616 public LSL_String llGetTimestamp()
11111 { 10617 {
11112//// m_host.AddScriptLPS(1);
11113 return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); 10618 return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
11114 } 10619 }
11115 10620
11116 public LSL_Integer llGetNumberOfPrims() 10621 public LSL_Integer llGetNumberOfPrims()
11117 { 10622 {
11118//// m_host.AddScriptLPS(1);
11119
11120 return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); 10623 return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount();
11121 } 10624 }
11122 10625
@@ -11133,7 +10636,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11133 /// </summary> 10636 /// </summary>
11134 public LSL_List llGetBoundingBox(string obj) 10637 public LSL_List llGetBoundingBox(string obj)
11135 { 10638 {
11136//// m_host.AddScriptLPS(1);
11137 UUID objID = UUID.Zero; 10639 UUID objID = UUID.Zero;
11138 LSL_List result = new LSL_List(); 10640 LSL_List result = new LSL_List();
11139 10641
@@ -11282,8 +10784,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11282 10784
11283 public LSL_List llGetPrimitiveParams(LSL_List rules) 10785 public LSL_List llGetPrimitiveParams(LSL_List rules)
11284 { 10786 {
11285//// m_host.AddScriptLPS(1);
11286
11287 LSL_List result = new LSL_List(); 10787 LSL_List result = new LSL_List();
11288 10788
11289 LSL_List remaining = GetPrimParams(m_host, rules, ref result); 10789 LSL_List remaining = GetPrimParams(m_host, rules, ref result);
@@ -11304,8 +10804,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11304 10804
11305 public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) 10805 public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules)
11306 { 10806 {
11307//// m_host.AddScriptLPS(1);
11308
11309 // acording to SL wiki this must indicate a single link number or link_root or link_this. 10807 // acording to SL wiki this must indicate a single link number or link_root or link_this.
11310 // keep other options as before 10808 // keep other options as before
11311 10809
@@ -11931,15 +11429,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11931 11429
11932 public LSL_List llGetPrimMediaParams(int face, LSL_List rules) 11430 public LSL_List llGetPrimMediaParams(int face, LSL_List rules)
11933 { 11431 {
11934//// m_host.AddScriptLPS(1);
11935//// ScriptSleep(m_sleepMsOnGetPrimMediaParams);
11936 return GetPrimMediaParams(m_host, face, rules); 11432 return GetPrimMediaParams(m_host, face, rules);
11937 } 11433 }
11938 11434
11939 public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) 11435 public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
11940 { 11436 {
11941//// m_host.AddScriptLPS(1);
11942//// ScriptSleep(m_sleepMsOnGetLinkMedia);
11943 if (link == ScriptBaseClass.LINK_ROOT) 11437 if (link == ScriptBaseClass.LINK_ROOT)
11944 return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); 11438 return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules);
11945 else if (link == ScriptBaseClass.LINK_THIS) 11439 else if (link == ScriptBaseClass.LINK_THIS)
@@ -12058,15 +11552,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12058 11552
12059 public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) 11553 public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules)
12060 { 11554 {
12061//// m_host.AddScriptLPS(1);
12062//// ScriptSleep(m_sleepMsOnSetPrimMediaParams);
12063 return SetPrimMediaParams(m_host, face, rules); 11555 return SetPrimMediaParams(m_host, face, rules);
12064 } 11556 }
12065 11557
12066 public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) 11558 public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules)
12067 { 11559 {
12068//// m_host.AddScriptLPS(1);
12069//// ScriptSleep(m_sleepMsOnSetLinkMedia);
12070 if (link == ScriptBaseClass.LINK_ROOT) 11560 if (link == ScriptBaseClass.LINK_ROOT)
12071 return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); 11561 return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules);
12072 else if (link == ScriptBaseClass.LINK_THIS) 11562 else if (link == ScriptBaseClass.LINK_THIS)
@@ -12184,15 +11674,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12184 11674
12185 public LSL_Integer llClearPrimMedia(LSL_Integer face) 11675 public LSL_Integer llClearPrimMedia(LSL_Integer face)
12186 { 11676 {
12187//// m_host.AddScriptLPS(1);
12188//// ScriptSleep(m_sleepMsOnClearPrimMedia);
12189 return ClearPrimMedia(m_host, face); 11677 return ClearPrimMedia(m_host, face);
12190 } 11678 }
12191 11679
12192 public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) 11680 public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face)
12193 { 11681 {
12194//// m_host.AddScriptLPS(1);
12195//// ScriptSleep(m_sleepMsOnClearLinkMedia);
12196 if (link == ScriptBaseClass.LINK_ROOT) 11682 if (link == ScriptBaseClass.LINK_ROOT)
12197 return ClearPrimMedia(m_host.ParentGroup.RootPart, face); 11683 return ClearPrimMedia(m_host.ParentGroup.RootPart, face);
12198 else if (link == ScriptBaseClass.LINK_THIS) 11684 else if (link == ScriptBaseClass.LINK_THIS)
@@ -12357,8 +11843,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12357 11843
12358 char[] imdt = new char[8]; 11844 char[] imdt = new char[8];
12359 11845
12360//// m_host.AddScriptLPS(1);
12361
12362 // Manually unroll the loop 11846 // Manually unroll the loop
12363 11847
12364 imdt[7] = '='; 11848 imdt[7] = '=';
@@ -12419,8 +11903,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12419 int number = 0; 11903 int number = 0;
12420 int digit; 11904 int digit;
12421 11905
12422//// m_host.AddScriptLPS(1);
12423
12424 // Require a well-fromed base64 string 11906 // Require a well-fromed base64 string
12425 11907
12426 if (str.Length > 8) 11908 if (str.Length > 8)
@@ -12476,14 +11958,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12476 11958
12477 public LSL_Float llGetGMTclock() 11959 public LSL_Float llGetGMTclock()
12478 { 11960 {
12479//// m_host.AddScriptLPS(1);
12480 return DateTime.UtcNow.TimeOfDay.TotalSeconds; 11961 return DateTime.UtcNow.TimeOfDay.TotalSeconds;
12481 } 11962 }
12482 11963
12483 public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) 11964 public LSL_String llGetHTTPHeader(LSL_Key request_id, string header)
12484 { 11965 {
12485//// m_host.AddScriptLPS(1);
12486
12487 if (m_UrlModule != null) 11966 if (m_UrlModule != null)
12488 return m_UrlModule.GetHttpHeader(new UUID(request_id), header); 11967 return m_UrlModule.GetHttpHeader(new UUID(request_id), header);
12489 return String.Empty; 11968 return String.Empty;
@@ -12492,7 +11971,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12492 11971
12493 public LSL_String llGetSimulatorHostname() 11972 public LSL_String llGetSimulatorHostname()
12494 { 11973 {
12495//// m_host.AddScriptLPS(1);
12496 IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>(); 11974 IUrlModule UrlModule = World.RequestModuleInterface<IUrlModule>();
12497 return UrlModule.ExternalHostNameForLSL; 11975 return UrlModule.ExternalHostNameForLSL;
12498 } 11976 }
@@ -12566,8 +12044,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12566 int i, j; 12044 int i, j;
12567 string d; 12045 string d;
12568 12046
12569//// m_host.AddScriptLPS(1);
12570
12571 /* 12047 /*
12572 * Convert separator and spacer lists to C# strings. 12048 * Convert separator and spacer lists to C# strings.
12573 * Also filter out null strings so we don't hang. 12049 * Also filter out null strings so we don't hang.
@@ -12663,8 +12139,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12663 12139
12664 public LSL_Integer llGetObjectPermMask(int mask) 12140 public LSL_Integer llGetObjectPermMask(int mask)
12665 { 12141 {
12666//// m_host.AddScriptLPS(1);
12667
12668 int permmask = 0; 12142 int permmask = 0;
12669 12143
12670 if (mask == ScriptBaseClass.MASK_BASE)//0 12144 if (mask == ScriptBaseClass.MASK_BASE)//0
@@ -12697,8 +12171,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12697 12171
12698 public void llSetObjectPermMask(int mask, int value) 12172 public void llSetObjectPermMask(int mask, int value)
12699 { 12173 {
12700//// m_host.AddScriptLPS(1);
12701
12702 if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) 12174 if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false))
12703 { 12175 {
12704 if (World.Permissions.IsAdministrator(m_host.OwnerID)) 12176 if (World.Permissions.IsAdministrator(m_host.OwnerID))
@@ -12733,8 +12205,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12733 12205
12734 public LSL_Integer llGetInventoryPermMask(string itemName, int mask) 12206 public LSL_Integer llGetInventoryPermMask(string itemName, int mask)
12735 { 12207 {
12736//// m_host.AddScriptLPS(1);
12737
12738 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); 12208 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName);
12739 12209
12740 if (item == null) 12210 if (item == null)
@@ -12759,8 +12229,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12759 12229
12760 public void llSetInventoryPermMask(string itemName, int mask, int value) 12230 public void llSetInventoryPermMask(string itemName, int mask, int value)
12761 { 12231 {
12762//// m_host.AddScriptLPS(1);
12763
12764 if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) 12232 if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false))
12765 { 12233 {
12766 if (World.Permissions.IsAdministrator(m_host.OwnerID)) 12234 if (World.Permissions.IsAdministrator(m_host.OwnerID))
@@ -12794,8 +12262,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12794 12262
12795 public LSL_Key llGetInventoryCreator(string itemName) 12263 public LSL_Key llGetInventoryCreator(string itemName)
12796 { 12264 {
12797//// m_host.AddScriptLPS(1);
12798
12799 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); 12265 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName);
12800 12266
12801 if (item == null) 12267 if (item == null)
@@ -12810,8 +12276,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12810 12276
12811 public void llOwnerSay(string msg) 12277 public void llOwnerSay(string msg)
12812 { 12278 {
12813//// m_host.AddScriptLPS(1);
12814
12815 World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, 12279 World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0,
12816 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); 12280 m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
12817// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>(); 12281// IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
@@ -12820,7 +12284,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12820 12284
12821 public LSL_Key llRequestSecureURL() 12285 public LSL_Key llRequestSecureURL()
12822 { 12286 {
12823//// m_host.AddScriptLPS(1);
12824 if (m_UrlModule != null) 12287 if (m_UrlModule != null)
12825 return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); 12288 return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString();
12826 return UUID.Zero.ToString(); 12289 return UUID.Zero.ToString();
@@ -12830,8 +12293,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12830 { 12293 {
12831 try 12294 try
12832 { 12295 {
12833//// m_host.AddScriptLPS(1);
12834
12835 string reply = String.Empty; 12296 string reply = String.Empty;
12836 12297
12837 GridRegion info; 12298 GridRegion info;
@@ -12846,7 +12307,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12846 case ScriptBaseClass.DATA_SIM_POS: 12307 case ScriptBaseClass.DATA_SIM_POS:
12847 if (info == null) 12308 if (info == null)
12848 { 12309 {
12849//// ScriptSleep(m_sleepMsOnRequestSimulatorData);
12850 return UUID.Zero.ToString(); 12310 return UUID.Zero.ToString();
12851 } 12311 }
12852 12312
@@ -12893,7 +12353,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12893 case ScriptBaseClass.DATA_SIM_RATING: 12353 case ScriptBaseClass.DATA_SIM_RATING:
12894 if (info == null) 12354 if (info == null)
12895 { 12355 {
12896//// ScriptSleep(m_sleepMsOnRequestSimulatorData);
12897 return UUID.Zero.ToString(); 12356 return UUID.Zero.ToString();
12898 } 12357 }
12899 int access = info.Maturity; 12358 int access = info.Maturity;
@@ -12910,7 +12369,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12910 reply = "OpenSim"; 12369 reply = "OpenSim";
12911 break; 12370 break;
12912 default: 12371 default:
12913//// ScriptSleep(m_sleepMsOnRequestSimulatorData);
12914 return UUID.Zero.ToString(); // Raise no event 12372 return UUID.Zero.ToString(); // Raise no event
12915 } 12373 }
12916 UUID rq = UUID.Random(); 12374 UUID rq = UUID.Random();
@@ -12921,7 +12379,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12921 AsyncCommands. 12379 AsyncCommands.
12922 DataserverPlugin.DataserverReply(rq.ToString(), reply); 12380 DataserverPlugin.DataserverReply(rq.ToString(), reply);
12923 12381
12924//// ScriptSleep(m_sleepMsOnRequestSimulatorData);
12925 return tid.ToString(); 12382 return tid.ToString();
12926 } 12383 }
12927 catch(Exception) 12384 catch(Exception)
@@ -12933,8 +12390,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12933 12390
12934 public LSL_Key llRequestURL() 12391 public LSL_Key llRequestURL()
12935 { 12392 {
12936//// m_host.AddScriptLPS(1);
12937
12938 if (m_UrlModule != null) 12393 if (m_UrlModule != null)
12939 return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); 12394 return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString();
12940 return UUID.Zero.ToString(); 12395 return UUID.Zero.ToString();
@@ -12942,13 +12397,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12942 12397
12943 public void llForceMouselook(int mouselook) 12398 public void llForceMouselook(int mouselook)
12944 { 12399 {
12945//// m_host.AddScriptLPS(1);
12946 m_host.SetForceMouselook(mouselook != 0); 12400 m_host.SetForceMouselook(mouselook != 0);
12947 } 12401 }
12948 12402
12949 public LSL_Float llGetObjectMass(LSL_Key id) 12403 public LSL_Float llGetObjectMass(LSL_Key id)
12950 { 12404 {
12951//// m_host.AddScriptLPS(1);
12952 UUID key = new UUID(); 12405 UUID key = new UUID();
12953 if (!UUID.TryParse(id, out key)) 12406 if (!UUID.TryParse(id, out key))
12954 return 0; 12407 return 0;
@@ -12993,8 +12446,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
12993 { 12446 {
12994 LSL_List pref; 12447 LSL_List pref;
12995 12448
12996//// m_host.AddScriptLPS(1);
12997
12998 // Note that although we have normalized, both 12449 // Note that although we have normalized, both
12999 // indices could still be negative. 12450 // indices could still be negative.
13000 if (start < 0) 12451 if (start < 0)
@@ -13064,13 +12515,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13064 12515
13065 public void llLoadURL(string avatar_id, string message, string url) 12516 public void llLoadURL(string avatar_id, string message, string url)
13066 { 12517 {
13067//// m_host.AddScriptLPS(1);
13068
13069 IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); 12518 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();
13070 if (null != dm) 12519 if (null != dm)
13071 dm.SendUrlToUser( 12520 dm.SendUrlToUser(
13072 new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url); 12521 new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url);
13073//// ScriptSleep(m_sleepMsOnLoadURL);
13074 } 12522 }
13075 12523
13076 public void llParcelMediaCommandList(LSL_List commandList) 12524 public void llParcelMediaCommandList(LSL_List commandList)
@@ -13078,8 +12526,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13078 // TODO: Not implemented yet (missing in libomv?): 12526 // TODO: Not implemented yet (missing in libomv?):
13079 // PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) 12527 // 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)
13080 12528
13081//// m_host.AddScriptLPS(1);
13082
13083 // according to the docs, this command only works if script owner and land owner are the same 12529 // according to the docs, this command only works if script owner and land owner are the same
13084 // lets add estate owners and gods, too, and use the generic permission check. 12530 // lets add estate owners and gods, too, and use the generic permission check.
13085 ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); 12531 ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
@@ -13328,12 +12774,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13328 commandToSend.Value, time); 12774 commandToSend.Value, time);
13329 } 12775 }
13330 } 12776 }
13331//// ScriptSleep(m_sleepMsOnParcelMediaCommandList);
13332 } 12777 }
13333 12778
13334 public LSL_List llParcelMediaQuery(LSL_List aList) 12779 public LSL_List llParcelMediaQuery(LSL_List aList)
13335 { 12780 {
13336//// m_host.AddScriptLPS(1);
13337 LSL_List list = new LSL_List(); 12781 LSL_List list = new LSL_List();
13338 Vector3 pos = m_host.AbsolutePosition; 12782 Vector3 pos = m_host.AbsolutePosition;
13339 12783
@@ -13380,23 +12824,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13380 } 12824 }
13381 } 12825 }
13382 } 12826 }
13383//// ScriptSleep(m_sleepMsOnParcelMediaQuery);
13384 return list; 12827 return list;
13385 } 12828 }
13386 12829
13387 public LSL_Integer llModPow(int a, int b, int c) 12830 public LSL_Integer llModPow(int a, int b, int c)
13388 { 12831 {
13389//// m_host.AddScriptLPS(1);
13390 Int64 tmp = 0; 12832 Int64 tmp = 0;
13391 Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); 12833 Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp);
13392//// ScriptSleep(m_sleepMsOnModPow);
13393 return Convert.ToInt32(tmp); 12834 return Convert.ToInt32(tmp);
13394 } 12835 }
13395 12836
13396 public LSL_Integer llGetInventoryType(string name) 12837 public LSL_Integer llGetInventoryType(string name)
13397 { 12838 {
13398//// m_host.AddScriptLPS(1);
13399
13400 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); 12839 TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name);
13401 12840
13402 if (item == null) 12841 if (item == null)
@@ -13407,8 +12846,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13407 12846
13408 public void llSetPayPrice(int price, LSL_List quick_pay_buttons) 12847 public void llSetPayPrice(int price, LSL_List quick_pay_buttons)
13409 { 12848 {
13410//// m_host.AddScriptLPS(1);
13411
13412 if (quick_pay_buttons.Data.Length < 4) 12849 if (quick_pay_buttons.Data.Length < 4)
13413 { 12850 {
13414 int x; 12851 int x;
@@ -13429,8 +12866,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13429 12866
13430 public LSL_Vector llGetCameraPos() 12867 public LSL_Vector llGetCameraPos()
13431 { 12868 {
13432//// m_host.AddScriptLPS(1);
13433
13434 if (m_item.PermsGranter == UUID.Zero) 12869 if (m_item.PermsGranter == UUID.Zero)
13435 return Vector3.Zero; 12870 return Vector3.Zero;
13436 12871
@@ -13453,8 +12888,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13453 12888
13454 public LSL_Rotation llGetCameraRot() 12889 public LSL_Rotation llGetCameraRot()
13455 { 12890 {
13456//// m_host.AddScriptLPS(1);
13457
13458 if (m_item.PermsGranter == UUID.Zero) 12891 if (m_item.PermsGranter == UUID.Zero)
13459 return Quaternion.Identity; 12892 return Quaternion.Identity;
13460 12893
@@ -13476,21 +12909,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13476 12909
13477 public void llSetPrimURL(string url) 12910 public void llSetPrimURL(string url)
13478 { 12911 {
13479//// m_host.AddScriptLPS(1);
13480 Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); 12912 Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead");
13481//// ScriptSleep(m_sleepMsOnSetPrimURL);
13482 } 12913 }
13483 12914
13484 public void llRefreshPrimURL() 12915 public void llRefreshPrimURL()
13485 { 12916 {
13486//// m_host.AddScriptLPS(1);
13487 Deprecated("llRefreshPrimURL"); 12917 Deprecated("llRefreshPrimURL");
13488//// ScriptSleep(m_sleepMsOnRefreshPrimURL);
13489 } 12918 }
13490 12919
13491 public LSL_String llEscapeURL(string url) 12920 public LSL_String llEscapeURL(string url)
13492 { 12921 {
13493//// m_host.AddScriptLPS(1);
13494 try 12922 try
13495 { 12923 {
13496 return Uri.EscapeDataString(url); 12924 return Uri.EscapeDataString(url);
@@ -13503,7 +12931,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13503 12931
13504 public LSL_String llUnescapeURL(string url) 12932 public LSL_String llUnescapeURL(string url)
13505 { 12933 {
13506//// m_host.AddScriptLPS(1);
13507 try 12934 try
13508 { 12935 {
13509 return Uri.UnescapeDataString(url); 12936 return Uri.UnescapeDataString(url);
@@ -13516,7 +12943,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13516 12943
13517 public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt) 12944 public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt)
13518 { 12945 {
13519//// m_host.AddScriptLPS(1);
13520 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); 12946 DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0);
13521 if (detectedParams == null) 12947 if (detectedParams == null)
13522 { 12948 {
@@ -13537,12 +12963,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13537 avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name, 12963 avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name,
13538 simname, pos, lookAt); 12964 simname, pos, lookAt);
13539 } 12965 }
13540//// ScriptSleep(m_sleepMsOnMapDestination);
13541 } 12966 }
13542 12967
13543 public void llAddToLandBanList(LSL_Key avatar, LSL_Float hours) 12968 public void llAddToLandBanList(LSL_Key avatar, LSL_Float hours)
13544 { 12969 {
13545//// m_host.AddScriptLPS(1);
13546 UUID key; 12970 UUID key;
13547 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); 12971 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
13548 if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) 12972 if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false))
@@ -13578,12 +13002,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13578 World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); 13002 World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land);
13579 } 13003 }
13580 } 13004 }
13581//// ScriptSleep(m_sleepMsOnAddToLandBanList);
13582 } 13005 }
13583 13006
13584 public void llRemoveFromLandPassList(string avatar) 13007 public void llRemoveFromLandPassList(string avatar)
13585 { 13008 {
13586//// m_host.AddScriptLPS(1);
13587 UUID key; 13009 UUID key;
13588 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); 13010 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
13589 if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManagePasses, false)) 13011 if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManagePasses, false))
@@ -13605,12 +13027,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13605 } 13027 }
13606 } 13028 }
13607 } 13029 }
13608//// ScriptSleep(m_sleepMsOnRemoveFromLandPassList);
13609 } 13030 }
13610 13031
13611 public void llRemoveFromLandBanList(string avatar) 13032 public void llRemoveFromLandBanList(string avatar)
13612 { 13033 {
13613//// m_host.AddScriptLPS(1);
13614 UUID key; 13034 UUID key;
13615 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); 13035 ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition);
13616 if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) 13036 if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false))
@@ -13632,13 +13052,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13632 } 13052 }
13633 } 13053 }
13634 } 13054 }
13635//// ScriptSleep(m_sleepMsOnRemoveFromLandBanList);
13636 } 13055 }
13637 13056
13638 public void llSetCameraParams(LSL_List rules) 13057 public void llSetCameraParams(LSL_List rules)
13639 { 13058 {
13640//// m_host.AddScriptLPS(1);
13641
13642 // the object we are in 13059 // the object we are in
13643 UUID objectID = m_host.ParentUUID; 13060 UUID objectID = m_host.ParentUUID;
13644 if (objectID == UUID.Zero) 13061 if (objectID == UUID.Zero)
@@ -13764,8 +13181,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13764 13181
13765 public void llClearCameraParams() 13182 public void llClearCameraParams()
13766 { 13183 {
13767//// m_host.AddScriptLPS(1);
13768
13769 // the object we are in 13184 // the object we are in
13770 UUID objectID = m_host.ParentUUID; 13185 UUID objectID = m_host.ParentUUID;
13771 if (objectID == UUID.Zero) 13186 if (objectID == UUID.Zero)
@@ -13791,7 +13206,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13791 13206
13792 public LSL_Float llListStatistics(int operation, LSL_List src) 13207 public LSL_Float llListStatistics(int operation, LSL_List src)
13793 { 13208 {
13794//// m_host.AddScriptLPS(1);
13795 switch (operation) 13209 switch (operation)
13796 { 13210 {
13797 case ScriptBaseClass.LIST_STAT_RANGE: 13211 case ScriptBaseClass.LIST_STAT_RANGE:
@@ -13823,19 +13237,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13823 13237
13824 public LSL_Integer llGetUnixTime() 13238 public LSL_Integer llGetUnixTime()
13825 { 13239 {
13826//// m_host.AddScriptLPS(1);
13827 return Util.UnixTimeSinceEpoch(); 13240 return Util.UnixTimeSinceEpoch();
13828 } 13241 }
13829 13242
13830 public LSL_Integer llGetParcelFlags(LSL_Vector pos) 13243 public LSL_Integer llGetParcelFlags(LSL_Vector pos)
13831 { 13244 {
13832//// m_host.AddScriptLPS(1);
13833 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags; 13245 return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags;
13834 } 13246 }
13835 13247
13836 public LSL_Integer llGetRegionFlags() 13248 public LSL_Integer llGetRegionFlags()
13837 { 13249 {
13838//// m_host.AddScriptLPS(1);
13839 IEstateModule estate = World.RequestModuleInterface<IEstateModule>(); 13250 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
13840 if (estate == null) 13251 if (estate == null)
13841 return 67108864; 13252 return 67108864;
@@ -13844,8 +13255,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13844 13255
13845 public LSL_String llXorBase64StringsCorrect(string str1, string str2) 13256 public LSL_String llXorBase64StringsCorrect(string str1, string str2)
13846 { 13257 {
13847//// m_host.AddScriptLPS(1);
13848
13849 if (str1 == String.Empty) 13258 if (str1 == String.Empty)
13850 return String.Empty; 13259 return String.Empty;
13851 if (str2 == String.Empty) 13260 if (str2 == String.Empty)
@@ -13908,7 +13317,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
13908 13317
13909 public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) 13318 public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body)
13910 { 13319 {
13911//// m_host.AddScriptLPS(1);
13912 IHttpRequestModule httpScriptMod = m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>(); 13320 IHttpRequestModule httpScriptMod = m_ScriptEngine.World.RequestModuleInterface<IHttpRequestModule>();
13913 if(httpScriptMod == null) 13321 if(httpScriptMod == null)
13914 return ""; 13322 return "";
@@ -14103,15 +13511,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14103 // Partial implementation: support for parameter flags needed 13511 // Partial implementation: support for parameter flags needed
14104 // see http://wiki.secondlife.com/wiki/llHTTPResponse 13512 // see http://wiki.secondlife.com/wiki/llHTTPResponse
14105 13513
14106//// m_host.AddScriptLPS(1);
14107
14108 if (m_UrlModule != null) 13514 if (m_UrlModule != null)
14109 m_UrlModule.HttpResponse(new UUID(id), status,body); 13515 m_UrlModule.HttpResponse(new UUID(id), status,body);
14110 } 13516 }
14111 13517
14112 public void llResetLandBanList() 13518 public void llResetLandBanList()
14113 { 13519 {
14114//// m_host.AddScriptLPS(1);
14115 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; 13520 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData;
14116 if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0) 13521 if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0)
14117 { 13522 {
@@ -14124,12 +13529,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14124 foreach (LandAccessEntry entry in todelete) 13529 foreach (LandAccessEntry entry in todelete)
14125 land.ParcelAccessList.Remove(entry); 13530 land.ParcelAccessList.Remove(entry);
14126 } 13531 }
14127//// ScriptSleep(m_sleepMsOnResetLandBanList);
14128 } 13532 }
14129 13533
14130 public void llResetLandPassList() 13534 public void llResetLandPassList()
14131 { 13535 {
14132//// m_host.AddScriptLPS(1);
14133 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; 13536 LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData;
14134 if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0) 13537 if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0)
14135 { 13538 {
@@ -14142,13 +13545,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14142 foreach (LandAccessEntry entry in todelete) 13545 foreach (LandAccessEntry entry in todelete)
14143 land.ParcelAccessList.Remove(entry); 13546 land.ParcelAccessList.Remove(entry);
14144 } 13547 }
14145//// ScriptSleep(m_sleepMsOnResetLandPassList);
14146 } 13548 }
14147 13549
14148 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) 13550 public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide)
14149 { 13551 {
14150//// m_host.AddScriptLPS(1);
14151
14152 ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); 13552 ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
14153 13553
14154 if (lo == null) 13554 if (lo == null)
@@ -14189,7 +13589,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14189 13589
14190 public LSL_List llGetParcelPrimOwners(LSL_Vector pos) 13590 public LSL_List llGetParcelPrimOwners(LSL_Vector pos)
14191 { 13591 {
14192//// m_host.AddScriptLPS(1);
14193 LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); 13592 LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
14194 LSL_List ret = new LSL_List(); 13593 LSL_List ret = new LSL_List();
14195 if (land != null) 13594 if (land != null)
@@ -14200,13 +13599,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14200 ret.Add(new LSL_Integer(detectedParams.Value)); 13599 ret.Add(new LSL_Integer(detectedParams.Value));
14201 } 13600 }
14202 } 13601 }
14203//// ScriptSleep(m_sleepMsOnGetParcelPrimOwners);
14204 return ret; 13602 return ret;
14205 } 13603 }
14206 13604
14207 public LSL_Integer llGetObjectPrimCount(LSL_Key object_id) 13605 public LSL_Integer llGetObjectPrimCount(LSL_Key object_id)
14208 { 13606 {
14209//// m_host.AddScriptLPS(1);
14210 UUID id; 13607 UUID id;
14211 if(!UUID.TryParse(object_id, out id)) 13608 if(!UUID.TryParse(object_id, out id))
14212 return 0; 13609 return 0;
@@ -14220,8 +13617,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14220 13617
14221 public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide) 13618 public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide)
14222 { 13619 {
14223//// m_host.AddScriptLPS(1);
14224
14225 ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); 13620 ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y);
14226 13621
14227 if (lo == null) 13622 if (lo == null)
@@ -14235,7 +13630,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14235 13630
14236 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) 13631 public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param)
14237 { 13632 {
14238//// m_host.AddScriptLPS(1);
14239 LandData land = World.GetLandData(pos); 13633 LandData land = World.GetLandData(pos);
14240 if (land == null) 13634 if (land == null)
14241 { 13635 {
@@ -14277,7 +13671,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14277 13671
14278 public LSL_String llStringTrim(LSL_String src, LSL_Integer type) 13672 public LSL_String llStringTrim(LSL_String src, LSL_Integer type)
14279 { 13673 {
14280//// m_host.AddScriptLPS(1);
14281 if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return ((string)src).TrimStart(); } 13674 if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return ((string)src).TrimStart(); }
14282 if (type == (int)ScriptBaseClass.STRING_TRIM_TAIL) { return ((string)src).TrimEnd(); } 13675 if (type == (int)ScriptBaseClass.STRING_TRIM_TAIL) { return ((string)src).TrimEnd(); }
14283 if (type == (int)ScriptBaseClass.STRING_TRIM) { return ((string)src).Trim(); } 13676 if (type == (int)ScriptBaseClass.STRING_TRIM) { return ((string)src).Trim(); }
@@ -14286,7 +13679,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14286 13679
14287 public LSL_List llGetObjectDetails(LSL_Key id, LSL_List args) 13680 public LSL_List llGetObjectDetails(LSL_Key id, LSL_List args)
14288 { 13681 {
14289//// m_host.AddScriptLPS(1);
14290 LSL_List ret = new LSL_List(); 13682 LSL_List ret = new LSL_List();
14291 UUID key = new UUID(); 13683 UUID key = new UUID();
14292 if (!UUID.TryParse(id, out key)) 13684 if (!UUID.TryParse(id, out key))
@@ -14848,8 +14240,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14848 14240
14849 public LSL_Key llGetNumberOfNotecardLines(string name) 14241 public LSL_Key llGetNumberOfNotecardLines(string name)
14850 { 14242 {
14851//// m_host.AddScriptLPS(1);
14852
14853 UUID assetID = UUID.Zero; 14243 UUID assetID = UUID.Zero;
14854 14244
14855 if (!UUID.TryParse(name, out assetID)) 14245 if (!UUID.TryParse(name, out assetID))
@@ -14877,7 +14267,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14877 { 14267 {
14878 AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(assetID).ToString()); 14268 AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(assetID).ToString());
14879 14269
14880//// ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines);
14881 return tid.ToString(); 14270 return tid.ToString();
14882 } 14271 }
14883 14272
@@ -14893,14 +14282,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14893 AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(id).ToString()); 14282 AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(id).ToString());
14894 }); 14283 });
14895 14284
14896//// ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines);
14897 return tid.ToString(); 14285 return tid.ToString();
14898 } 14286 }
14899 14287
14900 public LSL_Key llGetNotecardLine(string name, int line) 14288 public LSL_Key llGetNotecardLine(string name, int line)
14901 { 14289 {
14902//// m_host.AddScriptLPS(1);
14903
14904 UUID assetID = UUID.Zero; 14290 UUID assetID = UUID.Zero;
14905 14291
14906 if (!UUID.TryParse(name, out assetID)) 14292 if (!UUID.TryParse(name, out assetID))
@@ -14929,7 +14315,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14929 AsyncCommands.DataserverPlugin.DataserverReply( 14315 AsyncCommands.DataserverPlugin.DataserverReply(
14930 reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); 14316 reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax));
14931 14317
14932//// ScriptSleep(m_sleepMsOnGetNotecardLine);
14933 return tid.ToString(); 14318 return tid.ToString();
14934 } 14319 }
14935 14320
@@ -14948,7 +14333,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
14948 reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); 14333 reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax));
14949 }); 14334 });
14950 14335
14951//// ScriptSleep(m_sleepMsOnGetNotecardLine);
14952 return tid.ToString(); 14336 return tid.ToString();
14953 } 14337 }
14954 14338
@@ -15421,8 +14805,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15421 14805
15422 LSL_List list = new LSL_List(); 14806 LSL_List list = new LSL_List();
15423 14807
15424//// m_host.AddScriptLPS(1);
15425
15426 Vector3 rayStart = start; 14808 Vector3 rayStart = start;
15427 Vector3 rayEnd = end; 14809 Vector3 rayEnd = end;
15428 Vector3 dir = rayEnd - rayStart; 14810 Vector3 dir = rayEnd - rayStart;
@@ -15643,7 +15025,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
15643 /// </summary> 15025 /// </summary>
15644 public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options) 15026 public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options)
15645 { 15027 {
15646//// m_host.AddScriptLPS(1);
15647 LSL_List result = new LSL_List(); 15028 LSL_List result = new LSL_List();
15648 15029
15649 // Prepare throttle data 15030 // Prepare throttle data
@@ -16495,7 +15876,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16495 15876
16496 public LSL_Integer llManageEstateAccess(int action, string avatar) 15877 public LSL_Integer llManageEstateAccess(int action, string avatar)
16497 { 15878 {
16498//// m_host.AddScriptLPS(1);
16499 EstateSettings estate = World.RegionInfo.EstateSettings; 15879 EstateSettings estate = World.RegionInfo.EstateSettings;
16500 bool isAccount = false; 15880 bool isAccount = false;
16501 bool isGroup = false; 15881 bool isGroup = false;
@@ -16564,35 +15944,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16564 15944
16565 public LSL_Integer llGetMemoryLimit() 15945 public LSL_Integer llGetMemoryLimit()
16566 { 15946 {
16567//// m_host.AddScriptLPS(1);
16568 // The value returned for Mono scripts in SL 15947 // The value returned for Mono scripts in SL
16569 return 65536; 15948 return 65536;
16570 } 15949 }
16571 15950
16572 public LSL_Integer llSetMemoryLimit(LSL_Integer limit) 15951 public LSL_Integer llSetMemoryLimit(LSL_Integer limit)
16573 { 15952 {
16574//// m_host.AddScriptLPS(1);
16575 // Treat as an LSO script 15953 // Treat as an LSO script
16576 return ScriptBaseClass.FALSE; 15954 return ScriptBaseClass.FALSE;
16577 } 15955 }
16578 15956
16579 public LSL_Integer llGetSPMaxMemory() 15957 public LSL_Integer llGetSPMaxMemory()
16580 { 15958 {
16581//// m_host.AddScriptLPS(1);
16582 // The value returned for Mono scripts in SL 15959 // The value returned for Mono scripts in SL
16583 return 65536; 15960 return 65536;
16584 } 15961 }
16585 15962
16586 public virtual LSL_Integer llGetUsedMemory() 15963 public virtual LSL_Integer llGetUsedMemory()
16587 { 15964 {
16588//// m_host.AddScriptLPS(1);
16589 // The value returned for Mono scripts in SL 15965 // The value returned for Mono scripts in SL
16590 return 65536; 15966 return 65536;
16591 } 15967 }
16592 15968
16593 public void llScriptProfiler(LSL_Integer flags) 15969 public void llScriptProfiler(LSL_Integer flags)
16594 { 15970 {
16595//// m_host.AddScriptLPS(1);
16596 // This does nothing for LSO scripts in SL 15971 // This does nothing for LSO scripts in SL
16597 } 15972 }
16598 15973
@@ -16604,23 +15979,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16604 15979
16605 public void llSetSoundQueueing(int queue) 15980 public void llSetSoundQueueing(int queue)
16606 { 15981 {
16607//// m_host.AddScriptLPS(1);
16608
16609 if (m_SoundModule != null) 15982 if (m_SoundModule != null)
16610 m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); 15983 m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value);
16611 } 15984 }
16612 15985
16613 public void llCollisionSprite(LSL_String impact_sprite) 15986 public void llCollisionSprite(LSL_String impact_sprite)
16614 { 15987 {
16615//// m_host.AddScriptLPS(1);
16616 // Viewer 2.0 broke this and it's likely LL has no intention 15988 // Viewer 2.0 broke this and it's likely LL has no intention
16617 // of fixing it. Therefore, letting this be a NOP seems appropriate. 15989 // of fixing it. Therefore, letting this be a NOP seems appropriate.
16618 } 15990 }
16619 15991
16620 public void llGodLikeRezObject(string inventory, LSL_Vector pos) 15992 public void llGodLikeRezObject(string inventory, LSL_Vector pos)
16621 { 15993 {
16622//// m_host.AddScriptLPS(1);
16623
16624 if (!World.Permissions.IsGod(m_host.OwnerID)) 15994 if (!World.Permissions.IsGod(m_host.OwnerID))
16625 NotImplemented("llGodLikeRezObject"); 15995 NotImplemented("llGodLikeRezObject");
16626 15996
@@ -16701,8 +16071,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
16701 return; 16071 return;
16702 } 16072 }
16703 16073
16704//// m_host.AddScriptLPS(1);
16705
16706 if (item.PermsGranter == UUID.Zero) 16074 if (item.PermsGranter == UUID.Zero)
16707 { 16075 {
16708 replydata = "MISSING_PERMISSION_DEBIT"; 16076 replydata = "MISSING_PERMISSION_DEBIT";