From f8502906ba427bdfbdeaf104b24d1ee3a0450b55 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 10 Sep 2020 08:56:55 +1000 Subject: Various script engine speed ups, and Oh Silly Threat clean ups. Don't bother doing useless threat level, sleep, and bogus stat collections, it only slows things down. https://sledjhamr.org/mantisbt/view.php?id=15 for an analysis of the bogus stat collection. --- .../Shared/Api/Implementation/LSL_Api.cs | 1005 +++++++++----------- .../Shared/Api/Implementation/LS_Api.cs | 6 +- .../Shared/Api/Implementation/OSSL_Api.cs | 398 ++++---- .../Region/ScriptEngine/YEngine/XMRInstBackend.cs | 16 +- bin/config-include/osslEnable.ini | 284 +++--- 5 files changed, 846 insertions(+), 863 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 10afe99..993fc6f 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -111,7 +111,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected bool throwErrorOnNotImplemented = false; protected AsyncCommandManager AsyncCommands = null; - protected float m_ScriptDelayFactor = 1.0f; protected float m_ScriptDistanceFactor = 1.0f; protected float m_MinTimerInterval = 0.5f; protected float m_recoilScaleFactor = 0.0f; @@ -130,64 +129,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api protected Dictionary m_userInfoCache = new Dictionary(); protected int EMAIL_PAUSE_TIME = 20; // documented delay value for smtp. - protected int m_sleepMsOnSetTexture = 200; - protected int m_sleepMsOnSetLinkTexture = 200; - protected int m_sleepMsOnScaleTexture = 200; - protected int m_sleepMsOnOffsetTexture = 200; - protected int m_sleepMsOnRotateTexture = 200; - protected int m_sleepMsOnSetPos = 200; - protected int m_sleepMsOnSetRot = 200; - protected int m_sleepMsOnSetLocalRot = 200; - protected int m_sleepMsOnPreloadSound = 1000; - protected int m_sleepMsOnMakeExplosion = 100; - protected int m_sleepMsOnMakeFountain = 100; - protected int m_sleepMsOnMakeSmoke = 100; - protected int m_sleepMsOnMakeFire = 100; - protected int m_sleepMsOnRezAtRoot = 100; - protected int m_sleepMsOnInstantMessage = 2000; - protected int m_sleepMsOnEmail = 20000; - protected int m_sleepMsOnCreateLink = 1000; - protected int m_sleepMsOnGiveInventory = 3000; - protected int m_sleepMsOnRequestAgentData = 100; - protected int m_sleepMsOnRequestInventoryData = 1000; - protected int m_sleepMsOnSetDamage = 5000; - protected int m_sleepMsOnTextBox = 1000; - protected int m_sleepMsOnAdjustSoundVolume = 100; - protected int m_sleepMsOnEjectFromLand = 1000; - protected int m_sleepMsOnAddToLandPassList = 100; - protected int m_sleepMsOnDialog = 1000; - protected int m_sleepMsOnRemoteLoadScript = 3000; - protected int m_sleepMsOnRemoteLoadScriptPin = 3000; - protected int m_sleepMsOnOpenRemoteDataChannel = 1000; - protected int m_sleepMsOnSendRemoteData = 3000; - protected int m_sleepMsOnRemoteDataReply = 3000; - protected int m_sleepMsOnCloseRemoteDataChannel = 1000; - protected int m_sleepMsOnSetPrimitiveParams = 200; - protected int m_sleepMsOnSetLinkPrimitiveParams = 200; - protected int m_sleepMsOnXorBase64Strings = 300; - protected int m_sleepMsOnSetParcelMusicURL = 2000; - protected int m_sleepMsOnGetPrimMediaParams = 1000; - protected int m_sleepMsOnGetLinkMedia = 1000; - protected int m_sleepMsOnSetPrimMediaParams = 1000; - protected int m_sleepMsOnSetLinkMedia = 1000; - protected int m_sleepMsOnClearPrimMedia = 1000; - protected int m_sleepMsOnClearLinkMedia = 1000; - protected int m_sleepMsOnRequestSimulatorData = 1000; - protected int m_sleepMsOnLoadURL = 10000; - protected int m_sleepMsOnParcelMediaCommandList = 2000; - protected int m_sleepMsOnParcelMediaQuery = 2000; - protected int m_sleepMsOnModPow = 1000; - protected int m_sleepMsOnSetPrimURL = 2000; - protected int m_sleepMsOnRefreshPrimURL = 20000; - protected int m_sleepMsOnMapDestination = 1000; - protected int m_sleepMsOnAddToLandBanList = 100; - protected int m_sleepMsOnRemoveFromLandPassList = 100; - protected int m_sleepMsOnRemoveFromLandBanList = 100; - protected int m_sleepMsOnResetLandBanList = 100; - protected int m_sleepMsOnResetLandPassList = 100; - protected int m_sleepMsOnGetParcelPrimOwners = 2000; - protected int m_sleepMsOnGetNumberOfNotecardLines = 100; - protected int m_sleepMsOnGetNotecardLine = 100; protected string m_internalObjectHost = "lsl.opensim.local"; protected bool m_restrictEmail = false; protected ISoundModule m_SoundModule = null; @@ -326,10 +267,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (seConfig != null) { - m_ScriptDelayFactor = - seConfig.GetFloat("ScriptDelayFactor", m_ScriptDelayFactor); - m_ScriptDistanceFactor = - seConfig.GetFloat("ScriptDistanceLimitFactor", m_ScriptDistanceFactor); m_MinTimerInterval = seConfig.GetFloat("MinTimerInterval", m_MinTimerInterval); m_automaticLinkPermission = @@ -414,7 +351,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_internalObjectHost = smtpConfig.GetString("internal_object_host", m_internalObjectHost); } } - m_sleepMsOnEmail = EMAIL_PAUSE_TIME * 1000; +//// m_sleepMsOnEmail = EMAIL_PAUSE_TIME * 1000; } public override Object InitializeLifetimeService() @@ -443,14 +380,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return p; } - protected virtual void ScriptSleep(int delay) - { - delay = (int)(delay * m_ScriptDelayFactor); - if (delay < 10) - return; - - Sleep(delay); - } +//// protected virtual void ScriptSleep(int delay) +//// { +//// delay = (int)(delay * m_ScriptDelayFactor); +//// if (delay < 10) +//// return; +//// +//// Sleep(delay); +//// } protected virtual void Sleep(int delay) { @@ -483,7 +420,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api [DebuggerNonUserCode] public void llResetScript() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // We need to tell the URL module, if we hav one, to release // the allocated URLs @@ -499,7 +436,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if ((item = GetScriptByName(name)) == UUID.Zero) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Error("llResetOtherScript", "Can't find script '" + name + "'"); return; } @@ -507,7 +444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api llResetScript(); else { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_ScriptEngine.ResetScript(item); } } @@ -516,7 +453,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID item; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if ((item = GetScriptByName(name)) != UUID.Zero) { @@ -535,7 +472,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID item; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // These functions are supposed to be robust, // so get the state one step at a time. @@ -779,44 +716,44 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //These are the implementations of the various ll-functions used by the LSL scripts. public LSL_Float llSin(double f) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)Math.Sin(f); } public LSL_Float llCos(double f) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return Math.Cos(f); } public LSL_Float llTan(double f) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return Math.Tan(f); } public LSL_Float llAtan2(LSL_Float x, LSL_Float y) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return Math.Atan2(x, y); } public LSL_Float llSqrt(double f) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return Math.Sqrt(f); } public LSL_Float llPow(double fbase, double fexponent) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)Math.Pow(fbase, fexponent); } public LSL_Integer llAbs(LSL_Integer i) { // changed to replicate LSL behaviour whereby minimum int value is returned untouched. - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (i == Int32.MinValue) return i; else @@ -825,13 +762,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llFabs(double f) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)Math.Abs(f); } public LSL_Float llFrand(double mag) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); lock (Util.RandomClass) { return Util.RandomClass.NextDouble() * mag; @@ -840,33 +777,33 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llFloor(double f) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (int)Math.Floor(f); } public LSL_Integer llCeil(double f) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (int)Math.Ceiling(f); } // Xantor 01/May/2008 fixed midpointrounding (2.5 becomes 3.0 instead of 2.0, default = ToEven) public LSL_Integer llRound(double f) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (int)Math.Round(f, MidpointRounding.AwayFromZero); } //This next group are vector operations involving squaring and square root. ckrinke public LSL_Float llVecMag(LSL_Vector v) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return LSL_Vector.Mag(v); } public LSL_Vector llVecNorm(LSL_Vector v) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return LSL_Vector.Norm(v); } @@ -880,7 +817,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return VecDist(a, b); } @@ -890,7 +827,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llRot2Euler(LSL_Rotation q1) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LSL_Vector eul = new LSL_Vector(); double sqw = q1.s*q1.s; @@ -964,7 +901,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llEuler2Rot(LSL_Vector v) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double x,y,z,s; v.x *= 0.5; @@ -991,7 +928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double s; double tr = fwd.x + left.y + up.z + 1.0; @@ -1046,7 +983,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llRot2Fwd(LSL_Rotation r) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double x, y, z, m; @@ -1071,7 +1008,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llRot2Left(LSL_Rotation r) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double x, y, z, m; @@ -1096,7 +1033,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llRot2Up(LSL_Rotation r) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double x, y, z, m; m = r.x * r.x + r.y * r.y + r.z * r.z + r.s * r.s; @@ -1121,7 +1058,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llRotBetween(LSL_Vector a, LSL_Vector b) { //A and B should both be normalized - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); /* This method is more accurate than the SL one, and thus causes problems for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. @@ -1194,7 +1131,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llWhisper(int channelID, string text) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (text.Length > 1023) text = text.Substring(0, 1023); @@ -1221,14 +1158,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSay(int channelID, string text) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (channelID == 0) // m_SayShoutCount++; CheckSayShoutTime(); - if (m_SayShoutCount >= 11) - ScriptSleep(2000); +//// if (m_SayShoutCount >= 11) +//// ScriptSleep(2000); if (m_scriptConsoleChannelEnabled && (channelID == m_scriptConsoleChannel)) { @@ -1250,14 +1187,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llShout(int channelID, string text) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (channelID == 0) // m_SayShoutCount++; CheckSayShoutTime(); - if (m_SayShoutCount >= 11) - ScriptSleep(2000); +//// if (m_SayShoutCount >= 11) +//// ScriptSleep(2000); if (text.Length > 1023) text = text.Substring(0, 1023); @@ -1281,7 +1218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (text.Length > 1023) text = text.Substring(0, 1023); - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // debug channel is also sent to avatars if (channelID == ScriptBaseClass.DEBUG_CHANNEL) @@ -1301,7 +1238,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (msg.Length > 1023) msg = msg.Substring(0, 1023); - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (channel == ScriptBaseClass.DEBUG_CHANNEL) return; @@ -1316,7 +1253,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llListen(int channelID, string name, string ID, string msg) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID keyID; UUID.TryParse(ID, out keyID); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); @@ -1328,7 +1265,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llListenControl(int number, int active) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); if (wComm != null) wComm.ListenControl(m_item.ItemID, number, active); @@ -1336,7 +1273,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llListenRemove(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); if (wComm != null) wComm.ListenRemove(m_item.ItemID, number); @@ -1344,7 +1281,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSensor(string name, string id, int type, double range, double arc) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID keyID = UUID.Zero; UUID.TryParse(id, out keyID); @@ -1353,7 +1290,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSensorRepeat(string name, string id, int type, double range, double arc, double rate) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID keyID = UUID.Zero; UUID.TryParse(id, out keyID); @@ -1362,7 +1299,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSensorRemove() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID); } @@ -1403,7 +1340,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llDetectedName(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return String.Empty; @@ -1412,7 +1349,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llDetectedKey(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return String.Empty; @@ -1421,7 +1358,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llDetectedOwner(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return String.Empty; @@ -1430,7 +1367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llDetectedType(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return 0; @@ -1439,7 +1376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llDetectedPos(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return new LSL_Vector(); @@ -1448,7 +1385,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llDetectedVel(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return new LSL_Vector(); @@ -1457,7 +1394,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llDetectedGrab(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (parms == null) return new LSL_Vector(0, 0, 0); @@ -1467,7 +1404,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llDetectedRot(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return new LSL_Rotation(); @@ -1476,7 +1413,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llDetectedGroup(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return new LSL_Integer(0); @@ -1487,7 +1424,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llDetectedLinkNumber(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (parms == null) return new LSL_Integer(0); @@ -1500,7 +1437,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchBinormal(int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Vector(); @@ -1512,7 +1449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Integer llDetectedTouchFace(int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Integer(-1); @@ -1524,7 +1461,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchNormal(int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Vector(); @@ -1536,7 +1473,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchPos(int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Vector(); @@ -1548,7 +1485,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchST(int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Vector(-1.0, -1.0, 0.0); @@ -1560,7 +1497,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchUV(int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Vector(-1.0, -1.0, 0.0); @@ -1570,13 +1507,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api [DebuggerNonUserCode] public virtual void llDie() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException(); } public LSL_Float llGround(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; //Get the slope normal. This gives us the equation of the plane tangent to the slope. @@ -1606,7 +1543,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llCloud(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); float cloudCover = 0f; ICloudModule module = World.RequestModuleInterface(); if (module != null) @@ -1623,7 +1560,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llWind(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LSL_Vector wind = new LSL_Vector(0, 0, 0); IWindModule module = World.RequestModuleInterface(); if (module != null) @@ -1644,7 +1581,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) return; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); int statusrotationaxis = 0; @@ -1761,7 +1698,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetStatus(int status) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); switch (status) { @@ -1830,7 +1767,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llScaleByFactor(double scaling_factor) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SceneObjectGroup group = m_host.ParentGroup; if(scaling_factor < 1e-6) @@ -1855,7 +1792,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetMaxScaleFactor() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SceneObjectGroup group = m_host.ParentGroup; if (group == null || group.IsDeleted || group.inTransit) @@ -1866,7 +1803,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetMinScaleFactor() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SceneObjectGroup group = m_host.ParentGroup; if (group == null || group.IsDeleted || group.inTransit) @@ -1877,7 +1814,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetScale(LSL_Vector scale) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetScale(m_host, scale); } @@ -1913,13 +1850,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetScale() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return new LSL_Vector(m_host.Scale.X, m_host.Scale.Y, m_host.Scale.Z); } public void llSetClickAction(int action) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ClickAction = (byte)action; m_host.ParentGroup.HasGroupChanged = true; m_host.ScheduleFullUpdate(); @@ -1928,7 +1865,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetColor(LSL_Vector color, int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetColor(m_host, color, face); } @@ -1943,7 +1880,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetContentType(LSL_Key reqid, LSL_Integer type) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_UrlModule == null) return; @@ -2165,7 +2102,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetAlpha(int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return GetAlpha(m_host, face); } @@ -2191,14 +2128,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetAlpha(double alpha, int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetAlpha(m_host, alpha, face); } public void llSetLinkAlpha(int linknumber, double alpha, int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); List parts = GetLinkParts(linknumber); if (parts.Count > 0) @@ -2336,7 +2273,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetColor(int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return GetColor(m_host, face); } @@ -2383,14 +2320,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetTexture(string texture, int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetTexture(m_host, texture, face); - ScriptSleep(m_sleepMsOnSetTexture); +//// ScriptSleep(m_sleepMsOnSetTexture); } public void llSetLinkTexture(int linknumber, string texture, int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); List parts = GetLinkParts(linknumber); if (parts.Count > 0) @@ -2402,7 +2339,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } finally { } } - ScriptSleep(m_sleepMsOnSetLinkTexture); +//// ScriptSleep(m_sleepMsOnSetLinkTexture); } protected void SetTextureParams(SceneObjectPart part, string texture, double scaleU, double ScaleV, @@ -2511,10 +2448,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llScaleTexture(double u, double v, int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ScaleTexture(m_host, u, v, face); - ScriptSleep(m_sleepMsOnScaleTexture); +//// ScriptSleep(m_sleepMsOnScaleTexture); } protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) @@ -2553,9 +2490,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llOffsetTexture(double u, double v, int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); OffsetTexture(m_host, u, v, face); - ScriptSleep(m_sleepMsOnOffsetTexture); +//// ScriptSleep(m_sleepMsOnOffsetTexture); } protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) @@ -2594,9 +2531,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRotateTexture(double rotation, int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); RotateTexture(m_host, rotation, face); - ScriptSleep(m_sleepMsOnRotateTexture); +//// ScriptSleep(m_sleepMsOnRotateTexture); } protected void RotateTexture(SceneObjectPart part, double rotation, int face) @@ -2632,7 +2569,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetTexture(int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return GetTexture(m_host, face); } @@ -2674,11 +2611,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPos(LSL_Vector pos) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetPos(m_host, pos, true); - ScriptSleep(m_sleepMsOnSetPos); +//// ScriptSleep(m_sleepMsOnSetPos); } /// @@ -2690,7 +2627,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// 1 if successful, 0 otherwise. public LSL_Integer llSetRegionPos(LSL_Vector pos) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // BEGIN WORKAROUND // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND. @@ -2805,19 +2742,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetPos() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.GetWorldPosition(); } public LSL_Vector llGetLocalPos() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return GetPartLocalPos(m_host); } protected LSL_Vector GetPartLocalPos(SceneObjectPart part) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Vector3 pos; @@ -2840,7 +2777,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetRot(LSL_Rotation rot) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // try to let this work as in SL... if (m_host.ParentID == 0 || (m_host.ParentGroup != null && m_host == m_host.ParentGroup.RootPart)) @@ -2858,14 +2795,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - ScriptSleep(m_sleepMsOnSetRot); +//// ScriptSleep(m_sleepMsOnSetRot); } public void llSetLocalRot(LSL_Rotation rot) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetRot(m_host, rot); - ScriptSleep(m_sleepMsOnSetLocalRot); +//// ScriptSleep(m_sleepMsOnSetLocalRot); } protected void SetRot(SceneObjectPart part, Quaternion rot) @@ -2925,7 +2862,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return llGetRootRotation(); } - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Quaternion q = m_host.GetWorldRotation(); if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0) @@ -2990,14 +2927,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private LSL_Rotation GetPartLocalRot(SceneObjectPart part) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Quaternion rot = part.RotationOffset; return new LSL_Rotation(rot.X, rot.Y, rot.Z, rot.W); } public void llSetForce(LSL_Vector force, int local) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -3012,7 +2949,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0); - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -3024,55 +2961,55 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetVelocity(LSL_Vector vel, int local) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.SetVelocity(new Vector3((float)vel.x, (float)vel.y, (float)vel.z), local != 0); } public void llSetAngularVelocity(LSL_Vector avel, int local) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.SetAngularVelocity(new Vector3((float)avel.x, (float)avel.y, (float)avel.z), local != 0); } public LSL_Integer llTarget(LSL_Vector position, double range) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.ParentGroup.registerTargetWaypoint(position, (float)range); } public void llTargetRemove(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ParentGroup.unregisterTargetWaypoint(number); } public LSL_Integer llRotTarget(LSL_Rotation rot, double error) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error); } public void llRotTargetRemove(int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ParentGroup.unregisterRotTargetWaypoint(number); } public void llMoveToTarget(LSL_Vector target, double tau) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ParentGroup.MoveToTarget(target, (float)tau); } public void llStopMoveToTarget() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ParentGroup.StopMoveToTarget(); } public void llApplyImpulse(LSL_Vector force, LSL_Integer local) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); //No energy force yet Vector3 v = force; if (v.Length() > 20000.0f) @@ -3086,26 +3023,26 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llApplyRotationalImpulse(LSL_Vector force, int local) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ParentGroup.RootPart.ApplyAngularImpulse(force, local != 0); } public void llSetTorque(LSL_Vector torque, int local) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ParentGroup.RootPart.SetAngularImpulse(torque, local != 0); } public LSL_Vector llGetTorque() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return new LSL_Vector(m_host.ParentGroup.GetTorque()); } public void llSetForceAndTorque(LSL_Vector force, LSL_Vector torque, int local) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); llSetForce(force, local); llSetTorque(torque, local); } @@ -3113,7 +3050,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetVel() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Vector3 vel = Vector3.Zero; @@ -3133,46 +3070,46 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetAccel() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return new LSL_Vector(m_host.Acceleration); } public LSL_Vector llGetOmega() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Vector3 avel = m_host.AngularVelocity; return new LSL_Vector(avel.X, avel.Y, avel.Z); } public LSL_Float llGetTimeOfDay() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); } public LSL_Float llGetWallclock() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return DateTime.Now.TimeOfDay.TotalSeconds; } public LSL_Float llGetTime() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double ScriptTime = Util.GetTimeStampMS() - m_timer; return (float)Math.Round((ScriptTime / 1000.0), 3); } public void llResetTime() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_timer = Util.GetTimeStampMS(); } public LSL_Float llGetAndResetTime() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double now = Util.GetTimeStampMS(); double ScriptTime = now - m_timer; m_timer = now; @@ -3181,7 +3118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSound(string sound, double volume, int queue, int loop) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llSound", "Use llPlaySound instead"); } @@ -3189,7 +3126,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // 20080530 Updated to remove code duplication public void llPlaySound(string sound, double volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -3204,7 +3141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoopSound(string sound, double volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -3218,7 +3155,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoopSoundMaster(string sound, double volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -3232,7 +3169,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoopSoundSlave(string sound, double volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -3246,7 +3183,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPlaySoundSlave(string sound, double volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -3261,7 +3198,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llTriggerSound(string sound, double volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -3276,7 +3213,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopSound() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule != null) m_SoundModule.StopSound(m_host.UUID); @@ -3284,7 +3221,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPreloadSound(string sound) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -3294,7 +3231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; m_SoundModule.PreloadSound(m_host.UUID, soundID); - ScriptSleep(m_sleepMsOnPreloadSound); +//// ScriptSleep(m_sleepMsOnPreloadSound); } /// @@ -3305,7 +3242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llGetSubString(string src, int start, int end) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Normalize indices (if negative). // After normlaization they may still be @@ -3399,7 +3336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llDeleteSubString(string src, int start, int end) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Normalize indices (if negative). // After normlaization they may still be @@ -3480,7 +3417,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llInsertString(string dest, int index, string src) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Normalize indices (if negative). // After normlaization they may still be @@ -3517,13 +3454,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llToUpper(string src) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return src.ToUpper(); } public LSL_String llToLower(string src) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return src.ToLower(); } @@ -3531,7 +3468,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { Util.FireAndForget(x => { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_item.PermsGranter == UUID.Zero) return; @@ -3569,30 +3506,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llMakeExplosion", "Use llParticleSystem instead"); - ScriptSleep(m_sleepMsOnMakeExplosion); +//// ScriptSleep(m_sleepMsOnMakeExplosion); } public void llMakeFountain(int particles, double scale, double vel, double lifetime, double arc, int bounce, string texture, LSL_Vector offset, double bounce_offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llMakeFountain", "Use llParticleSystem instead"); - ScriptSleep(m_sleepMsOnMakeFountain); +//// ScriptSleep(m_sleepMsOnMakeFountain); } public void llMakeSmoke(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llMakeSmoke", "Use llParticleSystem instead"); - ScriptSleep(m_sleepMsOnMakeSmoke); +//// ScriptSleep(m_sleepMsOnMakeSmoke); } public void llMakeFire(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llMakeFire", "Use llParticleSystem instead"); - ScriptSleep(m_sleepMsOnMakeFire); +//// ScriptSleep(m_sleepMsOnMakeFire); } public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) @@ -3602,7 +3539,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void doObjectRez(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param, bool atRoot) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (string.IsNullOrEmpty(inventory) || Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) return; @@ -3667,8 +3604,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } }, null, "LSL_Api.doObjectRez"); - //ScriptSleep((int)((groupmass * velmag) / 10)); - ScriptSleep(m_sleepMsOnRezAtRoot); +//// //ScriptSleep((int)((groupmass * velmag) / 10)); +//// ScriptSleep(m_sleepMsOnRezAtRoot); } public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) @@ -3678,7 +3615,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLookAt(LSL_Vector target, double strength, double damping) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Get the normalized vector to the target LSL_Vector from = llGetPos(); @@ -3726,7 +3663,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopLookAt() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.StopLookAt(); } @@ -3734,7 +3671,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (sec != 0.0 && sec < m_MinTimerInterval) sec = m_MinTimerInterval; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Setting timer repeat AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec); } @@ -3742,14 +3679,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public virtual void llSleep(double sec) { // m_log.Info("llSleep snoozing " + sec + "s."); - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Sleep((int)(sec * 1000)); } public LSL_Float llGetMass() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_host.ParentGroup.IsAttachment) { @@ -3785,7 +3722,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionFilter(LSL_String name, LSL_Key id, LSL_Integer accept) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.CollisionFilter.Clear(); UUID objectID; @@ -3813,12 +3750,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); } public void llReleaseControls() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_item.PermsGranter != UUID.Zero) { @@ -3839,7 +3776,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llReleaseURL(string url) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_UrlModule != null) m_UrlModule.ReleaseURL(url); } @@ -3887,7 +3824,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAttachToAvatar(LSL_Integer attachmentPoint) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_item.PermsGranter != m_host.OwnerID) return; @@ -3950,7 +3887,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llDetachFromAvatar() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_host.ParentGroup.AttachmentPoint == 0) return; @@ -3964,31 +3901,31 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llTakeCamera(string avatar) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llTakeCamera", "Use llSetCameraParams instead"); } public void llReleaseCamera(string avatar) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); } public LSL_Key llGetOwner() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.OwnerID.ToString(); } public void llInstantMessage(string user, string message) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID result; if (!UUID.TryParse(user, out result) || result == UUID.Zero) { Error("llInstantMessage","An invalid key was passed to llInstantMessage"); - ScriptSleep(2000); +//// ScriptSleep(2000); return; } @@ -4036,13 +3973,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); } - - ScriptSleep(m_sleepMsOnInstantMessage); +//// ScriptSleep(m_sleepMsOnInstantMessage); } public void llEmail(string address, string subject, string message) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface(); if (emailModule == null) { @@ -4075,12 +4011,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } emailModule.SendEmail(m_host.UUID, address, subject, message); - ScriptSleep(m_sleepMsOnEmail); +//// ScriptSleep(m_sleepMsOnEmail); } public void llGetNextEmail(string address, string subject) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface(); if (emailModule == null) { @@ -4108,19 +4044,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llGetKey() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.UUID.ToString(); } public LSL_Key llGenerateKey() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return UUID.Random().ToString(); } public void llSetBuoyancy(double buoyancy) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -4136,7 +4072,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// Number of seconds over which to reach target public void llSetHoverHeight(double height, int water, double tau) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); PIDHoverType hoverType = PIDHoverType.Ground; if (water != 0) @@ -4148,13 +4084,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopHover() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f); } public void llMinEventDelay(double delay) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); try { m_ScriptEngine.SetMinEventDelay(m_item.ItemID, delay); @@ -4168,13 +4104,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSoundPreload(string sound) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llSoundPreload", "Use llPreloadSound instead"); } public void llRotLookAt(LSL_Rotation target, double strength, double damping) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Per discussion with Melanie, for non-physical objects llLookAt appears to simply // set the rotation of the object, copy that behavior @@ -4194,7 +4130,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llStringLength(string str) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (str.Length > 0) { return str.Length; @@ -4207,7 +4143,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStartAnimation(string anim) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_item.PermsGranter == UUID.Zero) return; @@ -4230,7 +4166,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopAnimation(string anim) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_item.PermsGranter == UUID.Zero) return; @@ -4253,7 +4189,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStartObjectAnimation(string anim) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Do NOT try to parse UUID, animations cannot be triggered by ID UUID animID = ScriptUtils.GetAssetIdFromItemName(m_host, anim, (int)AssetType.Animation); @@ -4264,7 +4200,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopObjectAnimation(string anim) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID animID = ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, anim, AssetType.Animation); if (animID != UUID.Zero) m_host.RemoveAnimation(animID); @@ -4272,7 +4208,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetObjectAnimationNames() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LSL_List ret = new LSL_List(); if(m_host.AnimationsNames == null || m_host.AnimationsNames.Count == 0) @@ -4285,17 +4221,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPointAt(LSL_Vector pos) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); } public void llStopPointAt() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); } public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TargetOmega(m_host, axis, spinrate, gain); } @@ -4309,7 +4245,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetStartParameter() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_ScriptEngine.GetStartParameter(m_item.ItemID); } @@ -4338,7 +4274,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_item.PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) llReleaseControls(); - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); int implicitPerms = 0; @@ -4466,14 +4402,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llGetPermissionsKey() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_item.PermsGranter.ToString(); } public LSL_Integer llGetPermissions() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); int perms = m_item.PermsMask; @@ -4485,7 +4421,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetLinkNumber() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_host.ParentGroup.PrimCount > 1) { @@ -4513,7 +4449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCreateLink(LSL_Key target, LSL_Integer parent) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID targetID; @@ -4578,12 +4514,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (client != null) parentPrim.SendPropertiesToClient(client); - ScriptSleep(m_sleepMsOnCreateLink); +//// ScriptSleep(m_sleepMsOnCreateLink); } public void llBreakLink(int linknum) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 && !m_automaticLinkPermission) @@ -4684,7 +4620,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llBreakAllLinks() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = m_item; @@ -4717,7 +4653,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llGetLinkKey(int linknum) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); if (part != null) { @@ -4783,7 +4719,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llGetLinkName(int linknum) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ISceneEntity entity = GetLinkEntity(m_host, linknum); @@ -4795,7 +4731,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetInventoryNumber(int type) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); int count = 0; m_host.TaskInventory.LockItemsForRead(true); @@ -4813,7 +4749,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetInventoryName(int type, int number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ArrayList keys = new ArrayList(); m_host.TaskInventory.LockItemsForRead(true); @@ -4840,14 +4776,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetEnergy() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // TODO: figure out real energy value return 1.0f; } public void llGiveInventory(LSL_Key destination, LSL_String inventory) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID destId = UUID.Zero; @@ -4931,15 +4867,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); } - //This delay should only occur when giving inventory to avatars. - ScriptSleep(m_sleepMsOnGiveInventory); +//// //This delay should only occur when giving inventory to avatars. +//// ScriptSleep(m_sleepMsOnGiveInventory); } } [DebuggerNonUserCode] public void llRemoveInventory(string name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); @@ -4954,7 +4890,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetText(string text, LSL_Vector color, double alpha) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Vector3 av3 = Util.Clip(color, 0.0f, 1.0f); byte[] data; data = Util.StringToBytes256(text); @@ -4964,13 +4900,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llWater(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return World.RegionInfo.RegionSettings.WaterHeight; } public void llPassTouches(int pass) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (pass != 0) m_host.PassTouches = true; else @@ -4979,7 +4915,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llRequestAgentData(string id, int data) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID uuid; if (UUID.TryParse(id, out uuid)) @@ -5085,7 +5021,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands. DataserverPlugin.DataserverReply(rq.ToString(), reply); - ScriptSleep(m_sleepMsOnRequestAgentData); +//// ScriptSleep(m_sleepMsOnRequestAgentData); return tid.ToString(); } else @@ -5097,7 +5033,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llRequestInventoryData(string name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems()) { @@ -5124,24 +5060,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api reply); }); - ScriptSleep(m_sleepMsOnRequestInventoryData); +//// ScriptSleep(m_sleepMsOnRequestInventoryData); return tid.ToString(); } } - ScriptSleep(m_sleepMsOnRequestInventoryData); +//// ScriptSleep(m_sleepMsOnRequestInventoryData); return String.Empty; } public void llSetDamage(double damage) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ParentGroup.Damage = (float)damage; } public void llTeleportAgentHome(string agent) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID agentId = new UUID(); if (UUID.TryParse(agent, out agentId)) { @@ -5169,12 +5105,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - ScriptSleep(m_sleepMsOnSetDamage); +//// ScriptSleep(m_sleepMsOnSetDamage); } public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID agentId = new UUID(); if (UUID.TryParse(agent, out agentId)) @@ -5217,7 +5153,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llTeleportAgentGlobalCoords(string agent, LSL_Vector global_coords, LSL_Vector targetPos, LSL_Vector targetLookAt) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID agentId = new UUID(); ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y); @@ -5282,7 +5218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (dm == null) return; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID av = new UUID(); if (!UUID.TryParse(agent,out av)) { @@ -5301,13 +5237,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else { dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); - ScriptSleep(m_sleepMsOnTextBox); +//// ScriptSleep(m_sleepMsOnTextBox); } } public void llModifyLand(int action, int brush) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface(); if (tm != null) { @@ -5317,7 +5253,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionSound(LSL_String impact_sound, LSL_Float impact_volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if(impact_sound == "") { @@ -5345,7 +5281,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetAnimation(LSL_Key id) { // This should only return a value if the avatar is in the same region - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID avatar; if(!UUID.TryParse(id, out avatar)) return ""; @@ -5375,7 +5311,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llMessageLinked(int linknumber, int num, string msg, string id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); List parts = GetLinkParts(linknumber); @@ -5406,7 +5342,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); bool pushrestricted = World.RegionInfo.RegionSettings.RestrictPushing; bool pushAllowed = false; @@ -5573,7 +5509,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPassCollisions(int pass) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (pass == 0) { m_host.PassCollisions = false; @@ -5586,14 +5522,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetScriptName() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_item.Name != null ? m_item.Name : String.Empty; } public LSL_Integer llGetLinkNumberOfSides(int link) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SceneObjectPart linkedPart; @@ -5609,7 +5545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetNumberOfSides() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.GetNumberOfSides(); } @@ -5648,7 +5584,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // q = cos(a/2) + i (x * sin(a/2)) + j (y * sin(a/2)) + k (z * sin(a/2)) public LSL_Rotation llAxisAngle2Rot(LSL_Vector axis, double angle) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double x, y, z, s, t; @@ -5669,7 +5605,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llRot2Axis(LSL_Rotation rot) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); rot.Normalize(); @@ -5687,7 +5623,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Returns the angle of a quaternion (see llRot2Axis for the axis) public LSL_Float llRot2Angle(LSL_Rotation rot) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); rot.Normalize(); @@ -5700,20 +5636,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llAcos(LSL_Float val) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)Math.Acos(val); } public LSL_Float llAsin(LSL_Float val) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)Math.Asin(val); } // jcochran 5/jan/2012 public LSL_Float llAngleBetween(LSL_Rotation a, LSL_Rotation b) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); double aa = (a.x * a.x + a.y * a.y + a.z * a.z + a.s * a.s); double bb = (b.x * b.x + b.y * b.y + b.z * b.z + b.s * b.s); @@ -5727,7 +5663,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llGetInventoryKey(string name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); @@ -5746,7 +5682,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAllowInventoryDrop(LSL_Integer add) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (add != 0) m_host.ParentGroup.RootPart.AllowedDrop = true; @@ -5759,7 +5695,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetSunDirection() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Vector3 sun = World.RegionInfo.RegionSettings.SunVector; return new LSL_Vector(sun); @@ -5767,7 +5703,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetTextureOffset(int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return GetTextureOffset(m_host, face); } @@ -5794,7 +5730,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetTextureScale(int side) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Primitive.TextureEntry tex = m_host.Shape.Textures; LSL_Vector scale; if (side == -1) @@ -5809,7 +5745,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetTextureRot(int face) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return GetTextureRot(m_host, face); } @@ -5832,7 +5768,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llSubStringIndex(string source, string pattern) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (string.IsNullOrEmpty(source)) return -1; if (string.IsNullOrEmpty(pattern)) @@ -5842,7 +5778,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llGetOwnerKey(string id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key = new UUID(); if (UUID.TryParse(id, out key)) { @@ -5867,14 +5803,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetCenterOfMass() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return new LSL_Vector(m_host.GetCenterOfMass()); } public LSL_List llListSort(LSL_List src, int stride, int ascending) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (stride <= 0) { @@ -5885,14 +5821,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetListLength(LSL_List src) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return src.Length; } public LSL_Integer llList2Integer(LSL_List src, int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5922,7 +5858,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llList2Float(LSL_List src, int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5977,7 +5913,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llList2String(LSL_List src, int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5989,7 +5925,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llList2Key(LSL_List src, int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -6017,7 +5953,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llList2Vector(LSL_List src, int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -6046,7 +5982,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llList2Rot(LSL_List src, int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -6073,7 +6009,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llList2List(LSL_List src, int start, int end) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return src.GetSublist(start, end); } @@ -6084,7 +6020,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetListEntryType(LSL_List src, int index) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (index < 0) { index = src.Length + index; @@ -6128,7 +6064,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llList2CSV(LSL_List src) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return string.Join(", ", (new List(src.Data)).ConvertAll(o => @@ -6153,7 +6089,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int start = 0; int length = 0; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); for (int i = 0; i < src.Length; i++) { @@ -6210,7 +6146,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int chunkk; int[] chunks; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (stride <= 0) { @@ -6282,7 +6218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int[] ei = new int[2]; bool twopass = false; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // First step is always to deal with negative indices @@ -6363,7 +6299,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetRegionAgentCount() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); int count = 0; World.ForEachRootScenePresence(delegate(ScenePresence sp) { @@ -6375,13 +6311,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetRegionCorner() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); } public LSL_String llGetEnv(LSL_String name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); switch(name) { case "agent_limit": @@ -6454,7 +6390,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_List pref; LSL_List suff; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (index < 0) { @@ -6508,7 +6444,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int index = -1; int length = src.Length - test.Length + 1; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // If either list is empty, do not match if (src.Length != 0 && test.Length != 0) @@ -6553,19 +6489,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetObjectName() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.Name !=null ? m_host.Name : String.Empty; } public void llSetObjectName(string name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.Name = name != null ? name : String.Empty; } public LSL_String llGetDate() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DateTime date = DateTime.Now.ToUniversalTime(); string result = date.ToString("yyyy-MM-dd"); return result; @@ -6573,7 +6509,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if(dir.x == 0 && dir.y == 0) return 1; // SL wiki @@ -6640,7 +6576,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Integer llGetAgentInfo(LSL_Key id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key = new UUID(); if (!UUID.TryParse(id, out key)) @@ -6748,7 +6684,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetAgentLanguage(LSL_Key id) { // This should only return a value if the avatar is in the same region, but eh. idc. - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (World.AgentPreferencesService == null) { Error("llGetAgentLanguage", "No AgentPreferencesService present"); @@ -6775,7 +6711,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // do our bit masks part bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0; @@ -6858,20 +6794,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAdjustSoundVolume(LSL_Float volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.AdjustSoundGain(volume); - ScriptSleep(m_sleepMsOnAdjustSoundVolume); +//// ScriptSleep(m_sleepMsOnAdjustSoundVolume); } public void llSetSoundRadius(double radius) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.SoundRadius = radius; } public LSL_String llKey2Name(LSL_Key id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key = new UUID(); if (UUID.TryParse(id,out key)) { @@ -6893,7 +6829,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llName2Key(LSL_String name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); foreach (ScenePresence sp in World.GetScenePresences()) { @@ -6913,14 +6849,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetTextureAnim(int mode, int face, int sizex, int sizey, double start, double length, double rate) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetTextureAnim(m_host, mode, face, sizex, sizey, start, length, rate); } public void llSetLinkTextureAnim(int linknumber, int mode, int face, int sizex, int sizey, double start, double length, double rate) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); List parts = GetLinkParts(linknumber); @@ -6961,7 +6897,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llTriggerSoundLimited(string sound, double volume, LSL_Vector top_north_east, LSL_Vector bottom_south_west) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule != null) { m_SoundModule.TriggerSoundLimited(m_host.UUID, @@ -6972,7 +6908,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llEjectFromLand(LSL_Key pest) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID agentID = new UUID(); if (UUID.TryParse(pest, out agentID)) { @@ -6992,7 +6928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnEjectFromLand); +//// ScriptSleep(m_sleepMsOnEjectFromLand); } public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) @@ -7002,7 +6938,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llOverMyLand(string id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key = new UUID(); if (UUID.TryParse(id, out key)) { @@ -7031,7 +6967,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llGetLandOwnerAt(LSL_Vector pos) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); if (land == null) return UUID.Zero.ToString(); @@ -7045,7 +6981,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llGetAgentSize(LSL_Key id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID avID; if(!UUID.TryParse(id, out avID)) return ScriptBaseClass.ZERO_VECTOR; @@ -7061,7 +6997,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llSameGroup(string id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID uuid = new UUID(); if (!UUID.TryParse(id, out uuid)) return new LSL_Integer(0); @@ -7109,7 +7045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llUnSit(string id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key = new UUID(); if (UUID.TryParse(id, out key)) @@ -7150,7 +7086,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGroundSlope(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); //Get the slope normal. This gives us the equation of the plane tangent to the slope. LSL_Vector vsn = llGroundNormal(offset); @@ -7171,7 +7107,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGroundNormal(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; // Clamp to valid position if (pos.X < 0) @@ -7221,20 +7157,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGroundContour(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LSL_Vector x = llGroundSlope(offset); return new LSL_Vector(-x.y, x.x, 0.0); } public LSL_Integer llGetAttached() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.ParentGroup.AttachmentPoint; } public LSL_List llGetAttachedList(LSL_Key id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID avID; if(!UUID.TryParse(id, out avID)) @@ -7264,14 +7200,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public virtual LSL_Integer llGetFreeMemory() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Make scripts designed for Mono happy return 65536; } public LSL_Integer llGetFreeURLs() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_UrlModule != null) return new LSL_Integer(m_UrlModule.GetFreeUrls()); return new LSL_Integer(0); @@ -7280,13 +7216,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetRegionName() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return World.RegionInfo.RegionName; } public LSL_Float llGetRegionTimeDilation() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)World.TimeDilation; } @@ -7295,7 +7231,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Float llGetRegionFPS() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return World.StatsReporter.LastReportedSimFPS; } @@ -7373,7 +7309,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLinkParticleSystem(int linknumber, LSL_List rules) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); List parts = GetLinkParts(linknumber); @@ -7385,7 +7321,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llParticleSystem(LSL_List rules) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetParticleSystem(m_host, rules, "llParticleSystem"); } @@ -7802,7 +7738,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llGroundRepel(double height, int water, double tau) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_host.PhysActor != null) { float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0)); @@ -7827,7 +7763,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llGiveInventoryList(LSL_Key destination, LSL_String category, LSL_List inventory) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID destID; if (!UUID.TryParse(destination, out destID)) @@ -7882,7 +7818,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetVehicleType(int type) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -7894,7 +7830,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //CFK 9/28: so these are not complete yet. public void llSetVehicleFloatParam(int param, LSL_Float value) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -7906,7 +7842,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //CFK 9/28: so these are not complete yet. public void llSetVehicleVectorParam(int param, LSL_Vector vec) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -7918,7 +7854,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api //CFK 9/28: so these are not complete yet. public void llSetVehicleRotationParam(int param, LSL_Rotation rot) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -7928,7 +7864,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetVehicleFlags(int flags) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -7938,7 +7874,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoveVehicleFlags(int flags) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) { @@ -7959,13 +7895,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SitTarget(m_host, offset, rot); } public void llLinkSitTarget(LSL_Integer link, LSL_Vector offset, LSL_Rotation rot) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (link == ScriptBaseClass.LINK_ROOT) SitTarget(m_host.ParentGroup.RootPart, offset, rot); else if (link == ScriptBaseClass.LINK_THIS) @@ -7982,14 +7918,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llAvatarOnSitTarget() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.SitTargetAvatar.ToString(); } // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget public LSL_Key llAvatarOnLinkSitTarget(LSL_Integer linknum) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if(linknum == ScriptBaseClass.LINK_SET || linknum == ScriptBaseClass.LINK_ALL_CHILDREN || linknum == ScriptBaseClass.LINK_ALL_OTHERS || @@ -8005,7 +7941,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAddToLandPassList(LSL_Key avatar, LSL_Float hours) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key; ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); @@ -8042,12 +7978,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); } } - ScriptSleep(m_sleepMsOnAddToLandPassList); +//// ScriptSleep(m_sleepMsOnAddToLandPassList); } public void llSetTouchText(string text) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if(text.Length <= 9) m_host.TouchName = text; else @@ -8056,7 +7992,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetSitText(string text) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (text.Length <= 9) m_host.SitName = text; else @@ -8065,7 +8001,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetCameraEyeOffset(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.SetCameraEyeOffset(offset); if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) @@ -8074,7 +8010,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetCameraAtOffset(LSL_Vector offset) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.SetCameraAtOffset(offset); if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) @@ -8083,7 +8019,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (link == ScriptBaseClass.LINK_SET || link == ScriptBaseClass.LINK_ALL_CHILDREN || @@ -8113,7 +8049,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llDumpList2String(LSL_List src, string seperator) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (src.Length == 0) { return String.Empty; @@ -8129,7 +8065,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llScriptDanger(LSL_Vector pos) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); bool result = World.LSLScriptDanger(m_host, pos); if (result) { @@ -8148,7 +8084,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (dm == null) return; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID av = new UUID(); if (!UUID.TryParse(avatar,out av)) { @@ -8196,12 +8132,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); - ScriptSleep(m_sleepMsOnDialog); +//// ScriptSleep(m_sleepMsOnDialog); } public void llVolumeDetect(int detect) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsDeleted) m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0); @@ -8209,20 +8145,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoteLoadScript(string target, string name, int running, int start_param) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); - ScriptSleep(m_sleepMsOnRemoteLoadScript); +//// ScriptSleep(m_sleepMsOnRemoteLoadScript); } public void llSetRemoteScriptAccessPin(int pin) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.ScriptAccessPin = pin; } public void llRemoteLoadScriptPin(string target, string name, int pin, int running, int start_param) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID destId = UUID.Zero; @@ -8260,13 +8196,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_host.Inventory.RemoveInventoryItem(item.ItemID); } } - // this will cause the delay even if the script pin or permissions were wrong - seems ok - ScriptSleep(m_sleepMsOnRemoteLoadScriptPin); +//// // this will cause the delay even if the script pin or permissions were wrong - seems ok +//// ScriptSleep(m_sleepMsOnRemoteLoadScriptPin); } public void llOpenRemoteDataChannel() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) { @@ -8292,14 +8228,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams("remote_data", resobj, new DetectParams[0])); } - ScriptSleep(m_sleepMsOnOpenRemoteDataChannel); +//// ScriptSleep(m_sleepMsOnOpenRemoteDataChannel); } public LSL_Key llSendRemoteData(string channel, string dest, int idata, string sdata) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); - ScriptSleep(m_sleepMsOnSendRemoteData); +//// ScriptSleep(m_sleepMsOnSendRemoteData); if (xmlrpcMod == null) return ""; return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); @@ -8307,16 +8243,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); if (xmlrpcMod != null) xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); - ScriptSleep(m_sleepMsOnRemoteDataReply); +//// ScriptSleep(m_sleepMsOnRemoteDataReply); } public void llCloseRemoteDataChannel(string channel) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface(); if (xmlRpcRouter != null) @@ -8327,18 +8263,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); if (xmlrpcMod != null) xmlrpcMod.CloseXMLRPCChannel((UUID)channel); - ScriptSleep(m_sleepMsOnCloseRemoteDataChannel); +//// ScriptSleep(m_sleepMsOnCloseRemoteDataChannel); } public LSL_String llMD5String(string src, int nonce) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return Util.Md5Hash(String.Format("{0}:{1}", src, nonce.ToString()), Encoding.UTF8); } public LSL_String llSHA1String(string src) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return Util.SHA1Hash(src, Encoding.UTF8).ToLower(); } @@ -8774,25 +8710,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPrimitiveParams(LSL_List rules) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); - ScriptSleep(m_sleepMsOnSetPrimitiveParams); +//// ScriptSleep(m_sleepMsOnSetPrimitiveParams); } public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); - - ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); +//// ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); } public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); } @@ -10923,7 +10858,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llStringToBase64(string str) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); try { byte[] encData_byte; @@ -10940,7 +10875,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llBase64ToString(string str) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); try { byte[] b = Convert.FromBase64String(str); @@ -10959,8 +10894,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - ScriptSleep(300); - m_host.AddScriptLPS(1); +//// ScriptSleep(300); +//// m_host.AddScriptLPS(1); if (str1 == String.Empty) return String.Empty; @@ -11057,25 +10992,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoteDataSetRegion() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead"); } public LSL_Float llLog10(double val) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)Math.Log10(val); } public LSL_Float llLog(double val) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (double)Math.Log(val); } public LSL_List llGetAnimationList(LSL_Key id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID avID; if(!UUID.TryParse(id, out avID)) @@ -11095,7 +11030,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetParcelMusicURL(string url) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); @@ -11103,13 +11038,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; land.SetMusicUrl(url); - - ScriptSleep(m_sleepMsOnSetParcelMusicURL); +//// ScriptSleep(m_sleepMsOnSetParcelMusicURL); } public LSL_String llGetParcelMusicURL() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); @@ -11121,7 +11055,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetRootPosition() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return new LSL_Vector(m_host.ParentGroup.AbsolutePosition); } @@ -11137,7 +11071,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Rotation llGetRootRotation() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Quaternion q; if (m_host.ParentGroup.AttachmentPoint != 0) { @@ -11163,25 +11097,25 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetObjectDesc(string desc) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.Description = desc!=null?desc:String.Empty; } public LSL_Key llGetCreator() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.CreatorID.ToString(); } public LSL_String llGetTimestamp() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); } public LSL_Integer llGetNumberOfPrims() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); } @@ -11199,7 +11133,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_List llGetBoundingBox(string obj) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID objID = UUID.Zero; LSL_List result = new LSL_List(); @@ -11348,7 +11282,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetPrimitiveParams(LSL_List rules) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LSL_List result = new LSL_List(); @@ -11370,7 +11304,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // acording to SL wiki this must indicate a single link number or link_root or link_this. // keep other options as before @@ -11997,15 +11931,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetPrimMediaParams(int face, LSL_List rules) { - m_host.AddScriptLPS(1); - ScriptSleep(m_sleepMsOnGetPrimMediaParams); +//// m_host.AddScriptLPS(1); +//// ScriptSleep(m_sleepMsOnGetPrimMediaParams); return GetPrimMediaParams(m_host, face, rules); } public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) { - m_host.AddScriptLPS(1); - ScriptSleep(m_sleepMsOnGetLinkMedia); +//// m_host.AddScriptLPS(1); +//// ScriptSleep(m_sleepMsOnGetLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); else if (link == ScriptBaseClass.LINK_THIS) @@ -12124,15 +12058,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) { - m_host.AddScriptLPS(1); - ScriptSleep(m_sleepMsOnSetPrimMediaParams); +//// m_host.AddScriptLPS(1); +//// ScriptSleep(m_sleepMsOnSetPrimMediaParams); return SetPrimMediaParams(m_host, face, rules); } public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) { - m_host.AddScriptLPS(1); - ScriptSleep(m_sleepMsOnSetLinkMedia); +//// m_host.AddScriptLPS(1); +//// ScriptSleep(m_sleepMsOnSetLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); else if (link == ScriptBaseClass.LINK_THIS) @@ -12250,15 +12184,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llClearPrimMedia(LSL_Integer face) { - m_host.AddScriptLPS(1); - ScriptSleep(m_sleepMsOnClearPrimMedia); +//// m_host.AddScriptLPS(1); +//// ScriptSleep(m_sleepMsOnClearPrimMedia); return ClearPrimMedia(m_host, face); } public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) { - m_host.AddScriptLPS(1); - ScriptSleep(m_sleepMsOnClearLinkMedia); +//// m_host.AddScriptLPS(1); +//// ScriptSleep(m_sleepMsOnClearLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return ClearPrimMedia(m_host.ParentGroup.RootPart, face); else if (link == ScriptBaseClass.LINK_THIS) @@ -12423,7 +12357,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api char[] imdt = new char[8]; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Manually unroll the loop @@ -12485,7 +12419,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int number = 0; int digit; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Require a well-fromed base64 string @@ -12542,13 +12476,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetGMTclock() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return DateTime.UtcNow.TimeOfDay.TotalSeconds; } public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_UrlModule != null) return m_UrlModule.GetHttpHeader(new UUID(request_id), header); @@ -12558,7 +12492,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetSimulatorHostname() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IUrlModule UrlModule = World.RequestModuleInterface(); return UrlModule.ExternalHostNameForLSL; } @@ -12632,7 +12566,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int i, j; string d; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); /* * Convert separator and spacer lists to C# strings. @@ -12729,7 +12663,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetObjectPermMask(int mask) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); int permmask = 0; @@ -12763,7 +12697,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetObjectPermMask(int mask, int value) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) { @@ -12799,7 +12733,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetInventoryPermMask(string itemName, int mask) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); @@ -12825,7 +12759,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetInventoryPermMask(string itemName, int mask, int value) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) { @@ -12860,7 +12794,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llGetInventoryCreator(string itemName) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); @@ -12876,7 +12810,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llOwnerSay(string msg) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); @@ -12886,7 +12820,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llRequestSecureURL() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_UrlModule != null) return m_UrlModule.RequestSecureURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); return UUID.Zero.ToString(); @@ -12896,7 +12830,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { try { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); string reply = String.Empty; @@ -12912,7 +12846,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case ScriptBaseClass.DATA_SIM_POS: if (info == null) { - ScriptSleep(m_sleepMsOnRequestSimulatorData); +//// ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); } @@ -12959,7 +12893,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case ScriptBaseClass.DATA_SIM_RATING: if (info == null) { - ScriptSleep(m_sleepMsOnRequestSimulatorData); +//// ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); } int access = info.Maturity; @@ -12976,7 +12910,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api reply = "OpenSim"; break; default: - ScriptSleep(m_sleepMsOnRequestSimulatorData); +//// ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); // Raise no event } UUID rq = UUID.Random(); @@ -12987,7 +12921,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands. DataserverPlugin.DataserverReply(rq.ToString(), reply); - ScriptSleep(m_sleepMsOnRequestSimulatorData); +//// ScriptSleep(m_sleepMsOnRequestSimulatorData); return tid.ToString(); } catch(Exception) @@ -12999,7 +12933,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llRequestURL() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_UrlModule != null) return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); @@ -13008,13 +12942,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llForceMouselook(int mouselook) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); m_host.SetForceMouselook(mouselook != 0); } public LSL_Float llGetObjectMass(LSL_Key id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key = new UUID(); if (!UUID.TryParse(id, out key)) return 0; @@ -13059,7 +12993,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { LSL_List pref; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Note that although we have normalized, both // indices could still be negative. @@ -13130,14 +13064,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoadURL(string avatar_id, string message, string url) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IDialogModule dm = World.RequestModuleInterface(); if (null != dm) dm.SendUrlToUser( new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url); - - ScriptSleep(m_sleepMsOnLoadURL); +//// ScriptSleep(m_sleepMsOnLoadURL); } public void llParcelMediaCommandList(LSL_List commandList) @@ -13145,7 +13078,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // TODO: Not implemented yet (missing in libomv?): // 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) - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // according to the docs, this command only works if script owner and land owner are the same // lets add estate owners and gods, too, and use the generic permission check. @@ -13395,12 +13328,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api commandToSend.Value, time); } } - ScriptSleep(m_sleepMsOnParcelMediaCommandList); +//// ScriptSleep(m_sleepMsOnParcelMediaCommandList); } public LSL_List llParcelMediaQuery(LSL_List aList) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LSL_List list = new LSL_List(); Vector3 pos = m_host.AbsolutePosition; @@ -13447,22 +13380,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnParcelMediaQuery); +//// ScriptSleep(m_sleepMsOnParcelMediaQuery); return list; } public LSL_Integer llModPow(int a, int b, int c) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Int64 tmp = 0; Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); - ScriptSleep(m_sleepMsOnModPow); +//// ScriptSleep(m_sleepMsOnModPow); return Convert.ToInt32(tmp); } public LSL_Integer llGetInventoryType(string name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); @@ -13474,7 +13407,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPayPrice(int price, LSL_List quick_pay_buttons) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (quick_pay_buttons.Data.Length < 4) { @@ -13496,7 +13429,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetCameraPos() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_item.PermsGranter == UUID.Zero) return Vector3.Zero; @@ -13520,7 +13453,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llGetCameraRot() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_item.PermsGranter == UUID.Zero) return Quaternion.Identity; @@ -13543,21 +13476,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPrimURL(string url) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); - ScriptSleep(m_sleepMsOnSetPrimURL); +//// ScriptSleep(m_sleepMsOnSetPrimURL); } public void llRefreshPrimURL() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Deprecated("llRefreshPrimURL"); - ScriptSleep(m_sleepMsOnRefreshPrimURL); +//// ScriptSleep(m_sleepMsOnRefreshPrimURL); } public LSL_String llEscapeURL(string url) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); try { return Uri.EscapeDataString(url); @@ -13570,7 +13503,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llUnescapeURL(string url) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); try { return Uri.UnescapeDataString(url); @@ -13583,7 +13516,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); if (detectedParams == null) { @@ -13604,12 +13537,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name, simname, pos, lookAt); } - ScriptSleep(m_sleepMsOnMapDestination); +//// ScriptSleep(m_sleepMsOnMapDestination); } public void llAddToLandBanList(LSL_Key avatar, LSL_Float hours) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key; ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) @@ -13645,12 +13578,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); } } - ScriptSleep(m_sleepMsOnAddToLandBanList); +//// ScriptSleep(m_sleepMsOnAddToLandBanList); } public void llRemoveFromLandPassList(string avatar) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key; ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManagePasses, false)) @@ -13672,12 +13605,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnRemoveFromLandPassList); +//// ScriptSleep(m_sleepMsOnRemoveFromLandPassList); } public void llRemoveFromLandBanList(string avatar) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID key; ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (World.Permissions.CanEditParcelProperties(m_host.OwnerID, land, GroupPowers.LandManageBanned, false)) @@ -13699,12 +13632,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnRemoveFromLandBanList); +//// ScriptSleep(m_sleepMsOnRemoveFromLandBanList); } public void llSetCameraParams(LSL_List rules) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // the object we are in UUID objectID = m_host.ParentUUID; @@ -13831,7 +13764,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llClearCameraParams() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // the object we are in UUID objectID = m_host.ParentUUID; @@ -13858,7 +13791,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llListStatistics(int operation, LSL_List src) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); switch (operation) { case ScriptBaseClass.LIST_STAT_RANGE: @@ -13890,19 +13823,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetUnixTime() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return Util.UnixTimeSinceEpoch(); } public LSL_Integer llGetParcelFlags(LSL_Vector pos) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); return (int)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y).LandData.Flags; } public LSL_Integer llGetRegionFlags() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IEstateModule estate = World.RequestModuleInterface(); if (estate == null) return 67108864; @@ -13911,7 +13844,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llXorBase64StringsCorrect(string str1, string str2) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (str1 == String.Empty) return String.Empty; @@ -13975,7 +13908,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llHTTPRequest(string url, LSL_List parameters, string body) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); IHttpRequestModule httpScriptMod = m_ScriptEngine.World.RequestModuleInterface(); if(httpScriptMod == null) return ""; @@ -14170,7 +14103,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Partial implementation: support for parameter flags needed // see http://wiki.secondlife.com/wiki/llHTTPResponse - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_UrlModule != null) m_UrlModule.HttpResponse(new UUID(id), status,body); @@ -14178,7 +14111,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llResetLandBanList() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0) { @@ -14191,12 +14124,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api foreach (LandAccessEntry entry in todelete) land.ParcelAccessList.Remove(entry); } - ScriptSleep(m_sleepMsOnResetLandBanList); +//// ScriptSleep(m_sleepMsOnResetLandBanList); } public void llResetLandPassList() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; if (land.OwnerID == m_host.OwnerID && land.ParcelAccessList.Count > 0) { @@ -14209,12 +14142,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api foreach (LandAccessEntry entry in todelete) land.ParcelAccessList.Remove(entry); } - ScriptSleep(m_sleepMsOnResetLandPassList); +//// ScriptSleep(m_sleepMsOnResetLandPassList); } public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); @@ -14256,7 +14189,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetParcelPrimOwners(LSL_Vector pos) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LandObject land = (LandObject)World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); LSL_List ret = new LSL_List(); if (land != null) @@ -14267,13 +14200,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ret.Add(new LSL_Integer(detectedParams.Value)); } } - ScriptSleep(m_sleepMsOnGetParcelPrimOwners); +//// ScriptSleep(m_sleepMsOnGetParcelPrimOwners); return ret; } public LSL_Integer llGetObjectPrimCount(LSL_Key object_id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID id; if(!UUID.TryParse(object_id, out id)) return 0; @@ -14287,7 +14220,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); @@ -14302,7 +14235,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LandData land = World.GetLandData(pos); if (land == null) { @@ -14344,7 +14277,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llStringTrim(LSL_String src, LSL_Integer type) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return ((string)src).TrimStart(); } if (type == (int)ScriptBaseClass.STRING_TRIM_TAIL) { return ((string)src).TrimEnd(); } if (type == (int)ScriptBaseClass.STRING_TRIM) { return ((string)src).Trim(); } @@ -14353,7 +14286,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetObjectDetails(LSL_Key id, LSL_List args) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LSL_List ret = new LSL_List(); UUID key = new UUID(); if (!UUID.TryParse(id, out key)) @@ -14915,7 +14848,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llGetNumberOfNotecardLines(string name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID assetID = UUID.Zero; @@ -14944,7 +14877,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(assetID).ToString()); - ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); +//// ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); return tid.ToString(); } @@ -14960,13 +14893,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(id).ToString()); }); - ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); +//// ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); return tid.ToString(); } public LSL_Key llGetNotecardLine(string name, int line) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); UUID assetID = UUID.Zero; @@ -14996,7 +14929,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands.DataserverPlugin.DataserverReply( reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); - ScriptSleep(m_sleepMsOnGetNotecardLine); +//// ScriptSleep(m_sleepMsOnGetNotecardLine); return tid.ToString(); } @@ -15015,7 +14948,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); }); - ScriptSleep(m_sleepMsOnGetNotecardLine); +//// ScriptSleep(m_sleepMsOnGetNotecardLine); return tid.ToString(); } @@ -15488,7 +15421,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_List list = new LSL_List(); - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); Vector3 rayStart = start; Vector3 rayEnd = end; @@ -15710,7 +15643,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); LSL_List result = new LSL_List(); // Prepare throttle data @@ -16562,7 +16495,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llManageEstateAccess(int action, string avatar) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); EstateSettings estate = World.RegionInfo.EstateSettings; bool isAccount = false; bool isGroup = false; @@ -16631,35 +16564,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetMemoryLimit() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // The value returned for Mono scripts in SL return 65536; } public LSL_Integer llSetMemoryLimit(LSL_Integer limit) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Treat as an LSO script return ScriptBaseClass.FALSE; } public LSL_Integer llGetSPMaxMemory() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // The value returned for Mono scripts in SL return 65536; } public virtual LSL_Integer llGetUsedMemory() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // The value returned for Mono scripts in SL return 65536; } public void llScriptProfiler(LSL_Integer flags) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // This does nothing for LSO scripts in SL } @@ -16671,7 +16604,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetSoundQueueing(int queue) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule != null) m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); @@ -16679,14 +16612,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionSprite(LSL_String impact_sprite) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); // Viewer 2.0 broke this and it's likely LL has no intention // of fixing it. Therefore, letting this be a NOP seems appropriate. } public void llGodLikeRezObject(string inventory, LSL_Vector pos) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!World.Permissions.IsGod(m_host.OwnerID)) NotImplemented("llGodLikeRezObject"); @@ -16768,7 +16701,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (item.PermsGranter == UUID.Zero) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 1979012..8d76a2e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs @@ -125,7 +125,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSShoutError("LightShare functions are not enabled."); return new LSL_List(); } - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); RegionLightShareData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; LSL_List values = new LSL_List(); @@ -734,7 +734,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } int success = 0; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (LightShareModule.EnableWindlight) { @@ -812,7 +812,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } int success = 0; - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (LightShareModule.EnableWindlight) { diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 48f9d0b..5f27080 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -145,8 +145,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api internal static TimeZoneInfo PSTTimeZone = null; internal static bool m_PermissionErrortoOwner = false; internal static ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; - internal static float m_ScriptDelayFactor = 1.0f; - internal static float m_ScriptDistanceFactor = 1.0f; +//// internal static float m_ScriptDelayFactor = 1.0f; +//// internal static float m_ScriptDistanceFactor = 1.0f; internal static IConfig m_osslconfig; internal static ConcurrentDictionary m_FunctionPerms = new ConcurrentDictionary(); @@ -186,8 +186,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_PermissionErrortoOwner = m_osslconfig.GetBoolean("PermissionErrorToOwner", m_PermissionErrortoOwner); - m_ScriptDelayFactor = m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); - m_ScriptDistanceFactor = m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); +//// m_ScriptDelayFactor = m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); +//// m_ScriptDistanceFactor = m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); string risk = m_osslconfig.GetString("OSFunctionThreatLevel", "VeryLow"); switch (risk) @@ -264,7 +264,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api internal void OSSLError(string msg) { - throw new ScriptException("OSSL Runtime Error: " + msg); +// if (m_debuggerSafe) +// OSSLShoutError(msg); +// else + { + throw new ScriptException("OSSL Runtime Error: " + msg); + } } /// @@ -286,7 +291,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // //Dumps an error message on the debug console. // - internal void OSSLShoutError(string message) { if (message.Length > 1023) @@ -302,17 +306,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Returns if OSSL is enabled. Throws a script exception if OSSL is not allowed.. // for safe funtions always active - public void CheckThreatLevel() - { - m_host.AddScriptLPS(1); - if (!m_OSFunctionsEnabled) - OSSLError("permission denied. All unsafe OSSL funtions disabled"); // throws - } +//// public void CheckThreatLevel() +//// { +//// m_host.AddScriptLPS(1); +//// if (!m_OSFunctionsEnabled) +//// OSSLError("permission denied. All unsafe OSSL funtions disabled"); // throws +//// } // Returns if the function is allowed. Throws a script exception if not allowed. public void CheckThreatLevel(ThreatLevel level, string function) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (!m_OSFunctionsEnabled) { if (m_PermissionErrortoOwner) @@ -585,16 +589,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api OSSLShoutError(string.Format("Use of function {0} is deprecated. Use {1} instead.", function, replacement)); } - protected void ScriptSleep(int delay) - { - delay = (int)(delay * m_ScriptDelayFactor); - if (delay < 10) - return; - if(m_item != null) - m_ScriptEngine.SleepScript(m_item.ItemID, delay); - else - Thread.Sleep(delay); - } +//// protected void ScriptSleep(int delay) +//// { +//// delay = (int)(delay * m_ScriptDelayFactor); +//// if (delay < 10) +//// return; +//// if(m_item != null) +//// m_ScriptEngine.SleepScript(m_item.ItemID, delay); +//// else +//// Thread.Sleep(delay); +//// } public LSL_Integer osSetTerrainHeight(int x, int y, double val) { @@ -629,13 +633,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osGetTerrainHeight(int x, int y) { - CheckThreatLevel(); +//// CheckThreatLevel(); return GetTerrainHeight(x, y); } public LSL_Float osTerrainGetHeight(int x, int y) { - CheckThreatLevel(); +//// CheckThreatLevel(); OSSLDeprecated("osTerrainGetHeight", "osGetTerrainHeight"); return GetTerrainHeight(x, y); } @@ -797,7 +801,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer) { - CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURL"); +//// CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURL"); if (dynamicID == String.Empty) { @@ -818,7 +822,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, int timer, int alpha) { - CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURLBlend"); +//// CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURLBlend"); if (dynamicID == String.Empty) { @@ -839,7 +843,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, bool blend, int disp, int timer, int alpha, int face) { - CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURLBlendFace"); +//// CheckThreatLevel(ThreatLevel.VeryHigh, "osSetDynamicTextureURLBlendFace"); if (dynamicID == String.Empty) { @@ -866,7 +870,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureDataFace(string dynamicID, string contentType, string data, string extraParams, int timer, int face) { - CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureData"); +//// CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureData"); if (dynamicID == String.Empty) { @@ -895,7 +899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, int timer, int alpha) { - CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlend"); +//// CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlend"); if (dynamicID == String.Empty) { @@ -923,7 +927,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, bool blend, int disp, int timer, int alpha, int face) { - CheckThreatLevel(ThreatLevel.VeryLow , "osSetDynamicTextureDataBlendFace"); +//// CheckThreatLevel(ThreatLevel.VeryLow , "osSetDynamicTextureDataBlendFace"); if (dynamicID == String.Empty) { @@ -1053,7 +1057,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Vector3 pos = presence.AbsolutePosition; if(!checkAllowAgentTPbyLandOwner(agentId, pos)) { - ScriptSleep(500); +//// ScriptSleep(500); return; } @@ -1062,7 +1066,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // should be faster than going to threadpool World.RequestTeleportLocation(presence.ControllingClient, regionName, position, lookat, (uint)TPFlags.ViaLocation); - ScriptSleep(500); +//// ScriptSleep(500); } else { @@ -1073,7 +1077,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api presence.ControllingClient, regionName, position, lookat, (uint)(TPFlags.ViaLocation | TPFlags.ViaScript)), null, "OSSL_Api.TeleportAgentByRegionCoords"); - ScriptSleep(5000); +//// ScriptSleep(5000); } } } @@ -1102,7 +1106,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Vector3 pos = presence.AbsolutePosition; if(!checkAllowAgentTPbyLandOwner(agentId, pos)) { - ScriptSleep(500); +//// ScriptSleep(500); return; } @@ -1112,7 +1116,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api position, lookat, (uint)TPFlags.ViaLocation), null, "OSSL_Api.TeleportAgentByRegionName"); - ScriptSleep(5000); +//// ScriptSleep(5000); } } @@ -1128,34 +1132,34 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Vector3 pos = presence.AbsolutePosition; if(!checkAllowAgentTPbyLandOwner(agentId, pos)) { - ScriptSleep(500); +//// ScriptSleep(500); return; } World.RequestTeleportLocation(presence.ControllingClient, World.RegionInfo.RegionName, position, lookat, (uint)TPFlags.ViaLocation); - ScriptSleep(500); +//// ScriptSleep(500); } } public void osTeleportOwner(string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { // Threat level None because this is what can already be done with the World Map in the viewer - CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); +//// CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); TeleportAgent(m_host.OwnerID.ToString(), regionName, position, lookat); } public void osTeleportOwner(int regionGridX, int regionGridY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); +//// CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); TeleportAgent(m_host.OwnerID.ToString(), regionGridX, regionGridY, position, lookat); } public void osTeleportOwner(LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) { - CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); +//// CheckThreatLevel(ThreatLevel.None, "osTeleportOwner"); osTeleportAgent(m_host.OwnerID.ToString(), position, lookat); } @@ -1214,7 +1218,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { // threat level is None as we could get this information with an // in-world script as well, just not as efficient - CheckThreatLevel(ThreatLevel.None, "osGetAgents"); +//// CheckThreatLevel(ThreatLevel.None, "osGetAgents"); LSL_List result = new LSL_List(); World.ForEachRootScenePresence(delegate(ScenePresence sp) @@ -1308,7 +1312,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawResetTransform(string drawList) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "ResetTransf;"; return drawList; @@ -1316,7 +1320,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawRotationTransform(string drawList, LSL_Float x) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "RotTransf " + x + ";"; return drawList; @@ -1324,7 +1328,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawScaleTransform(string drawList, LSL_Float x, LSL_Float y) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "ScaleTransf " + x + "," + y + ";"; return drawList; @@ -1332,7 +1336,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawTranslationTransform(string drawList, LSL_Float x, LSL_Float y) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "TransTransf " + x + "," + y + ";"; return drawList; @@ -1340,7 +1344,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osMovePen(string drawList, int x, int y) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "MoveTo " + x + "," + y + ";"; return drawList; @@ -1348,7 +1352,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawLine(string drawList, int startX, int startY, int endX, int endY) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "MoveTo "+ startX+","+ startY +"; LineTo "+endX +","+endY +"; "; return drawList; @@ -1356,7 +1360,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawLine(string drawList, int endX, int endY) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "LineTo " + endX + "," + endY + "; "; return drawList; @@ -1364,7 +1368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawText(string drawList, string text) { - CheckThreatLevel(ThreatLevel.None, "osDrawText"); +//// CheckThreatLevel(ThreatLevel.None, "osDrawText"); drawList += "Text " + text + "; "; return drawList; @@ -1372,7 +1376,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawEllipse(string drawList, int width, int height) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "Ellipse " + width + "," + height + "; "; return drawList; @@ -1380,7 +1384,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawFilledEllipse(string drawList, int width, int height) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "FillEllipse " + width + "," + height + "; "; return drawList; @@ -1388,7 +1392,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawRectangle(string drawList, int width, int height) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "Rectangle " + width + "," + height + "; "; return drawList; @@ -1396,7 +1400,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawFilledRectangle(string drawList, int width, int height) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "FillRectangle " + width + "," + height + "; "; return drawList; @@ -1404,7 +1408,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawFilledPolygon(string drawList, LSL_List x, LSL_List y) { - CheckThreatLevel(); +//// CheckThreatLevel(); if (x.Length != y.Length || x.Length < 3) { @@ -1421,7 +1425,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawPolygon(string drawList, LSL_List x, LSL_List y) { - CheckThreatLevel(); +//// CheckThreatLevel(); if (x.Length != y.Length || x.Length < 3) { @@ -1438,7 +1442,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetFontSize(string drawList, int fontSize) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "FontSize "+ fontSize +"; "; return drawList; @@ -1446,7 +1450,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetFontName(string drawList, string fontName) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "FontName "+ fontName +"; "; return drawList; @@ -1454,7 +1458,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetPenSize(string drawList, int penSize) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "PenSize " + penSize + "; "; return drawList; @@ -1462,7 +1466,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetPenColor(string drawList, string color) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "PenColor " + color + "; "; return drawList; @@ -1471,7 +1475,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Deprecated public string osSetPenColour(string drawList, string colour) { - CheckThreatLevel(); +//// CheckThreatLevel(); OSSLDeprecated("osSetPenColour", "osSetPenColor"); drawList += "PenColour " + colour + "; "; @@ -1480,7 +1484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osSetPenCap(string drawList, string direction, string type) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList += "PenCap " + direction + "," + type + "; "; return drawList; @@ -1488,7 +1492,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osDrawImage(string drawList, int width, int height, string imageUrl) { - CheckThreatLevel(); +//// CheckThreatLevel(); drawList +="Image " +width + "," + height+ ","+ imageUrl +"; " ; return drawList; @@ -1496,7 +1500,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector osGetDrawStringSize(string contentType, string text, string fontName, int fontSize) { - CheckThreatLevel(); +//// CheckThreatLevel(); LSL_Vector vec = new LSL_Vector(0,0,0); IDynamicTextureManager textureManager = World.RequestModuleInterface(); @@ -1538,7 +1542,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// The "Sun Hour" that is desired, 0...24, with 0 just after SunRise public void osSetRegionSunSettings(bool useEstateSun, bool sunFixed, double sunHour) { - CheckThreatLevel(ThreatLevel.High, "osSetRegionSunSettings"); + CheckThreatLevel(ThreatLevel.Nuisance, "osSetRegionSunSettings"); while (sunHour > 24.0) sunHour -= 24.0; @@ -1561,7 +1565,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// The "Sun Hour" that is desired, 0...24, with 0 just after SunRise public void osSetEstateSunSettings(bool sunFixed, double sunHour) { - CheckThreatLevel(ThreatLevel.High, "osSetEstateSunSettings"); + CheckThreatLevel(ThreatLevel.Nuisance, "osSetEstateSunSettings"); while (sunHour > 24.0) sunHour -= 24.0; @@ -1583,7 +1587,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public double osGetCurrentSunHour() { - CheckThreatLevel(); +//// CheckThreatLevel(); // Must adjust for the fact that Region Sun Settings are still LL offset double sunHour = World.RegionInfo.RegionSettings.SunPosition - 6; @@ -1600,14 +1604,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public double osSunGetParam(string param) { - CheckThreatLevel(ThreatLevel.None, "osSunGetParam"); +//// CheckThreatLevel(ThreatLevel.None, "osSunGetParam"); OSSLDeprecated("osSunGetParam", "osGetSunParam"); return GetSunParam(param); } public double osGetSunParam(string param) { - CheckThreatLevel(); +//// CheckThreatLevel(); return GetSunParam(param); } @@ -1626,14 +1630,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSunSetParam(string param, double value) { - CheckThreatLevel(ThreatLevel.None, "osSunSetParam"); + CheckThreatLevel(ThreatLevel.Nuisance, "osSunSetParam"); OSSLDeprecated("osSunSetParam", "osSetSunParam"); SetSunParam(param, value); } public void osSetSunParam(string param, double value) { - CheckThreatLevel(ThreatLevel.None, "osSetSunParam"); + CheckThreatLevel(ThreatLevel.Nuisance, "osSetSunParam"); SetSunParam(param, value); } @@ -1648,7 +1652,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osWindActiveModelPluginName() { - CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName"); +//// CheckThreatLevel(ThreatLevel.None, "osWindActiveModelPluginName"); IWindModule module = World.RequestModuleInterface(); if (module != null) @@ -1661,7 +1665,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetWindParam(string plugin, string param, LSL_Float value) { - CheckThreatLevel(ThreatLevel.VeryLow, "osSetWindParam"); + CheckThreatLevel(ThreatLevel.Nuisance, "osSetWindParam"); IWindModule module = World.RequestModuleInterface(); if (module != null) @@ -1676,7 +1680,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osGetWindParam(string plugin, string param) { - CheckThreatLevel(ThreatLevel.VeryLow, "osGetWindParam"); +//// CheckThreatLevel(ThreatLevel.VeryLow, "osGetWindParam"); IWindModule module = World.RequestModuleInterface(); if (module != null) @@ -1964,7 +1968,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // that trigger engine-specific failures. // Besides, public grid users aren't supposed to know. // - CheckThreatLevel(ThreatLevel.High, "osGetScriptEngineName"); + // And yet, they get to choose the engine in their scripts. Pfffft +//// CheckThreatLevel(ThreatLevel.High, "osGetScriptEngineName"); int scriptEngineNameIndex = 0; @@ -1990,7 +1995,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osCheckODE() { - CheckThreatLevel(); +//// CheckThreatLevel(); LSL_Integer ret = 0; // false if (m_ScriptEngine.World.PhysicsScene != null) @@ -2015,9 +2020,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // the user does not have permission to see it. This as opposed to // throwing an exception. - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); string ret = String.Empty; - if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) +//// if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) { if (m_ScriptEngine.World.PhysicsScene != null) { @@ -2033,7 +2038,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetPhysicsEngineName() { - CheckThreatLevel(); +//// CheckThreatLevel(); string ret = "NoEngine"; if (m_ScriptEngine.World.PhysicsScene != null) @@ -2053,7 +2058,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // require their user to know what they are doing (see script // kiddie) // - CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); + // Or they could check in the About window. Pfffft +//// CheckThreatLevel(ThreatLevel.High,"osGetSimulatorVersion"); return m_ScriptEngine.World.GetSimulatorVersion(); } @@ -2069,7 +2075,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void osMessageObject(LSL_Key objectUUID, string message) { - CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); +//// CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); UUID objUUID; if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead. @@ -2106,10 +2112,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osDie(LSL_Key objectUUID) { -// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); +//// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); // if this is restricted to objects rezzed by this host level can be reduced - CheckThreatLevel(ThreatLevel.Low, "osDie"); +//// CheckThreatLevel(ThreatLevel.Low, "osDie"); UUID objUUID; if (!UUID.TryParse(objectUUID, out objUUID)) @@ -2162,7 +2168,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// The contents of the notecard. public void osMakeNotecard(string notecardName, LSL_Types.list contents) { - CheckThreatLevel(ThreatLevel.High, "osMakeNotecard"); +//// CheckThreatLevel(ThreatLevel.High, "osMakeNotecard"); StringBuilder notecardData = new StringBuilder(); @@ -2347,7 +2353,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// Notecard line public string osGetNotecardLine(string name, int line) { - CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecardLine"); +//// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecardLine"); UUID assetID = CacheNotecard(name); @@ -2374,7 +2380,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// Notecard text public string osGetNotecard(string name) { - CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecard"); +//// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNotecard"); string text = LoadNotecard(name); @@ -2403,7 +2409,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public int osGetNumberOfNotecardLines(string name) { - CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNumberOfNotecardLines"); +//// CheckThreatLevel(ThreatLevel.VeryHigh, "osGetNumberOfNotecardLines"); UUID assetID = CacheNotecard(name); @@ -2463,7 +2469,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osKey2Name(string id) { - CheckThreatLevel(ThreatLevel.Low, "osKey2Name"); +//// CheckThreatLevel(ThreatLevel.Low, "osKey2Name"); UUID key = new UUID(); @@ -2572,7 +2578,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public string osGetGridNick() { - CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); +//// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridNick"); string nick = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; @@ -2588,7 +2594,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridName() { - CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); +//// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridName"); string name = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; @@ -2604,7 +2610,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridLoginURI() { - CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); +//// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridLoginURI"); string loginURI = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; @@ -2620,7 +2626,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridHomeURI() { - CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI"); +//// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridHomeURI"); IConfigSource config = m_ScriptEngine.ConfigSource; string HomeURI = Util.GetConfigVarFromSections(config, "HomeURI", @@ -2659,7 +2665,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osGetGridCustom(string key) { - CheckThreatLevel(ThreatLevel.Moderate, "osGetGridCustom"); +//// CheckThreatLevel(ThreatLevel.Moderate, "osGetGridCustom"); string retval = String.Empty; IConfigSource config = m_ScriptEngine.ConfigSource; @@ -2707,14 +2713,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osFormatString(string str, LSL_List strings) { - CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString"); +//// CheckThreatLevel(ThreatLevel.VeryLow, "osFormatString"); return String.Format(str, strings.Data); } public LSL_List osMatchString(string src, string pattern, int start) { - CheckThreatLevel(ThreatLevel.VeryLow, "osMatchString"); +//// CheckThreatLevel(ThreatLevel.VeryLow, "osMatchString"); LSL_List result = new LSL_List(); @@ -2755,7 +2761,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osReplaceString(string src, string pattern, string replace, int count, int start) { - CheckThreatLevel(ThreatLevel.VeryLow, "osReplaceString"); +//// CheckThreatLevel(ThreatLevel.VeryLow, "osReplaceString"); // Normalize indices (if negative). // After normlaization they may still be @@ -2779,21 +2785,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string osLoadedCreationDate() { - CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); +//// CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationDate"); return World.RegionInfo.RegionSettings.LoadedCreationDate; } public string osLoadedCreationTime() { - CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationTime"); +//// CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationTime"); return World.RegionInfo.RegionSettings.LoadedCreationTime; } public string osLoadedCreationID() { - CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationID"); +//// CheckThreatLevel(ThreatLevel.Low, "osLoadedCreationID"); return World.RegionInfo.RegionSettings.LoadedCreationID; } @@ -2813,7 +2819,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_List osGetLinkPrimitiveParams(int linknumber, LSL_List rules) { - CheckThreatLevel(ThreatLevel.High, "osGetLinkPrimitiveParams"); + CheckThreatLevel(ThreatLevel.VeryLow, "osGetLinkPrimitiveParams"); InitLSL(); // One needs to cast m_LSL_Api because we're using functions not @@ -2866,7 +2872,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osIsNpc(LSL_Key npc) { - CheckThreatLevel(); +//// CheckThreatLevel(); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -2882,7 +2888,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard) { - CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); // have to get the npc module also here to set the default Not Owned INPCModule module = World.RequestModuleInterface(); @@ -2896,7 +2902,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) { - CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); return NpcCreate( firstname, lastname, position, notecard, @@ -3039,7 +3045,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// The asset ID of the notecard saved. public LSL_Key osNpcSaveAppearance(LSL_Key npc, string notecard) { - CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcSaveAppearance"); INPCModule npcModule = World.RequestModuleInterface(); @@ -3060,7 +3066,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcLoadAppearance(LSL_Key npc, string notecard) { - CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcLoadAppearance"); INPCModule npcModule = World.RequestModuleInterface(); @@ -3091,7 +3097,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osNpcGetOwner(LSL_Key npc) { - CheckThreatLevel(ThreatLevel.None, "osNpcGetOwner"); +//// CheckThreatLevel(ThreatLevel.None, "osNpcGetOwner"); INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null) @@ -3112,7 +3118,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector osNpcGetPos(LSL_Key npc) { - CheckThreatLevel(ThreatLevel.High, "osNpcGetPos"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcGetPos"); INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null) @@ -3135,7 +3141,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcMoveTo(LSL_Key npc, LSL_Vector pos) { - CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcMoveTo"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3153,7 +3159,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcMoveToTarget(LSL_Key npc, LSL_Vector target, int options) { - CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcMoveToTarget"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3177,7 +3183,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation osNpcGetRot(LSL_Key npc) { - CheckThreatLevel(ThreatLevel.High, "osNpcGetRot"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcGetRot"); INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null) @@ -3200,7 +3206,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSetRot(LSL_Key npc, LSL_Rotation rotation) { - CheckThreatLevel(ThreatLevel.High, "osNpcSetRot"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcSetRot"); INPCModule npcModule = World.RequestModuleInterface(); if (npcModule != null) @@ -3221,7 +3227,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcStopMoveToTarget(LSL_Key npc) { - CheckThreatLevel(ThreatLevel.High, "osNpcStopMoveToTarget"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcStopMoveToTarget"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3237,7 +3243,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSetProfileAbout(LSL_Key npc, string about) { - CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout"); +//// CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileAbout"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3255,7 +3261,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSetProfileImage(LSL_Key npc, string image) { - CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage"); +//// CheckThreatLevel(ThreatLevel.Low, "osNpcSetProfileImage"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3288,7 +3294,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSay(LSL_Key npc, int channel, string message) { - CheckThreatLevel(ThreatLevel.High, "osNpcSay"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcSay"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3304,7 +3310,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSayTo(LSL_Key npc, LSL_Key target, int channel, string msg) { - CheckThreatLevel(ThreatLevel.High, "osNpcSayTo"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcSayTo"); INPCModule module = World.RequestModuleInterface(); if (module == null) @@ -3335,7 +3341,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcShout(LSL_Key npc, int channel, string message) { - CheckThreatLevel(ThreatLevel.High, "osNpcShout"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcShout"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3351,7 +3357,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcSit(LSL_Key npc, LSL_Key target, int options) { - CheckThreatLevel(ThreatLevel.High, "osNpcSit"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcSit"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3367,7 +3373,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcStand(LSL_Key npc) { - CheckThreatLevel(ThreatLevel.High, "osNpcStand"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcStand"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3383,7 +3389,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcRemove(LSL_Key npc) { - CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcRemove"); try { @@ -3403,7 +3409,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcPlayAnimation(LSL_Key npc, string animation) { - CheckThreatLevel(ThreatLevel.High, "osNpcPlayAnimation"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcPlayAnimation"); INPCModule module = World.RequestModuleInterface(); if (module == null) @@ -3443,7 +3449,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcStopAnimation(LSL_Key npc, string animation) { - CheckThreatLevel(ThreatLevel.High, "osNpcStopAnimation"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcStopAnimation"); INPCModule module = World.RequestModuleInterface(); if (module == null) @@ -3478,7 +3484,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcWhisper(LSL_Key npc, int channel, string message) { - CheckThreatLevel(ThreatLevel.High, "osNpcWhisper"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcWhisper"); INPCModule module = World.RequestModuleInterface(); if (module != null) @@ -3494,7 +3500,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osNpcTouch(LSL_Key npcLSL_Key, LSL_Key object_key, LSL_Integer link_num) { - CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); +//// CheckThreatLevel(ThreatLevel.High, "osNpcTouch"); INPCModule module = World.RequestModuleInterface(); int linkNum = link_num.value; @@ -3538,7 +3544,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// The asset ID of the notecard saved. public LSL_Key osOwnerSaveAppearance(string notecard) { - CheckThreatLevel(ThreatLevel.High, "osOwnerSaveAppearance"); +//// CheckThreatLevel(ThreatLevel.High, "osOwnerSaveAppearance"); return SaveAppearanceToNotecard(m_host.OwnerID, notecard); } @@ -3591,7 +3597,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// "male" or "female" or "unknown" public LSL_String osGetGender(LSL_Key rawAvatarId) { - CheckThreatLevel(ThreatLevel.None, "osGetGender"); +//// CheckThreatLevel(ThreatLevel.None, "osGetGender"); UUID avatarId; if (!UUID.TryParse(rawAvatarId, out avatarId)) @@ -3634,7 +3640,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Key osGetMapTexture() { - CheckThreatLevel(); +//// CheckThreatLevel(); return m_ScriptEngine.World.RegionInfo.RegionSettings.TerrainImageID.ToString(); } @@ -3646,7 +3652,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Key osGetRegionMapTexture(string regionNameOrID) { - CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); +//// CheckThreatLevel(ThreatLevel.High, "osGetRegionMapTexture"); Scene scene = m_ScriptEngine.World; UUID key = UUID.Zero; @@ -3667,7 +3673,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (region != null) key = region.TerrainImage; - ScriptSleep(1000); +//// ScriptSleep(1000); return key.ToString(); } @@ -3681,7 +3687,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// List of floats public LSL_List osGetRegionStats() { - CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); +//// CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); LSL_List ret = new LSL_List(); float[] stats = World.StatsReporter.LastReportedSimStats; @@ -3695,7 +3701,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector osGetRegionSize() { - CheckThreatLevel(); +//// CheckThreatLevel(); Scene scene = m_ScriptEngine.World; RegionInfo reg = World.RegionInfo; @@ -3706,7 +3712,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public int osGetSimulatorMemory() { - CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); +//// CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemory"); long pws = Util.GetPhysicalMemUse(); @@ -3720,7 +3726,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public int osGetSimulatorMemoryKB() { - CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemoryKB"); +//// CheckThreatLevel(ThreatLevel.Moderate, "osGetSimulatorMemoryKB"); long pws = Util.GetPhysicalMemUse(); @@ -3749,7 +3755,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetOwnerSpeed(LSL_Float SpeedModifier) { - CheckThreatLevel(ThreatLevel.Moderate, "osSetOwnerSpeed"); + //// CheckThreatLevel(ThreatLevel.Moderate, "osSetOwnerSpeed"); if(SpeedModifier > 4) SpeedModifier = 4; @@ -3799,7 +3805,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osGetHealth(LSL_Key agentKey) { - CheckThreatLevel(ThreatLevel.None, "osGetHealth"); + //// CheckThreatLevel(ThreatLevel.None, "osGetHealth"); LSL_Float health = new LSL_Float(-1); @@ -3898,7 +3904,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float osGetHealRate(LSL_Key avatar) { - CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); +//// CheckThreatLevel(ThreatLevel.None, "osGetHealRate"); LSL_Float rate = new LSL_Float(0); @@ -3914,7 +3920,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osGetPrimitiveParams(LSL_Key prim, LSL_List rules) { - CheckThreatLevel(); + CheckThreatLevel(ThreatLevel.VeryLow, "osGetPrimitiveParams"); InitLSL(); return m_LSL_Api.GetPrimitiveParamsEx(prim, rules); @@ -3922,7 +3928,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetPrimitiveParams(LSL_Key prim, LSL_List rules) { - CheckThreatLevel(); +//// CheckThreatLevel(ThreatLevel.VeryLow, "osSetPrimitiveParams"); InitLSL(); m_LSL_Api.SetPrimitiveParamsEx(prim, rules, "osSetPrimitiveParams"); @@ -3966,7 +3972,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void osSetProjectionParams(LSL_Key prim, LSL_Integer llprojection, LSL_Key texture, LSL_Float fov, LSL_Float focus, LSL_Float amb) { - CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); +//// CheckThreatLevel(ThreatLevel.High, "osSetProjectionParams"); SceneObjectPart obj = null; if (prim == UUID.Zero.ToString()) @@ -4001,7 +4007,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// Strided list of the UUID, position and name of each avatar in the region public LSL_List osGetAvatarList() { - CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); +//// CheckThreatLevel(ThreatLevel.None, "osGetAvatarList"); LSL_List result = new LSL_List(); World.ForEachRootScenePresence(delegate (ScenePresence avatar) @@ -4019,7 +4025,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List osGetNPCList() { - CheckThreatLevel(ThreatLevel.None, "osGetNPCList"); +//// CheckThreatLevel(ThreatLevel.None, "osGetNPCList"); LSL_List result = new LSL_List(); World.ForEachRootScenePresence(delegate (ScenePresence avatar) @@ -4043,7 +4049,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String osUnixTimeToTimestamp(LSL_Integer time) { - CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp"); +//// CheckThreatLevel(ThreatLevel.VeryLow, "osUnixTimeToTimestamp"); long baseTicks = 621355968000000000; long tickResolution = 10000000; @@ -4251,7 +4257,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osForceDetachFromAvatar() { - CheckThreatLevel(ThreatLevel.High, "osForceDetachFromAvatar"); + CheckThreatLevel(ThreatLevel.VeryHigh, "osForceDetachFromAvatar"); InitLSL(); m_LSL_Api.DetachFromAvatar(); @@ -4402,7 +4408,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// 1 if thing is a valid UUID, 0 otherwise public LSL_Integer osIsUUID(string thing) { - CheckThreatLevel(); +//// CheckThreatLevel(); UUID test; return UUID.TryParse(thing, out test) ? 1 : 0; @@ -4416,7 +4422,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Float osMin(double a, double b) { - CheckThreatLevel(); +//// CheckThreatLevel(); return Math.Min(a, b); } @@ -4429,14 +4435,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Float osMax(double a, double b) { - CheckThreatLevel(); +//// CheckThreatLevel(); return Math.Max(a, b); } public LSL_Key osGetRezzingObject() { - CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject"); +//// CheckThreatLevel(ThreatLevel.None, "osGetRezzingObject"); UUID rezID = m_host.ParentGroup.RezzerID; if(rezID == UUID.Zero || m_host.ParentGroup.Scene.GetScenePresence(rezID) != null) @@ -4450,7 +4456,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void osSetContentType(LSL_Key id, string type) { - CheckThreatLevel(ThreatLevel.Severe, "osSetContentType"); + CheckThreatLevel(ThreatLevel.Moderate, "osSetContentType"); if (m_UrlModule != null) m_UrlModule.HttpContentType(new UUID(id),type); @@ -4539,7 +4545,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osListenRegex(int channelID, string name, string ID, string msg, int regexBitfield) { - CheckThreatLevel(ThreatLevel.Low, "osListenRegex"); +//// CheckThreatLevel(ThreatLevel.Low, "osListenRegex"); UUID keyID; UUID.TryParse(ID, out keyID); @@ -4587,7 +4593,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osRegexIsMatch(string input, string pattern) { - CheckThreatLevel(ThreatLevel.Low, "osRegexIsMatch"); +//// CheckThreatLevel(ThreatLevel.Low, "osRegexIsMatch"); try { @@ -4636,7 +4642,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osCollisionSound(string impact_sound, double impact_volume) { - CheckThreatLevel(); +//// CheckThreatLevel(); if(impact_sound == "") { @@ -4668,7 +4674,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // still not very usefull, detector is lost on rez, restarts, etc public void osVolumeDetect(int detect) { - CheckThreatLevel(); +//// CheckThreatLevel(); if (m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted || m_host.ParentGroup.IsAttachment) return; @@ -4690,7 +4696,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_List osGetInertiaData() { - CheckThreatLevel(); +//// CheckThreatLevel(); LSL_List result = new LSL_List(); float TotalMass; @@ -4737,7 +4743,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetInertia(LSL_Float mass, LSL_Vector centerOfMass, LSL_Vector principalInertiaScaled, LSL_Rotation lslrot) { - CheckThreatLevel(); +//// CheckThreatLevel(); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4775,7 +4781,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void osSetInertiaAsBox(LSL_Float mass, LSL_Vector boxSize, LSL_Vector centerOfMass, LSL_Rotation lslrot) { - CheckThreatLevel(); +//// CheckThreatLevel(); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4816,7 +4822,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void osSetInertiaAsSphere(LSL_Float mass, LSL_Float radius, LSL_Vector centerOfMass) { - CheckThreatLevel(); +//// CheckThreatLevel(); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4855,7 +4861,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void osSetInertiaAsCylinder(LSL_Float mass, LSL_Float radius, LSL_Float lenght, LSL_Vector centerOfMass, LSL_Rotation lslrot) { - CheckThreatLevel(); +//// CheckThreatLevel(); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4893,7 +4899,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public void osClearInertia() { - CheckThreatLevel(); +//// CheckThreatLevel(); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -4951,7 +4957,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Integer osTeleportObject(LSL_Key objectUUID, LSL_Vector targetPos, LSL_Rotation rotation, LSL_Integer flags) { - CheckThreatLevel(ThreatLevel.Severe, "osTeleportObject"); +//// CheckThreatLevel(ThreatLevel.Severe, "osTeleportObject"); UUID objUUID; if (!UUID.TryParse(objectUUID, out objUUID)) @@ -4979,7 +4985,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osGetLinkNumber(LSL_String name) { - CheckThreatLevel(); +//// CheckThreatLevel(); SceneObjectGroup sog = m_host.ParentGroup; if(sog== null || sog.IsDeleted) @@ -5017,7 +5023,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osAdjustSoundVolume(LSL_Integer linknum, LSL_Float volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SceneObjectPart sop = GetSingleLinkPart(linknum); if(sop == null) return; @@ -5026,7 +5032,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osSetSoundRadius(LSL_Integer linknum, LSL_Float radius) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); SceneObjectPart sop = GetSingleLinkPart(linknum); if(sop == null) return; @@ -5035,7 +5041,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osPlaySound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5054,7 +5060,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osLoopSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5072,7 +5078,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osLoopSoundMaster(LSL_Integer linknum, LSL_String sound, LSL_Float volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5090,7 +5096,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osLoopSoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5108,7 +5114,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osPlaySoundSlave(LSL_Integer linknum, LSL_String sound, LSL_Float volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5127,7 +5133,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTriggerSound(LSL_Integer linknum, LSL_String sound, LSL_Float volume) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5147,7 +5153,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osTriggerSoundLimited(LSL_Integer linknum, LSL_String sound, LSL_Float volume, LSL_Vector top_north_east, LSL_Vector bottom_south_west) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5166,7 +5172,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osStopSound(LSL_Integer linknum) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5180,7 +5186,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osPreloadSound(LSL_Integer linknum, LSL_String sound) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if (m_SoundModule == null) return; @@ -5194,7 +5200,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; m_SoundModule.PreloadSound(sop.UUID, soundID); - ScriptSleep(1000); +//// ScriptSleep(1000); } // get only one part @@ -5232,7 +5238,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osDetectedCountry(LSL_Integer number) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); CheckThreatLevel(ThreatLevel.Moderate, "osDetectedCountry"); if (World.UserAccountService == null) @@ -5249,7 +5255,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osGetAgentCountry(LSL_Key id) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); CheckThreatLevel(ThreatLevel.Moderate, "osGetAgentCountry"); if (World.UserAccountService == null) @@ -5275,8 +5281,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osStringSubString(LSL_String src, LSL_Integer offset) { - m_host.AddScriptLPS(1); - CheckThreatLevel(); +//// m_host.AddScriptLPS(1); +//// CheckThreatLevel(); if (string.IsNullOrEmpty(src)) return ""; @@ -5289,8 +5295,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osStringSubString(LSL_String src, LSL_Integer offset, LSL_Integer length) { - m_host.AddScriptLPS(1); - CheckThreatLevel(); +//// m_host.AddScriptLPS(1); +//// CheckThreatLevel(); if (string.IsNullOrEmpty(src)) return ""; @@ -5309,8 +5315,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osStringStartsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase) { - m_host.AddScriptLPS(1); - CheckThreatLevel(); +//// m_host.AddScriptLPS(1); +//// CheckThreatLevel(); if (string.IsNullOrEmpty(src)) return 0; @@ -5323,8 +5329,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osStringEndsWith(LSL_String src, LSL_String value, LSL_Integer ignorecase) { - m_host.AddScriptLPS(1); - CheckThreatLevel(); +//// m_host.AddScriptLPS(1); +//// CheckThreatLevel(); if (string.IsNullOrEmpty(src)) return 0; @@ -5337,8 +5343,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase) { - m_host.AddScriptLPS(1); - CheckThreatLevel(); +//// m_host.AddScriptLPS(1); +//// CheckThreatLevel(); if (string.IsNullOrEmpty(src)) return -1; @@ -5353,8 +5359,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osStringIndexOf(LSL_String src, LSL_String value, LSL_Integer offset, LSL_Integer count, LSL_Integer ignorecase) { - m_host.AddScriptLPS(1); - CheckThreatLevel(); +//// m_host.AddScriptLPS(1); +//// CheckThreatLevel(); if (string.IsNullOrEmpty(src)) return -1; @@ -5377,8 +5383,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer ignorecase) { - m_host.AddScriptLPS(1); - CheckThreatLevel(); +//// m_host.AddScriptLPS(1); +//// CheckThreatLevel(); if (string.IsNullOrEmpty(src)) return -1; @@ -5393,8 +5399,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer osStringLastIndexOf(LSL_String src, LSL_String value, LSL_Integer offset, LSL_Integer count, LSL_Integer ignorecase) { - m_host.AddScriptLPS(1); - CheckThreatLevel(); +//// m_host.AddScriptLPS(1); +//// CheckThreatLevel(); if (string.IsNullOrEmpty(src)) return -1; @@ -5547,7 +5553,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osGetInventoryLastOwner(LSL_String itemNameorid) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = null; UUID itemID; @@ -5567,7 +5573,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osGetInventoryItemKey(LSL_String name) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); @@ -5586,7 +5592,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osGetInventoryName(LSL_Key itemId) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = null; UUID itemID; @@ -5601,7 +5607,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String osGetInventoryDesc(LSL_String itemNameorid) { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); TaskInventoryItem item = null; UUID itemID; @@ -5618,7 +5624,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key osGetLastChangedEventKey() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); if (detectedParams == null) return String.Empty; @@ -5628,7 +5634,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // returns PST or PDT wall clock public LSL_Float osGetPSTWallclock() { - m_host.AddScriptLPS(1); +//// m_host.AddScriptLPS(1); if(PSTTimeZone == null) return DateTime.Now.TimeOfDay.TotalSeconds; diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs b/OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs index 7ef1b9f..0e0ee4d 100644 --- a/OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs +++ b/OpenSim/Region/ScriptEngine/YEngine/XMRInstBackend.cs @@ -59,14 +59,14 @@ namespace OpenSim.Region.ScriptEngine.Yengine inst = i; } - protected override void ScriptSleep(int ms) - { - ms = (int)(ms * m_ScriptDelayFactor); - if (ms < 10) - return; - - inst.Sleep(ms); - } +//// protected override void ScriptSleep(int ms) +//// { +//// ms = (int)(ms * m_ScriptDelayFactor); +//// if (ms < 10) +//// return; +//// +//// inst.Sleep(ms); +//// } public override void llSleep(double sec) { diff --git a/bin/config-include/osslEnable.ini b/bin/config-include/osslEnable.ini index 59373b3..3793e67 100644 --- a/bin/config-include/osslEnable.ini +++ b/bin/config-include/osslEnable.ini @@ -27,7 +27,7 @@ ; in your simulator. It is safer to explicitly allow certain types of user to run ; higher threat level OSSL functions, as detailed later on. ; This setting defines the highest level allowed to execute - OSFunctionThreatLevel = VeryLow + OSFunctionThreatLevel = Moderate ; The threat level can be replaced by more detailed rules by lines of the form ; Allow_FunctionName = parameters @@ -56,10 +56,8 @@ ; appropriate line below to allow parcel ownership and groups to do restricted ; OSSL functions. It might be better to check the list below and edit the ones ; to enable individually. - osslParcelO = "" - osslParcelOG = "" - ; osslParcelO = "PARCEL_OWNER," - ; osslParcelOG = "PARCEL_GROUP_MEMBER,PARCEL_OWNER," + osslParcelO = "PARCEL_OWNER," + osslParcelOG = "PARCEL_GROUP_MEMBER,PARCEL_OWNER," ; NPC macros ; These can be mis-used so limit use to those you can trust. @@ -69,123 +67,181 @@ ; Creators__FunctionName = comma separated list of UUIDs ; this will enable the function for users that are the script creators and owners of the prim - ; ************************************************* - ; ThreatLevel None - Allow_osGetAgents = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetAvatarList = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - ;Allow_osGetGender = true - ;Allow_osGetHealth = true - ;Allow_osGetHealRate = true - Allow_osGetNPCList = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - ;Allow_osGetRezzingObject = true - ;Allow_osGetSunParam = true - Allow_osNpcGetOwner = ${OSSL|osslNPC} - Allow_osSetSunParam = ESTATE_MANAGER,ESTATE_OWNER - Allow_osTeleportOwner = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - ;Allow_osWindActiveModelPluginName = true +; ThreatLevel None +; Commented functions are out of Threat level control (for reference only) +; Allow_osCheckODE = true +; Allow_osClearInertia = true +; Allow_osCollisionSound = true +; Allow_osDie = true +; Allow_osDrawEllipse = true +; Allow_osDrawFilledEllipse = true +; Allow_osDrawFilledPolygon = true +; Allow_osDrawFilledRectangle = true +; Allow_osDrawImage = true +; Allow_osDrawLine = true +; Allow_osDrawPolygon = true +; Allow_osDrawRectangle = true +; Allow_osDrawResetTransform = true +; Allow_osDrawRotationTransform = true +; Allow_osDrawScaleTransform = true +; Allow_osDrawText = true +; Allow_osDrawTranslationTransform = true +; Allow_osFormatString = true +; Allow_osGetCurrentSunHour = true +; Allow_osGetAgents = true +; Allow_osGetAvatarList = true +; Allow_osGetDrawStringSize = true +; Allow_osGetGender = true +; Allow_osGetGridCustom = true +; Allow_osGetGridHomeURI = true +; Allow_osGetGridLoginURI = true +; Allow_osGetGridName = true +; Allow_osGetGridNick = true +; Allow_osGetHealth = true +; Allow_osGetHealRate = true +; Allow_osGetInertiaData = true +; Allow_osGetInventoryDesc = true +; Allow_osGetLinkNumber = true +; Allow_osGetMapTexture = true + ; The notecard functions can cause a lot of load on the region if over used. + ; So can any LSL loop. Pffft +; Allow_osGetNotecard = true +; Allow_osGetNotecardLine = true +; Allow_osGetNumberOfNotecardLines = true +; Allow_osGetNPCList = true +; Allow_osGetParcerlDwell = true +; Allow_osGetPhysicsEngineName = true +; Allow_osGetPhysicsEngineType = true +; Allow_osGetRegionMapTexture = true +; Allow_osGetRegionSize = true +; Allow_osGetRegionStats = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER +; Allow_osGetRezzingObject = true +; Allow_osGetScriptEngineName = true +; Allow_osGetSimulatorMemory = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER +; Allow_osGetSimulatorMemoryKB = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER +; Allow_osGetSimulatorVersion = true +; Allow_osGetSunParam = true +; Allow_osGetTerrainHeight = true +; Allow_osGetWindParam = true +; Allow_osIsNpc = true +; Allow_osIsUUID = true +; Allow_osKey2Name = true +; Allow_osList2Double = true +; Allow_osListenRegex = true +; Allow_osLoadedCreationDate = true +; Allow_osLoadedCreationID = true +; Allow_osLoadedCreationTime = true +; Allow_osMatchString = true +; Allow_osMakeNotecard = true +; Allow_osMax = true +; Allow_osMin = true +; Allow_osMessageObject = true +; Allow_osMovePen = true +; Allow_osNpcCreate = true +; Allow_osNpcGetOwner = true +; Allow_osNpcGetPos = true +; Allow_osNpcGetRot = true +; Allow_osNpcLoadAppearance = true +; Allow_osNpcMoveTo = true +; Allow_osNpcMoveToTarget = true +; Allow_osNpcPlayAnimation = true +; Allow_osNpcRemove = true +; Allow_osNpcSaveAppearance = true +; Allow_osNpcSay = true +; Allow_osNpcSayTo = true +; Allow_osNpcSetProfileAbout = true +; Allow_osNpcSetProfileImage = true +; Allow_osNpcSetRot = true +; Allow_osNpcShout = true +; Allow_osNpcSit = true +; Allow_osNpcStand = true +; Allow_osNpcStopAnimation = true +; Allow_osNpcStopMoveToTarget = true +; Allow_osNpcTouch = true +; Allow_osNpcWhisper = true +; Allow_osOwnerSaveAppearance = true +; Allow_osRegexIsMatch = true +; Allow_osReplaceString = true +; Allow_osSetDynamicTextureData = true +; Allow_osSetDynamicTextureDataFace = true +; Allow_osSetDynamicTextureDataBlend = true +; Allow_osSetDynamicTextureDataBlendFace = true +; Allow_osSetDynamicTextureURL = true +; Allow_osSetDynamicTextureURLBlend = true +; Allow_osSetDynamicTextureURLBlendFace = true +; Allow_osSetFontName = true +; Allow_osSetFontSize = true +; Allow_osSetInertia = true +; Allow_osSetInertiaAsBox = true +; Allow_osSetInertiaAsSphere = true +; Allow_osSetInertiaAsCylinder = true +; Allow_osSetOwnerSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER +; Allow_osSetPenCap = true +; Allow_osSetPenColor = true +; Allow_osSetPenSize = true +; Allow_osSetPrimitiveParams = true +; Allow_osSetProjectionParams = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER +; Allow_osSunGetParam = true +; Allow_osVolumeDetect = true +; Allow_osTeleportObject = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER +; Allow_osTeleportOwner = true +; Allow_osWindActiveModelPluginName = true +; Allow_osUnixTimeToTimestamp = true ; ThreatLevel Nuisance Allow_osSetEstateSunSettings = ESTATE_MANAGER,ESTATE_OWNER Allow_osSetRegionSunSettings = ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetSunParam = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetWindParam = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSunSetParam = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER ; ThreatLevel VeryLow - Allow_osEjectFromGroup = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceBreakAllLinks = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceBreakLink = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetWindParam = true - Allow_osInviteToGroup = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osReplaceString = true - Allow_osSetDynamicTextureData = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureDataFace = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureDataBlend = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureDataBlendFace = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetParcelMediaURL = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetParcelSIPAddress = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osEjectFromGroup = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osForceBreakAllLinks = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osForceBreakLink = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osForceCreateLink = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osGetLinkPrimitiveParams = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osGetPrimitiveParams = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osInviteToGroup = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetParcelMediaURL = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetParcelSIPAddress = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetPrimFloatOnWater = true - Allow_osSetWindParam = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER Allow_osTerrainFlush = ESTATE_MANAGER,ESTATE_OWNER - Allow_osUnixTimeToTimestamp = true ; ThreatLevel Low - Allow_osAvatarName2Key = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osFormatString = true - Allow_osKey2Name = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osListenRegex = true - Allow_osLoadedCreationDate = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osLoadedCreationID = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osLoadedCreationTime = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osMessageObject = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osRegexIsMatch = true - Allow_osGetAvatarHomeURI = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER - Allow_osNpcSetProfileAbout = ${OSSL|osslNPC} - Allow_osNpcSetProfileImage = ${OSSL|osslNPC} - Allow_osDie = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osAvatarName2Key = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osGetAvatarHomeURI = ${XEngine|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER ; ThreatLevel Moderate Allow_osDetectedCountry = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osDropAttachment = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osDropAttachmentAt = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osDropAttachment = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osDropAttachmentAt = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osGetAgentCountry = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridCustom = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridGatekeeperURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridHomeURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridLoginURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetGridName = true - Allow_osGetGridNick = true - Allow_osGetNumberOfAttachments = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetRegionStats = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetSimulatorMemory = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetSimulatorMemoryKB = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osMessageAttachments = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetOwnerSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osRequestURL = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osRequestSecureURL = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osGetGridGatekeeperURI = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osGetNumberOfAttachments = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osMessageAttachments = true + Allow_osRequestURL = true + Allow_osRequestSecureURL = true + Allow_osSetContentType = true + Allow_osSetSpeed = true ; ThreatLevel High - Allow_osCauseDamage = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osCauseHealing = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetHealth = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetHealRate = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceAttachToAvatar = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceAttachToAvatarFromInventory = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceCreateLink = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceDropAttachment = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osForceDropAttachmentAt = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetLinkPrimitiveParams = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetPhysicsEngineType = true - Allow_osGetRegionMapTexture = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetScriptEngineName = true - Allow_osGetSimulatorVersion = true - Allow_osMakeNotecard = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osMatchString = true - Allow_osNpcCreate = ${OSSL|osslNPC} - Allow_osNpcGetPos = ${OSSL|osslNPC} - Allow_osNpcGetRot = ${OSSL|osslNPC} - Allow_osNpcLoadAppearance = ${OSSL|osslNPC} - Allow_osNpcMoveTo = ${OSSL|osslNPC} - Allow_osNpcMoveToTarget = ${OSSL|osslNPC} - Allow_osNpcPlayAnimation = ${OSSL|osslNPC} - Allow_osNpcRemove = ${OSSL|osslNPC} - Allow_osNpcSaveAppearance = ${OSSL|osslNPC} - Allow_osNpcSay = ${OSSL|osslNPC} - Allow_osNpcSayTo = ${OSSL|osslNPC} - Allow_osNpcSetRot = ${OSSL|osslNPC} - Allow_osNpcShout = ${OSSL|osslNPC} - Allow_osNpcSit = ${OSSL|osslNPC} - Allow_osNpcStand = ${OSSL|osslNPC} - Allow_osNpcStopAnimation = ${OSSL|osslNPC} - Allow_osNpcStopMoveToTarget = ${OSSL|osslNPC} - Allow_osNpcTouch = ${OSSL|osslNPC} - Allow_osNpcWhisper = ${OSSL|osslNPC} - Allow_osOwnerSaveAppearance = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osCauseDamage = ESTATE_MANAGER,ESTATE_OWNER + Allow_osCauseHealing = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetHealth = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetHealRate = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osForceAttachToAvatar = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osForceAttachToAvatarFromInventory = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osForceDropAttachment = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osForceDropAttachmentAt = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osParcelJoin = ESTATE_MANAGER,ESTATE_OWNER + Allow_osParcelSetDetails = ESTATE_MANAGER,ESTATE_OWNER Allow_osParcelSubdivide = ESTATE_MANAGER,ESTATE_OWNER - Allow_osRegionRestart = ESTATE_MANAGER,ESTATE_OWNER Allow_osRegionNotice = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetProjectionParams = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER + Allow_osRegionRestart = ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetParcelDetails = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER Allow_osSetRegionWaterHeight = ESTATE_MANAGER,ESTATE_OWNER Allow_osSetStateEvents = false ; deprecated Allow_osSetTerrainHeight = ESTATE_MANAGER,ESTATE_OWNER @@ -198,31 +254,19 @@ ; Enabling this can allow forced animations which can trigger traumatic episodes in vulnerable populations. ; Similar things can be said for several of the 'force' functions. Enable with care and control. ; Some of these were added as early functionality for NPCs. This has been replaced with the NPC functions. - Allow_osAvatarPlayAnimation = false - Allow_osAvatarStopAnimation = false + Allow_osAvatarPlayAnimation = true + Allow_osAvatarStopAnimation = true Allow_osForceAttachToOtherAvatarFromInventory = false Allow_osForceDetachFromAvatar = false Allow_osForceOtherSit = false - ; The notecard functions can cause a lot of load on the region if over used - Allow_osGetNotecard = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetNotecardLine = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osGetNumberOfNotecardLines = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureURL = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureURLBlend = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetDynamicTextureURLBlendFace = ESTATE_MANAGER,ESTATE_OWNER - Allow_osSetRot = false - Allow_osSetParcelDetails = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osSetRot = ESTATE_OWNER, ESTATE_MANAGER ; ThreatLevel Severe Allow_osConsoleCommand = false - Allow_osKickAvatar = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osTeleportAgent = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER - Allow_osTeleportObject = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osGrantScriptPermissions = false + Allow_osKickAvatar = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER + Allow_osRevokeScriptPermissions = false + Allow_osTeleportAgent = ${XEngine|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER ; ThreatLevel Severe with additional internal restrictions Allow_osGetAgentIP = true ; always restricted to Administrators (true or false to disable) - Allow_osSetContentType = false - - -; Always available -; see http://opensimulator.org/wiki/Category:OSSL_Functions -- cgit v1.1