From afb347fbc0ae726ed352cc0b3cb10a483729639b Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 22:52:49 +1000 Subject: More script speed ups. Don't waste time collecting bogus statistics. At least I think they are bogus. --- .../Shared/Api/Implementation/CM_Api.cs | 1 - .../Shared/Api/Implementation/LSL_Api.cs | 533 --------------------- .../Shared/Api/Implementation/LS_Api.cs | 3 - .../Shared/Api/Implementation/OSSL_Api.cs | 3 - 4 files changed, 540 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs index 3509968..c848555 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/CM_Api.cs @@ -93,7 +93,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public string cmDetectedCountry(int number) { - m_host.AddScriptLPS(1); if(!m_CMFunctionsEnabled) return String.Empty; if(World.UserAccountService == null) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index bac1468..3a3703c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -446,7 +446,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Sleep(delay); } - protected virtual void Sleep(int delay) { if (m_item == null) // Some unit tests don't set this @@ -481,8 +480,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api [DebuggerNonUserCode] public void llResetScript() { - m_host.AddScriptLPS(1); - // We need to tell the URL module, if we hav one, to release // the allocated URLs if (m_UrlModule != null) @@ -497,7 +494,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if ((item = GetScriptByName(name)) == UUID.Zero) { - m_host.AddScriptLPS(1); Error("llResetOtherScript", "Can't find script '" + name + "'"); return; } @@ -505,7 +501,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api llResetScript(); else { - m_host.AddScriptLPS(1); m_ScriptEngine.ResetScript(item); } } @@ -514,8 +509,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID item; - m_host.AddScriptLPS(1); - if ((item = GetScriptByName(name)) != UUID.Zero) { return m_ScriptEngine.GetScriptState(item) ?1:0; @@ -533,8 +526,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { UUID item; - m_host.AddScriptLPS(1); - // These functions are supposed to be robust, // so get the state one step at a time. @@ -773,44 +764,37 @@ 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); return (double)Math.Sin(f); } public LSL_Float llCos(double f) { - m_host.AddScriptLPS(1); return (double)Math.Cos(f); } public LSL_Float llTan(double f) { - m_host.AddScriptLPS(1); return (double)Math.Tan(f); } public LSL_Float llAtan2(double x, double y) { - m_host.AddScriptLPS(1); return (double)Math.Atan2(x, y); } public LSL_Float llSqrt(double f) { - m_host.AddScriptLPS(1); return (double)Math.Sqrt(f); } public LSL_Float llPow(double fbase, double fexponent) { - m_host.AddScriptLPS(1); return (double)Math.Pow(fbase, fexponent); } public LSL_Integer llAbs(int i) { // changed to replicate LSL behaviour whereby minimum int value is returned untouched. - m_host.AddScriptLPS(1); if (i == Int32.MinValue) return i; else @@ -819,13 +803,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llFabs(double f) { - m_host.AddScriptLPS(1); return (double)Math.Abs(f); } public LSL_Float llFrand(double mag) { - m_host.AddScriptLPS(1); lock (Util.RandomClass) { return Util.RandomClass.NextDouble() * mag; @@ -834,33 +816,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llFloor(double f) { - m_host.AddScriptLPS(1); return (int)Math.Floor(f); } public LSL_Integer llCeil(double f) { - 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); 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); return LSL_Vector.Mag(v); } public LSL_Vector llVecNorm(LSL_Vector v) { - m_host.AddScriptLPS(1); return LSL_Vector.Norm(v); } @@ -874,7 +851,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llVecDist(LSL_Vector a, LSL_Vector b) { - m_host.AddScriptLPS(1); return VecDist(a, b); } @@ -884,7 +860,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llRot2Euler(LSL_Rotation q1) { - m_host.AddScriptLPS(1); LSL_Vector eul = new LSL_Vector(); double sqw = q1.s*q1.s; @@ -958,8 +933,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llEuler2Rot(LSL_Vector v) { - m_host.AddScriptLPS(1); - double x,y,z,s; v.x *= 0.5; v.y *= 0.5; @@ -985,7 +958,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llAxes2Rot(LSL_Vector fwd, LSL_Vector left, LSL_Vector up) { - m_host.AddScriptLPS(1); double s; double tr = fwd.x + left.y + up.z + 1.0; @@ -1040,8 +1012,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llRot2Fwd(LSL_Rotation r) { - 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; @@ -1065,8 +1035,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llRot2Left(LSL_Rotation r) { - 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; @@ -1090,7 +1058,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llRot2Up(LSL_Rotation r) { - 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; @@ -1115,7 +1082,6 @@ 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); /* This method is more accurate than the SL one, and thus causes problems for scripts that deal with the SL inaccuracy around 180-degrees -.- .._. @@ -1188,8 +1154,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llWhisper(int channelID, string text) { - m_host.AddScriptLPS(1); - if (text.Length > 1023) text = text.Substring(0, 1023); @@ -1215,8 +1179,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSay(int channelID, string text) { - m_host.AddScriptLPS(1); - if (channelID == 0) // m_SayShoutCount++; CheckSayShoutTime(); @@ -1244,8 +1206,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llShout(int channelID, string text) { - m_host.AddScriptLPS(1); - if (channelID == 0) // m_SayShoutCount++; CheckSayShoutTime(); @@ -1275,8 +1235,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (text.Length > 1023) text = text.Substring(0, 1023); - m_host.AddScriptLPS(1); - // debug channel is also sent to avatars if (channelID == ScriptBaseClass.DEBUG_CHANNEL) { @@ -1295,8 +1253,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (msg.Length > 1023) msg = msg.Substring(0, 1023); - m_host.AddScriptLPS(1); - if (channel == ScriptBaseClass.DEBUG_CHANNEL) return; @@ -1310,7 +1266,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llListen(int channelID, string name, string ID, string msg) { - m_host.AddScriptLPS(1); UUID keyID; UUID.TryParse(ID, out keyID); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); @@ -1322,7 +1277,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llListenControl(int number, int active) { - m_host.AddScriptLPS(1); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); if (wComm != null) wComm.ListenControl(m_item.ItemID, number, active); @@ -1330,7 +1284,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llListenRemove(int number) { - m_host.AddScriptLPS(1); IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); if (wComm != null) wComm.ListenRemove(m_item.ItemID, number); @@ -1338,7 +1291,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSensor(string name, string id, int type, double range, double arc) { - m_host.AddScriptLPS(1); UUID keyID = UUID.Zero; UUID.TryParse(id, out keyID); @@ -1347,7 +1299,6 @@ 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); UUID keyID = UUID.Zero; UUID.TryParse(id, out keyID); @@ -1356,7 +1307,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSensorRemove() { - m_host.AddScriptLPS(1); AsyncCommands.SensorRepeatPlugin.UnSetSenseRepeaterEvents(m_host.LocalId, m_item.ItemID); } @@ -1397,7 +1347,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llDetectedName(int number) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return String.Empty; @@ -1406,7 +1355,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llDetectedKey(int number) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return String.Empty; @@ -1415,7 +1363,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llDetectedOwner(int number) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return String.Empty; @@ -1424,7 +1371,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llDetectedType(int number) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return 0; @@ -1433,7 +1379,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llDetectedPos(int number) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return new LSL_Vector(); @@ -1442,7 +1387,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llDetectedVel(int number) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return new LSL_Vector(); @@ -1451,7 +1395,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llDetectedGrab(int number) { - m_host.AddScriptLPS(1); DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (parms == null) return new LSL_Vector(0, 0, 0); @@ -1461,7 +1404,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llDetectedRot(int number) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return new LSL_Rotation(); @@ -1470,7 +1412,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llDetectedGroup(int number) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (detectedParams == null) return new LSL_Integer(0); @@ -1481,7 +1422,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llDetectedLinkNumber(int number) { - m_host.AddScriptLPS(1); DetectParams parms = m_ScriptEngine.GetDetectParams(m_item.ItemID, number); if (parms == null) return new LSL_Integer(0); @@ -1494,7 +1434,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchBinormal(int index) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Vector(); @@ -1506,7 +1445,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Integer llDetectedTouchFace(int index) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Integer(-1); @@ -1518,7 +1456,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchNormal(int index) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Vector(); @@ -1530,7 +1467,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchPos(int index) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, index); if (detectedParams == null) return new LSL_Vector(); @@ -1542,7 +1478,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchST(int index) { - 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); @@ -1554,7 +1489,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llDetectedTouchUV(int index) { - 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); @@ -1564,13 +1498,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api [DebuggerNonUserCode] public virtual void llDie() { - m_host.AddScriptLPS(1); if (!m_host.ParentGroup.IsAttachment) throw new SelfDeleteException(); } public LSL_Float llGround(LSL_Vector offset) { - 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. @@ -1600,7 +1532,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llCloud(LSL_Vector offset) { - m_host.AddScriptLPS(1); float cloudCover = 0f; ICloudModule module = World.RequestModuleInterface(); if (module != null) @@ -1617,7 +1548,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llWind(LSL_Vector offset) { - m_host.AddScriptLPS(1); LSL_Vector wind = new LSL_Vector(0, 0, 0); IWindModule module = World.RequestModuleInterface(); if (module != null) @@ -1638,7 +1568,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (m_host == null || m_host.ParentGroup == null || m_host.ParentGroup.IsDeleted) return; - m_host.AddScriptLPS(1); int statusrotationaxis = 0; @@ -1755,7 +1684,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetStatus(int status) { - m_host.AddScriptLPS(1); // m_log.Debug(m_host.ToString() + " status is " + m_host.GetEffectiveObjectFlags().ToString()); switch (status) { @@ -1824,7 +1752,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llScaleByFactor(double scaling_factor) { - m_host.AddScriptLPS(1); SceneObjectGroup group = m_host.ParentGroup; if(scaling_factor < 1e-6) @@ -1849,7 +1776,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetMaxScaleFactor() { - m_host.AddScriptLPS(1); SceneObjectGroup group = m_host.ParentGroup; if (group == null || group.IsDeleted || group.inTransit) @@ -1860,7 +1786,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetMinScaleFactor() { - m_host.AddScriptLPS(1); SceneObjectGroup group = m_host.ParentGroup; if (group == null || group.IsDeleted || group.inTransit) @@ -1871,7 +1796,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetScale(LSL_Vector scale) { - m_host.AddScriptLPS(1); SetScale(m_host, scale); } @@ -1907,13 +1831,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetScale() { - 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.ClickAction = (byte)action; m_host.ParentGroup.HasGroupChanged = true; m_host.ScheduleFullUpdate(); @@ -1922,8 +1844,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetColor(LSL_Vector color, int face) { - m_host.AddScriptLPS(1); - SetColor(m_host, color, face); } @@ -1976,8 +1896,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetContentType(LSL_Key id, LSL_Integer type) { - m_host.AddScriptLPS(1); - if (m_UrlModule == null) return; @@ -2204,8 +2122,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetAlpha(int face) { - m_host.AddScriptLPS(1); - return GetAlpha(m_host, face); } @@ -2230,15 +2146,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetAlpha(double alpha, int face) { - m_host.AddScriptLPS(1); - SetAlpha(m_host, alpha, face); } public void llSetLinkAlpha(int linknumber, double alpha, int face) { - m_host.AddScriptLPS(1); - List parts = GetLinkParts(linknumber); if (parts.Count > 0) { @@ -2375,7 +2287,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetColor(int face) { - m_host.AddScriptLPS(1); return GetColor(m_host, face); } @@ -2422,15 +2333,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetTexture(string texture, int face) { - m_host.AddScriptLPS(1); SetTexture(m_host, texture, face); ScriptSleep(m_sleepMsOnSetTexture); } public void llSetLinkTexture(int linknumber, string texture, int face) { - m_host.AddScriptLPS(1); - List parts = GetLinkParts(linknumber); if (parts.Count > 0) { @@ -2487,8 +2395,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llScaleTexture(double u, double v, int face) { - m_host.AddScriptLPS(1); - ScaleTexture(m_host, u, v, face); ScriptSleep(m_sleepMsOnScaleTexture); } @@ -2529,7 +2435,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llOffsetTexture(double u, double v, int face) { - m_host.AddScriptLPS(1); OffsetTexture(m_host, u, v, face); ScriptSleep(m_sleepMsOnOffsetTexture); } @@ -2570,7 +2475,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRotateTexture(double rotation, int face) { - m_host.AddScriptLPS(1); RotateTexture(m_host, rotation, face); ScriptSleep(m_sleepMsOnRotateTexture); } @@ -2608,7 +2512,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetTexture(int face) { - m_host.AddScriptLPS(1); return GetTexture(m_host, face); } @@ -2650,8 +2553,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPos(LSL_Vector pos) { - m_host.AddScriptLPS(1); - SetPos(m_host, pos, true); ScriptSleep(m_sleepMsOnSetPos); @@ -2666,8 +2567,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// 1 if successful, 0 otherwise. public LSL_Integer llSetRegionPos(LSL_Vector pos) { - m_host.AddScriptLPS(1); - // BEGIN WORKAROUND // IF YOU GET REGION CROSSINGS WORKING WITH THIS FUNCTION, REPLACE THE WORKAROUND. // @@ -2782,20 +2681,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetPos() { - m_host.AddScriptLPS(1); return m_host.GetWorldPosition(); } public LSL_Vector llGetLocalPos() { - m_host.AddScriptLPS(1); return GetPartLocalPos(m_host); } protected LSL_Vector GetPartLocalPos(SceneObjectPart part) { - m_host.AddScriptLPS(1); - Vector3 pos; if (!part.IsRoot) @@ -2817,8 +2712,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetRot(LSL_Rotation rot) { - 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)) { @@ -2840,7 +2733,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetLocalRot(LSL_Rotation rot) { - m_host.AddScriptLPS(1); SetRot(m_host, rot); ScriptSleep(m_sleepMsOnSetLocalRot); } @@ -2902,7 +2794,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return llGetRootRotation(); } - m_host.AddScriptLPS(1); Quaternion q = m_host.GetWorldRotation(); if (m_host.ParentGroup != null && m_host.ParentGroup.AttachmentPoint != 0) @@ -2967,15 +2858,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api private LSL_Rotation GetPartLocalRot(SceneObjectPart part) { - 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); - if (!m_host.ParentGroup.IsDeleted) { if (local != 0) @@ -2989,8 +2877,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { LSL_Vector force = new LSL_Vector(0.0, 0.0, 0.0); - m_host.AddScriptLPS(1); - if (!m_host.ParentGroup.IsDeleted) { force = m_host.ParentGroup.RootPart.GetForce(); @@ -3001,55 +2887,46 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetVelocity(LSL_Vector vel, int local) { - 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.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); return m_host.ParentGroup.registerTargetWaypoint(position, (float)range); } public void llTargetRemove(int number) { - m_host.AddScriptLPS(1); m_host.ParentGroup.unregisterTargetWaypoint(number); } public LSL_Integer llRotTarget(LSL_Rotation rot, double error) { - m_host.AddScriptLPS(1); return m_host.ParentGroup.registerRotTargetWaypoint(rot, (float)error); } public void llRotTargetRemove(int number) { - m_host.AddScriptLPS(1); m_host.ParentGroup.unregisterRotTargetWaypoint(number); } public void llMoveToTarget(LSL_Vector target, double tau) { - m_host.AddScriptLPS(1); m_host.MoveToTarget(target, (float)tau); } public void llStopMoveToTarget() { - m_host.AddScriptLPS(1); m_host.StopMoveToTarget(); } public void llApplyImpulse(LSL_Vector force, int local) { - m_host.AddScriptLPS(1); //No energy force yet Vector3 v = force; if (v.Length() > 20000.0f) @@ -3063,26 +2940,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llApplyRotationalImpulse(LSL_Vector force, int local) { - 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.ParentGroup.RootPart.SetAngularImpulse(torque, local != 0); } public LSL_Vector llGetTorque() { - 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); llSetForce(force, local); llSetTorque(torque, local); } @@ -3090,8 +2962,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetVel() { - m_host.AddScriptLPS(1); - Vector3 vel = Vector3.Zero; if (m_host.ParentGroup.IsAttachment) @@ -3110,46 +2980,38 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetAccel() { - m_host.AddScriptLPS(1); - return new LSL_Vector(m_host.Acceleration); } public LSL_Vector llGetOmega() { - 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); return (double)((DateTime.Now.TimeOfDay.TotalMilliseconds / 1000) % (3600 * 4)); } public LSL_Float llGetWallclock() { - m_host.AddScriptLPS(1); return DateTime.Now.TimeOfDay.TotalSeconds; } public LSL_Float llGetTime() { - 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_timer = Util.GetTimeStampMS(); } public LSL_Float llGetAndResetTime() { - m_host.AddScriptLPS(1); double now = Util.GetTimeStampMS(); double ScriptTime = now - m_timer; m_timer = now; @@ -3158,7 +3020,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSound(string sound, double volume, int queue, int loop) { - m_host.AddScriptLPS(1); Deprecated("llSound", "Use llPlaySound instead"); } @@ -3166,8 +3027,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // 20080530 Updated to remove code duplication public void llPlaySound(string sound, double volume) { - m_host.AddScriptLPS(1); - // send the sound, once, to all clients in range if (m_SoundModule != null) { @@ -3181,7 +3040,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoopSound(string sound, double volume) { - m_host.AddScriptLPS(1); if (m_SoundModule != null) { m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), @@ -3191,7 +3049,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoopSoundMaster(string sound, double volume) { - m_host.AddScriptLPS(1); if (m_SoundModule != null) { m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), @@ -3201,7 +3058,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoopSoundSlave(string sound, double volume) { - m_host.AddScriptLPS(1); if (m_SoundModule != null) { m_SoundModule.LoopSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), @@ -3211,8 +3067,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPlaySoundSlave(string sound, double volume) { - m_host.AddScriptLPS(1); - // send the sound, once, to all clients in range if (m_SoundModule != null) { @@ -3224,7 +3078,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llTriggerSound(string sound, double volume) { - m_host.AddScriptLPS(1); // send the sound, once, to all clients in rangeTrigger or play an attached sound in this part's inventory. if (m_SoundModule != null) { @@ -3236,15 +3089,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopSound() { - m_host.AddScriptLPS(1); - if (m_SoundModule != null) m_SoundModule.StopSound(m_host.UUID); } public void llPreloadSound(string sound) { - m_host.AddScriptLPS(1); if (m_SoundModule != null) m_SoundModule.PreloadSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), 0); ScriptSleep(m_sleepMsOnPreloadSound); @@ -3258,8 +3108,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llGetSubString(string src, int start, int end) { - m_host.AddScriptLPS(1); - // Normalize indices (if negative). // After normlaization they may still be // negative, but that is now relative to @@ -3352,8 +3200,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llDeleteSubString(string src, int start, int end) { - m_host.AddScriptLPS(1); - // Normalize indices (if negative). // After normlaization they may still be // negative, but that is now relative to @@ -3433,8 +3279,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llInsertString(string dest, int index, string src) { - m_host.AddScriptLPS(1); - // Normalize indices (if negative). // After normlaization they may still be // negative, but that is now relative to @@ -3470,13 +3314,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llToUpper(string src) { - m_host.AddScriptLPS(1); return src.ToUpper(); } public LSL_String llToLower(string src) { - m_host.AddScriptLPS(1); return src.ToLower(); } @@ -3484,8 +3326,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { Util.FireAndForget(x => { - m_host.AddScriptLPS(1); - if (m_item.PermsGranter == UUID.Zero) return; @@ -3522,28 +3362,24 @@ 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); Deprecated("llMakeExplosion", "Use llParticleSystem instead"); 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); Deprecated("llMakeFountain", "Use llParticleSystem instead"); 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); Deprecated("llMakeSmoke", "Use llParticleSystem instead"); 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); Deprecated("llMakeFire", "Use llParticleSystem instead"); ScriptSleep(m_sleepMsOnMakeFire); } @@ -3555,7 +3391,6 @@ 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); if (Double.IsNaN(rot.x) || Double.IsNaN(rot.y) || Double.IsNaN(rot.z) || Double.IsNaN(rot.s)) return; @@ -3634,8 +3469,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLookAt(LSL_Vector target, double strength, double damping) { - m_host.AddScriptLPS(1); - // Get the normalized vector to the target LSL_Vector from = llGetPos(); @@ -3682,7 +3515,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopLookAt() { - m_host.AddScriptLPS(1); m_host.StopLookAt(); } @@ -3690,7 +3522,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (sec != 0.0 && sec < m_MinTimerInterval) sec = m_MinTimerInterval; - m_host.AddScriptLPS(1); // Setting timer repeat AsyncCommands.TimerPlugin.SetTimerEvent(m_host.LocalId, m_item.ItemID, sec); } @@ -3698,15 +3529,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public virtual void llSleep(double sec) { // m_log.Info("llSleep snoozing " + sec + "s."); - m_host.AddScriptLPS(1); - Sleep((int)(sec * 1000)); } public LSL_Float llGetMass() { - m_host.AddScriptLPS(1); - if (m_host.ParentGroup.IsAttachment) { ScenePresence attachedAvatar = World.GetScenePresence(m_host.ParentGroup.AttachedAvatar); @@ -3741,7 +3568,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionFilter(string name, string id, int accept) { - m_host.AddScriptLPS(1); m_host.CollisionFilter.Clear(); UUID objectID; @@ -3768,14 +3594,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - - m_host.AddScriptLPS(1); } public void llReleaseControls() { - m_host.AddScriptLPS(1); - if (m_item.PermsGranter != UUID.Zero) { ScenePresence presence = World.GetScenePresence(m_item.PermsGranter); @@ -3795,7 +3617,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llReleaseURL(string url) { - m_host.AddScriptLPS(1); if (m_UrlModule != null) m_UrlModule.ReleaseURL(url); } @@ -3843,8 +3664,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAttachToAvatar(int attachmentPoint) { - m_host.AddScriptLPS(1); - if (m_item.PermsGranter != m_host.OwnerID) return; @@ -3854,8 +3673,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llDetachFromAvatar() { - m_host.AddScriptLPS(1); - if (m_host.ParentGroup.AttachmentPoint == 0) return; @@ -3868,26 +3685,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llTakeCamera(string avatar) { - m_host.AddScriptLPS(1); Deprecated("llTakeCamera", "Use llSetCameraParams instead"); } public void llReleaseCamera(string avatar) { - m_host.AddScriptLPS(1); Deprecated("llReleaseCamera", "Use llClearCameraParams instead"); } public LSL_String llGetOwner() { - m_host.AddScriptLPS(1); - return m_host.OwnerID.ToString(); } public void llInstantMessage(string user, string message) { - m_host.AddScriptLPS(1); UUID result; if (!UUID.TryParse(user, out result) || result == UUID.Zero) { @@ -3946,7 +3758,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llEmail(string address, string subject, string message) { - m_host.AddScriptLPS(1); IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface(); if (emailModule == null) { @@ -3984,7 +3795,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llGetNextEmail(string address, string subject) { - m_host.AddScriptLPS(1); IEmailModule emailModule = m_ScriptEngine.World.RequestModuleInterface(); if (emailModule == null) { @@ -4012,20 +3822,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetKey() { - m_host.AddScriptLPS(1); return m_host.UUID.ToString(); } public LSL_Key llGenerateKey() { - m_host.AddScriptLPS(1); return UUID.Random().ToString(); } public void llSetBuoyancy(double buoyancy) { - m_host.AddScriptLPS(1); - if (!m_host.ParentGroup.IsDeleted) { m_host.ParentGroup.RootPart.SetBuoyancy((float)buoyancy); @@ -4040,8 +3846,6 @@ 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); - PIDHoverType hoverType = PIDHoverType.Ground; if (water != 0) { @@ -4052,13 +3856,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopHover() { - m_host.AddScriptLPS(1); m_host.SetHoverHeight(0f, PIDHoverType.Ground, 0f); } public void llMinEventDelay(double delay) { - m_host.AddScriptLPS(1); try { m_ScriptEngine.SetMinEventDelay(m_item.ItemID, delay); @@ -4072,14 +3874,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSoundPreload(string sound) { - m_host.AddScriptLPS(1); Deprecated("llSoundPreload", "Use llPreloadSound instead"); } public void llRotLookAt(LSL_Rotation target, double strength, double damping) { - 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 SceneObjectGroup sog = m_host.ParentGroup; @@ -4098,7 +3897,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llStringLength(string str) { - m_host.AddScriptLPS(1); if (str.Length > 0) { return str.Length; @@ -4111,8 +3909,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStartAnimation(string anim) { - m_host.AddScriptLPS(1); - if (m_item.PermsGranter == UUID.Zero) return; @@ -4134,8 +3930,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llStopAnimation(string anim) { - m_host.AddScriptLPS(1); - if (m_item.PermsGranter == UUID.Zero) return; @@ -4157,17 +3951,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPointAt(LSL_Vector pos) { - m_host.AddScriptLPS(1); } public void llStopPointAt() { - m_host.AddScriptLPS(1); } public void llTargetOmega(LSL_Vector axis, double spinrate, double gain) { - m_host.AddScriptLPS(1); TargetOmega(m_host, axis, spinrate, gain); } @@ -4181,7 +3972,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetStartParameter() { - m_host.AddScriptLPS(1); return m_ScriptEngine.GetStartParameter(m_item.ItemID); } @@ -4210,8 +4000,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_item.PermsGranter != agentID || (perm & ScriptBaseClass.PERMISSION_TAKE_CONTROLS) == 0) llReleaseControls(); - m_host.AddScriptLPS(1); - int implicitPerms = 0; if (m_host.ParentGroup.IsAttachment && (UUID)agent == m_host.ParentGroup.AttachedAvatar) @@ -4338,15 +4126,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetPermissionsKey() { - m_host.AddScriptLPS(1); - return m_item.PermsGranter.ToString(); } public LSL_Integer llGetPermissions() { - m_host.AddScriptLPS(1); - int perms = m_item.PermsMask; if (m_automaticLinkPermission) @@ -4357,8 +4141,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetLinkNumber() { - m_host.AddScriptLPS(1); - if (m_host.ParentGroup.PrimCount > 1) { return m_host.LinkNum; @@ -4385,8 +4167,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCreateLink(string target, int parent) { - m_host.AddScriptLPS(1); - UUID targetID; if (!UUID.TryParse(target, out targetID)) @@ -4449,14 +4229,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (client != null) parentPrim.SendPropertiesToClient(client); - - ScriptSleep(m_sleepMsOnCreateLink); } public void llBreakLink(int linknum) { - m_host.AddScriptLPS(1); - if ((m_item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 && !m_automaticLinkPermission) { @@ -4556,8 +4332,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llBreakAllLinks() { - m_host.AddScriptLPS(1); - TaskInventoryItem item = m_item; if ((item.PermsMask & ScriptBaseClass.PERMISSION_CHANGE_LINKS) == 0 @@ -4589,7 +4363,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetLinkKey(int linknum) { - m_host.AddScriptLPS(1); SceneObjectPart part = m_host.ParentGroup.GetLinkNumPart(linknum); if (part != null) { @@ -4655,8 +4428,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llGetLinkName(int linknum) { - m_host.AddScriptLPS(1); - ISceneEntity entity = GetLinkEntity(m_host, linknum); if (entity != null) @@ -4667,7 +4438,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetInventoryNumber(int type) { - m_host.AddScriptLPS(1); int count = 0; m_host.TaskInventory.LockItemsForRead(true); @@ -4685,7 +4455,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetInventoryName(int type, int number) { - m_host.AddScriptLPS(1); ArrayList keys = new ArrayList(); m_host.TaskInventory.LockItemsForRead(true); @@ -4712,15 +4481,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetEnergy() { - m_host.AddScriptLPS(1); // TODO: figure out real energy value return 1.0f; } public void llGiveInventory(string destination, string inventory) { - m_host.AddScriptLPS(1); - UUID destId = UUID.Zero; if (!UUID.TryParse(destination, out destId)) @@ -4811,8 +4577,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api [DebuggerNonUserCode] public void llRemoveInventory(string name) { - m_host.AddScriptLPS(1); - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); if (item == null) @@ -4826,7 +4590,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetText(string text, LSL_Vector color, double alpha) { - m_host.AddScriptLPS(1); Vector3 av3 = Util.Clip(color, 0.0f, 1.0f); byte[] data; data = Util.StringToBytes256(text); @@ -4836,13 +4599,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llWater(LSL_Vector offset) { - m_host.AddScriptLPS(1); return World.RegionInfo.RegionSettings.WaterHeight; } public void llPassTouches(int pass) { - m_host.AddScriptLPS(1); if (pass != 0) m_host.PassTouches = true; else @@ -4851,8 +4612,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llRequestAgentData(string id, int data) { - m_host.AddScriptLPS(1); - UUID uuid; if (UUID.TryParse(id, out uuid)) { @@ -4957,7 +4716,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands. DataserverPlugin.DataserverReply(rq.ToString(), reply); - ScriptSleep(m_sleepMsOnRequestAgentData); return tid.ToString(); } else @@ -4969,8 +4727,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llRequestInventoryData(string name) { - m_host.AddScriptLPS(1); - foreach (TaskInventoryItem item in m_host.Inventory.GetInventoryItems()) { if (item.Type == 3 && item.Name == name) @@ -5007,13 +4763,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetDamage(double damage) { - m_host.AddScriptLPS(1); m_host.ParentGroup.Damage = (float)damage; } public void llTeleportAgentHome(string agent) { - m_host.AddScriptLPS(1); UUID agentId = new UUID(); if (UUID.TryParse(agent, out agentId)) { @@ -5046,7 +4800,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) { - m_host.AddScriptLPS(1); UUID agentId = new UUID(); if (UUID.TryParse(agent, out agentId)) @@ -5089,7 +4842,6 @@ 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); UUID agentId = new UUID(); ulong regionHandle = Util.RegionWorldLocToHandle((uint)global_coords.x, (uint)global_coords.y); @@ -5154,7 +4906,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (dm == null) return; - m_host.AddScriptLPS(1); UUID av = new UUID(); if (!UUID.TryParse(agent,out av)) { @@ -5179,7 +4930,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llModifyLand(int action, int brush) { - m_host.AddScriptLPS(1); ITerrainModule tm = m_ScriptEngine.World.RequestModuleInterface(); if (tm != null) { @@ -5189,8 +4939,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCollisionSound(string impact_sound, double impact_volume) { - m_host.AddScriptLPS(1); - if(impact_sound == "") { m_host.CollisionSoundVolume = (float)impact_volume; @@ -5217,7 +4965,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetAnimation(string id) { // This should only return a value if the avatar is in the same region - m_host.AddScriptLPS(1); UUID avatar = (UUID)id; ScenePresence presence = World.GetScenePresence(avatar); if (presence == null) @@ -5245,8 +4992,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llMessageLinked(int linknumber, int num, string msg, string id) { - m_host.AddScriptLPS(1); - List parts = GetLinkParts(linknumber); UUID partItemID; @@ -5276,7 +5021,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPushObject(string target, LSL_Vector impulse, LSL_Vector ang_impulse, int local) { - m_host.AddScriptLPS(1); bool pushrestricted = World.RegionInfo.RegionSettings.RestrictPushing; bool pushAllowed = false; @@ -5443,7 +5187,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llPassCollisions(int pass) { - m_host.AddScriptLPS(1); if (pass == 0) { m_host.PassCollisions = false; @@ -5456,15 +5199,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetScriptName() { - m_host.AddScriptLPS(1); - return m_item.Name != null ? m_item.Name : String.Empty; } public LSL_Integer llGetLinkNumberOfSides(int link) { - m_host.AddScriptLPS(1); - SceneObjectPart linkedPart; if (link == ScriptBaseClass.LINK_ROOT) @@ -5479,8 +5218,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetNumberOfSides() { - m_host.AddScriptLPS(1); - return m_host.GetNumberOfSides(); } @@ -5518,8 +5255,6 @@ 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); - double x, y, z, s, t; s = Math.Cos(angle * 0.5); @@ -5539,8 +5274,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llRot2Axis(LSL_Rotation rot) { - m_host.AddScriptLPS(1); - rot.Normalize(); double s = Math.Sqrt(1 - rot.s * rot.s); @@ -5557,8 +5290,6 @@ 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); - rot.Normalize(); double angle = 2 * Math.Acos(rot.s); @@ -5570,21 +5301,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llAcos(double val) { - m_host.AddScriptLPS(1); return (double)Math.Acos(val); } public LSL_Float llAsin(double val) { - 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); - 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); double aa_bb = aa * bb; @@ -5597,8 +5324,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetInventoryKey(string name) { - m_host.AddScriptLPS(1); - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); if (item == null) @@ -5616,8 +5341,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAllowInventoryDrop(int add) { - m_host.AddScriptLPS(1); - if (add != 0) m_host.ParentGroup.RootPart.AllowedDrop = true; else @@ -5629,8 +5352,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetSunDirection() { - m_host.AddScriptLPS(1); - LSL_Vector SunDoubleVector3; Vector3 SunFloatVector3; @@ -5646,7 +5367,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetTextureOffset(int face) { - m_host.AddScriptLPS(1); return GetTextureOffset(m_host, face); } @@ -5673,7 +5393,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetTextureScale(int side) { - m_host.AddScriptLPS(1); Primitive.TextureEntry tex = m_host.Shape.Textures; LSL_Vector scale; if (side == -1) @@ -5688,7 +5407,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetTextureRot(int face) { - m_host.AddScriptLPS(1); return GetTextureRot(m_host, face); } @@ -5711,13 +5429,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llSubStringIndex(string source, string pattern) { - m_host.AddScriptLPS(1); return source.IndexOf(pattern); } public LSL_String llGetOwnerKey(string id) { - m_host.AddScriptLPS(1); UUID key = new UUID(); if (UUID.TryParse(id, out key)) { @@ -5742,15 +5458,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetCenterOfMass() { - 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); - if (stride <= 0) { stride = 1; @@ -5760,14 +5472,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetListLength(LSL_List src) { - m_host.AddScriptLPS(1); - return src.Length; } public LSL_Integer llList2Integer(LSL_List src, int index) { - m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5797,7 +5506,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llList2Float(LSL_List src, int index) { - m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5852,7 +5560,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llList2String(LSL_List src, int index) { - m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5864,7 +5571,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Key llList2Key(LSL_List src, int index) { - m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5892,7 +5598,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llList2Vector(LSL_List src, int index) { - m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5921,7 +5626,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llList2Rot(LSL_List src, int index) { - m_host.AddScriptLPS(1); if (index < 0) index = src.Length + index; @@ -5948,7 +5652,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llList2List(LSL_List src, int start, int end) { - m_host.AddScriptLPS(1); return src.GetSublist(start, end); } @@ -5959,7 +5662,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetListEntryType(LSL_List src, int index) { - m_host.AddScriptLPS(1); if (index < 0) { index = src.Length + index; @@ -6003,8 +5705,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_String llList2CSV(LSL_List src) { - m_host.AddScriptLPS(1); - return string.Join(", ", (new List(src.Data)).ConvertAll(o => { @@ -6028,8 +5728,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int start = 0; int length = 0; - m_host.AddScriptLPS(1); - for (int i = 0; i < src.Length; i++) { switch (src[i]) @@ -6085,8 +5783,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int chunkk; int[] chunks; - m_host.AddScriptLPS(1); - if (stride <= 0) { stride = 1; @@ -6157,8 +5853,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int[] ei = new int[2]; bool twopass = false; - m_host.AddScriptLPS(1); - // First step is always to deal with negative indices if (start < 0) @@ -6238,8 +5932,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetRegionAgentCount() { - m_host.AddScriptLPS(1); - int count = 0; World.ForEachRootScenePresence(delegate(ScenePresence sp) { count++; @@ -6250,13 +5942,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetRegionCorner() { - 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); if (name == "agent_limit") { return World.RegionInfo.RegionSettings.AgentLimit.ToString(); @@ -6340,8 +6030,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_List pref; LSL_List suff; - m_host.AddScriptLPS(1); - if (index < 0) { index = index+dest.Length; @@ -6394,8 +6082,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int index = -1; int length = src.Length - test.Length + 1; - m_host.AddScriptLPS(1); - // If either list is empty, do not match if (src.Length != 0 && test.Length != 0) { @@ -6435,19 +6121,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetObjectName() { - 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.Name = name != null ? name : String.Empty; } public LSL_String llGetDate() { - m_host.AddScriptLPS(1); DateTime date = DateTime.Now.ToUniversalTime(); string result = date.ToString("yyyy-MM-dd"); return result; @@ -6455,8 +6138,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llEdgeOfWorld(LSL_Vector pos, LSL_Vector dir) { - m_host.AddScriptLPS(1); - if(dir.x == 0 && dir.y == 0) return 1; // SL wiki @@ -6522,8 +6203,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Integer llGetAgentInfo(string id) { - m_host.AddScriptLPS(1); - UUID key = new UUID(); if (!UUID.TryParse(id, out key)) { @@ -6630,7 +6309,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetAgentLanguage(string id) { // This should only return a value if the avatar is in the same region, but eh. idc. - m_host.AddScriptLPS(1); if (World.AgentPreferencesService == null) { Error("llGetAgentLanguage", "No AgentPreferencesService present"); @@ -6657,8 +6335,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_List llGetAgentList(LSL_Integer scope, LSL_List options) { - m_host.AddScriptLPS(1); - // do our bit masks part bool noNPC = (scope & ScriptBaseClass.AGENT_LIST_EXCLUDENPC) !=0; @@ -6740,20 +6416,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAdjustSoundVolume(double volume) { - m_host.AddScriptLPS(1); m_host.AdjustSoundGain(volume); ScriptSleep(m_sleepMsOnAdjustSoundVolume); } public void llSetSoundRadius(double radius) { - m_host.AddScriptLPS(1); m_host.SoundRadius = radius; } public LSL_String llKey2Name(string id) { - m_host.AddScriptLPS(1); UUID key = new UUID(); if (UUID.TryParse(id,out key)) { @@ -6777,15 +6450,11 @@ 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); - 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); - List parts = GetLinkParts(linknumber); try @@ -6825,7 +6494,6 @@ 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); if (m_SoundModule != null) { m_SoundModule.TriggerSoundLimited(m_host.UUID, @@ -6836,7 +6504,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llEjectFromLand(string pest) { - m_host.AddScriptLPS(1); UUID agentID = new UUID(); if (UUID.TryParse(pest, out agentID)) { @@ -6866,7 +6533,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llOverMyLand(string id) { - m_host.AddScriptLPS(1); UUID key = new UUID(); if (UUID.TryParse(id, out key)) { @@ -6893,7 +6559,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetLandOwnerAt(LSL_Vector pos) { - m_host.AddScriptLPS(1); ILandObject land = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); if (land == null) return UUID.Zero.ToString(); @@ -6907,7 +6572,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Vector llGetAgentSize(string id) { - m_host.AddScriptLPS(1); ScenePresence avatar = World.GetScenePresence((UUID)id); LSL_Vector agentSize; if (avatar == null || avatar.IsChildAgent) // Fail if not in the same region @@ -6925,7 +6589,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llSameGroup(string id) { - m_host.AddScriptLPS(1); UUID uuid = new UUID(); if (!UUID.TryParse(id, out uuid)) return new LSL_Integer(0); @@ -6973,8 +6636,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llUnSit(string id) { - m_host.AddScriptLPS(1); - UUID key = new UUID(); if (UUID.TryParse(id, out key)) { @@ -7014,8 +6675,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGroundSlope(LSL_Vector offset) { - 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); @@ -7035,7 +6694,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGroundNormal(LSL_Vector offset) { - m_host.AddScriptLPS(1); Vector3 pos = m_host.GetWorldPosition() + (Vector3)offset; // Clamp to valid position if (pos.X < 0) @@ -7085,21 +6743,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGroundContour(LSL_Vector offset) { - 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); return m_host.ParentGroup.AttachmentPoint; } public LSL_List llGetAttachedList(string id) { - m_host.AddScriptLPS(1); - ScenePresence av = World.GetScenePresence((UUID)id); if (av == null || av.IsDeleted) @@ -7125,14 +6779,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public virtual LSL_Integer llGetFreeMemory() { - m_host.AddScriptLPS(1); // Make scripts designed for Mono happy return 65536; } public LSL_Integer llGetFreeURLs() { - m_host.AddScriptLPS(1); if (m_UrlModule != null) return new LSL_Integer(m_UrlModule.GetFreeUrls()); return new LSL_Integer(0); @@ -7141,13 +6793,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetRegionName() { - m_host.AddScriptLPS(1); return World.RegionInfo.RegionName; } public LSL_Float llGetRegionTimeDilation() { - m_host.AddScriptLPS(1); return (double)World.TimeDilation; } @@ -7156,7 +6806,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Float llGetRegionFPS() { - m_host.AddScriptLPS(1); return World.StatsReporter.LastReportedSimFPS; } @@ -7234,8 +6883,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLinkParticleSystem(int linknumber, LSL_List rules) { - m_host.AddScriptLPS(1); - List parts = GetLinkParts(linknumber); foreach (SceneObjectPart part in parts) @@ -7246,7 +6893,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llParticleSystem(LSL_List rules) { - m_host.AddScriptLPS(1); SetParticleSystem(m_host, rules, "llParticleSystem"); } @@ -7663,7 +7309,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llGroundRepel(double height, int water, double tau) { - m_host.AddScriptLPS(1); if (m_host.PhysActor != null) { float ground = (float)llGround(new LSL_Types.Vector3(0, 0, 0)); @@ -7688,8 +7333,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llGiveInventoryList(string destination, string category, LSL_List inventory) { - m_host.AddScriptLPS(1); - UUID destID; if (!UUID.TryParse(destination, out destID)) return; @@ -7743,8 +7386,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetVehicleType(int type) { - m_host.AddScriptLPS(1); - if (!m_host.ParentGroup.IsDeleted) { m_host.ParentGroup.RootPart.SetVehicleType(type); @@ -7755,8 +7396,6 @@ 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); - if (!m_host.ParentGroup.IsDeleted) { m_host.ParentGroup.RootPart.SetVehicleFloatParam(param, (float)value); @@ -7767,8 +7406,6 @@ 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); - if (!m_host.ParentGroup.IsDeleted) { m_host.ParentGroup.RootPart.SetVehicleVectorParam(param, vec); @@ -7779,8 +7416,6 @@ 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); - if (!m_host.ParentGroup.IsDeleted) { m_host.ParentGroup.RootPart.SetVehicleRotationParam(param, rot); @@ -7789,8 +7424,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetVehicleFlags(int flags) { - m_host.AddScriptLPS(1); - if (!m_host.ParentGroup.IsDeleted) { m_host.ParentGroup.RootPart.SetVehicleFlags(flags, false); @@ -7799,8 +7432,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoveVehicleFlags(int flags) { - m_host.AddScriptLPS(1); - if (!m_host.ParentGroup.IsDeleted) { m_host.ParentGroup.RootPart.SetVehicleFlags(flags, true); @@ -7820,13 +7451,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSitTarget(LSL_Vector offset, LSL_Rotation rot) { - 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); if (link == ScriptBaseClass.LINK_ROOT) SitTarget(m_host.ParentGroup.RootPart, offset, rot); else if (link == ScriptBaseClass.LINK_THIS) @@ -7843,14 +7472,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llAvatarOnSitTarget() { - m_host.AddScriptLPS(1); return m_host.SitTargetAvatar.ToString(); } // http://wiki.secondlife.com/wiki/LlAvatarOnLinkSitTarget public LSL_String llAvatarOnLinkSitTarget(int linknum) { - m_host.AddScriptLPS(1); if(linknum == ScriptBaseClass.LINK_SET || linknum == ScriptBaseClass.LINK_ALL_CHILDREN || linknum == ScriptBaseClass.LINK_ALL_OTHERS || @@ -7866,7 +7493,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAddToLandPassList(string avatar, double hours) { - m_host.AddScriptLPS(1); UUID key; ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); @@ -7903,24 +7529,20 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); } } - ScriptSleep(m_sleepMsOnAddToLandPassList); } public void llSetTouchText(string text) { - m_host.AddScriptLPS(1); m_host.TouchName = text; } public void llSetSitText(string text) { - m_host.AddScriptLPS(1); m_host.SitName = text; } public void llSetCameraEyeOffset(LSL_Vector offset) { - m_host.AddScriptLPS(1); m_host.SetCameraEyeOffset(offset); if (m_host.ParentGroup.RootPart.GetCameraEyeOffset() == Vector3.Zero) @@ -7929,7 +7551,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetCameraAtOffset(LSL_Vector offset) { - m_host.AddScriptLPS(1); m_host.SetCameraAtOffset(offset); if (m_host.ParentGroup.RootPart.GetCameraAtOffset() == Vector3.Zero) @@ -7938,8 +7559,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetLinkCamera(LSL_Integer link, LSL_Vector eye, LSL_Vector at) { - m_host.AddScriptLPS(1); - if (link == ScriptBaseClass.LINK_SET || link == ScriptBaseClass.LINK_ALL_CHILDREN || link == ScriptBaseClass.LINK_ALL_OTHERS) return; @@ -7968,7 +7587,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llDumpList2String(LSL_List src, string seperator) { - m_host.AddScriptLPS(1); if (src.Length == 0) { return String.Empty; @@ -7984,7 +7602,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llScriptDanger(LSL_Vector pos) { - m_host.AddScriptLPS(1); bool result = World.LSLScriptDanger(m_host, pos); if (result) { @@ -8003,7 +7620,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (dm == null) return; - m_host.AddScriptLPS(1); UUID av = new UUID(); if (!UUID.TryParse(avatar,out av)) { @@ -8059,29 +7675,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llVolumeDetect(int detect) { - m_host.AddScriptLPS(1); - if (!m_host.ParentGroup.IsDeleted) m_host.ParentGroup.ScriptSetVolumeDetect(detect != 0); } public void llRemoteLoadScript(string target, string name, int running, int start_param) { - m_host.AddScriptLPS(1); Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); ScriptSleep(m_sleepMsOnRemoteLoadScript); } public void llSetRemoteScriptAccessPin(int pin) { - 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); - UUID destId = UUID.Zero; if (!UUID.TryParse(target, out destId)) @@ -8124,7 +7734,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llOpenRemoteDataChannel() { - m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) { @@ -8155,7 +7764,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) { - m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); ScriptSleep(m_sleepMsOnSendRemoteData); if (xmlrpcMod == null) @@ -8165,7 +7773,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoteDataReply(string channel, string message_id, string sdata, int idata) { - m_host.AddScriptLPS(1); IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); if (xmlrpcMod != null) xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); @@ -8174,8 +7781,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llCloseRemoteDataChannel(string channel) { - m_host.AddScriptLPS(1); - IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface(); if (xmlRpcRouter != null) { @@ -8190,13 +7795,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llMD5String(string src, int nonce) { - 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); return Util.SHA1Hash(src, Encoding.UTF8).ToLower(); } @@ -8588,8 +8191,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPrimitiveParams(LSL_List rules) { - m_host.AddScriptLPS(1); - SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); ScriptSleep(m_sleepMsOnSetPrimitiveParams); @@ -8597,8 +8198,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) { - m_host.AddScriptLPS(1); - SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); @@ -8606,8 +8205,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) { - m_host.AddScriptLPS(1); - SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParamsFast"); } @@ -10359,7 +9956,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llStringToBase64(string str) { - m_host.AddScriptLPS(1); try { byte[] encData_byte; @@ -10376,7 +9972,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llBase64ToString(string str) { - m_host.AddScriptLPS(1); try { byte[] b = Convert.FromBase64String(str); @@ -10396,8 +9991,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; ScriptSleep(300); - m_host.AddScriptLPS(1); - if (str1 == String.Empty) return String.Empty; if (str2 == String.Empty) @@ -10493,26 +10086,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoteDataSetRegion() { - m_host.AddScriptLPS(1); Deprecated("llRemoteDataSetRegion", "Use llOpenRemoteDataChannel instead"); } public LSL_Float llLog10(double val) { - m_host.AddScriptLPS(1); return (double)Math.Log10(val); } public LSL_Float llLog(double val) { - m_host.AddScriptLPS(1); return (double)Math.Log(val); } public LSL_List llGetAnimationList(string id) { - m_host.AddScriptLPS(1); - LSL_List l = new LSL_List(); ScenePresence av = World.GetScenePresence((UUID)id); if (av == null || av.IsChildAgent) // only if in the region @@ -10526,8 +10114,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetParcelMusicURL(string url) { - m_host.AddScriptLPS(1); - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID != m_host.OwnerID) @@ -10540,8 +10126,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetParcelMusicURL() { - m_host.AddScriptLPS(1); - ILandObject land = World.LandChannel.GetLandObject(m_host.AbsolutePosition); if (land.LandData.OwnerID != m_host.OwnerID) @@ -10552,8 +10136,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetRootPosition() { - m_host.AddScriptLPS(1); - return new LSL_Vector(m_host.ParentGroup.AbsolutePosition); } @@ -10568,7 +10150,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_Rotation llGetRootRotation() { - m_host.AddScriptLPS(1); Quaternion q; if (m_host.ParentGroup.AttachmentPoint != 0) { @@ -10594,26 +10175,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetObjectDesc(string desc) { - m_host.AddScriptLPS(1); m_host.Description = desc!=null?desc:String.Empty; } public LSL_String llGetCreator() { - m_host.AddScriptLPS(1); return m_host.CreatorID.ToString(); } public LSL_String llGetTimestamp() { - m_host.AddScriptLPS(1); return DateTime.Now.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); } public LSL_Integer llGetNumberOfPrims() { - m_host.AddScriptLPS(1); - return m_host.ParentGroup.PrimCount + m_host.ParentGroup.GetSittingAvatarsCount(); } @@ -10630,7 +10206,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_List llGetBoundingBox(string obj) { - m_host.AddScriptLPS(1); UUID objID = UUID.Zero; LSL_List result = new LSL_List(); @@ -10796,8 +10371,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetPrimitiveParams(LSL_List rules) { - m_host.AddScriptLPS(1); - LSL_List result = new LSL_List(); LSL_List remaining = GetPrimParams(m_host, rules, ref result); @@ -10817,8 +10390,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetLinkPrimitiveParams(int linknumber, LSL_List rules) { - 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 @@ -11468,14 +11039,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetPrimMediaParams(int face, LSL_List rules) { - 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); if (link == ScriptBaseClass.LINK_ROOT) return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); @@ -11595,14 +11164,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) { - 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); if (link == ScriptBaseClass.LINK_ROOT) return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); @@ -11721,14 +11288,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llClearPrimMedia(LSL_Integer face) { - 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); if (link == ScriptBaseClass.LINK_ROOT) return ClearPrimMedia(m_host.ParentGroup.RootPart, face); @@ -11894,8 +11459,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api char[] imdt = new char[8]; - m_host.AddScriptLPS(1); - // Manually unroll the loop imdt[7] = '='; @@ -11956,8 +11519,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int number = 0; int digit; - m_host.AddScriptLPS(1); - // Require a well-fromed base64 string if (str.Length > 8) @@ -12013,14 +11574,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llGetGMTclock() { - m_host.AddScriptLPS(1); return DateTime.UtcNow.TimeOfDay.TotalSeconds; } public LSL_String llGetHTTPHeader(LSL_Key request_id, string header) { - m_host.AddScriptLPS(1); - if (m_UrlModule != null) return m_UrlModule.GetHttpHeader(new UUID(request_id), header); return String.Empty; @@ -12029,7 +11587,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetSimulatorHostname() { - m_host.AddScriptLPS(1); IUrlModule UrlModule = World.RequestModuleInterface(); return UrlModule.ExternalHostNameForLSL; } @@ -12103,8 +11660,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api int i, j; string d; - m_host.AddScriptLPS(1); - /* * Convert separator and spacer lists to C# strings. * Also filter out null strings so we don't hang. @@ -12200,8 +11755,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetObjectPermMask(int mask) { - m_host.AddScriptLPS(1); - int permmask = 0; if (mask == ScriptBaseClass.MASK_BASE)//0 @@ -12234,8 +11787,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetObjectPermMask(int mask, int value) { - m_host.AddScriptLPS(1); - if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) { if (World.Permissions.IsAdministrator(m_host.OwnerID)) @@ -12270,8 +11821,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetInventoryPermMask(string itemName, int mask) { - m_host.AddScriptLPS(1); - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); if (item == null) @@ -12296,8 +11845,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetInventoryPermMask(string itemName, int mask, int value) { - m_host.AddScriptLPS(1); - if (m_ScriptEngine.Config.GetBoolean("AllowGodFunctions", false)) { if (World.Permissions.IsAdministrator(m_host.OwnerID)) @@ -12331,8 +11878,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetInventoryCreator(string itemName) { - m_host.AddScriptLPS(1); - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(itemName); if (item == null) @@ -12347,8 +11892,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llOwnerSay(string msg) { - m_host.AddScriptLPS(1); - World.SimChatBroadcast(Utils.StringToBytes(msg), ChatTypeEnum.Owner, 0, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false); // IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface(); @@ -12357,7 +11900,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llRequestSecureURL() { - 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(); @@ -12369,8 +11911,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api try { - m_host.AddScriptLPS(1); - string reply = String.Empty; GridRegion info; @@ -12474,8 +12014,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llRequestURL() { - m_host.AddScriptLPS(1); - if (m_UrlModule != null) return m_UrlModule.RequestURL(m_ScriptEngine.ScriptModule, m_host, m_item.ItemID, null).ToString(); return UUID.Zero.ToString(); @@ -12483,13 +12021,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llForceMouselook(int mouselook) { - m_host.AddScriptLPS(1); m_host.SetForceMouselook(mouselook != 0); } public LSL_Float llGetObjectMass(string id) { - m_host.AddScriptLPS(1); UUID key = new UUID(); if (UUID.TryParse(id, out key)) { @@ -12533,8 +12069,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { LSL_List pref; - m_host.AddScriptLPS(1); - // Note that although we have normalized, both // indices could still be negative. if (start < 0) @@ -12604,8 +12138,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llLoadURL(string avatar_id, string message, string url) { - m_host.AddScriptLPS(1); - IDialogModule dm = World.RequestModuleInterface(); if (null != dm) dm.SendUrlToUser( @@ -12619,8 +12151,6 @@ 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); - // 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. ILandObject landObject = World.LandChannel.GetLandObject(m_host.AbsolutePosition); @@ -12857,7 +12387,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llParcelMediaQuery(LSL_List aList) { - m_host.AddScriptLPS(1); LSL_List list = new LSL_List(); //TO DO: make the implementation for the missing commands //PARCEL_MEDIA_COMMAND_LOOP_SET float loop Use this to get or set the parcel's media loop duration. (1.19.1 RC0 or later) @@ -12898,7 +12427,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llModPow(int a, int b, int c) { - m_host.AddScriptLPS(1); Int64 tmp = 0; Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); ScriptSleep(m_sleepMsOnModPow); @@ -12907,8 +12435,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetInventoryType(string name) { - m_host.AddScriptLPS(1); - TaskInventoryItem item = m_host.Inventory.GetInventoryItem(name); if (item == null) @@ -12919,8 +12445,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPayPrice(int price, LSL_List quick_pay_buttons) { - m_host.AddScriptLPS(1); - if (quick_pay_buttons.Data.Length < 4) { int x; @@ -12941,8 +12465,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Vector llGetCameraPos() { - m_host.AddScriptLPS(1); - if (m_item.PermsGranter == UUID.Zero) return Vector3.Zero; @@ -12965,8 +12487,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Rotation llGetCameraRot() { - m_host.AddScriptLPS(1); - if (m_item.PermsGranter == UUID.Zero) return Quaternion.Identity; @@ -12988,21 +12508,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPrimURL(string url) { - m_host.AddScriptLPS(1); Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); ScriptSleep(m_sleepMsOnSetPrimURL); } public void llRefreshPrimURL() { - m_host.AddScriptLPS(1); Deprecated("llRefreshPrimURL"); ScriptSleep(m_sleepMsOnRefreshPrimURL); } public LSL_String llEscapeURL(string url) { - m_host.AddScriptLPS(1); try { return Uri.EscapeDataString(url); @@ -13015,7 +12532,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llUnescapeURL(string url) { - m_host.AddScriptLPS(1); try { return Uri.UnescapeDataString(url); @@ -13028,7 +12544,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llMapDestination(string simname, LSL_Vector pos, LSL_Vector lookAt) { - m_host.AddScriptLPS(1); DetectParams detectedParams = m_ScriptEngine.GetDetectParams(m_item.ItemID, 0); if (detectedParams == null) { @@ -13054,7 +12569,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAddToLandBanList(string avatar, double hours) { - 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)) @@ -13095,7 +12609,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoveFromLandPassList(string avatar) { - 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)) @@ -13122,7 +12635,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoveFromLandBanList(string avatar) { - 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)) @@ -13149,8 +12661,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetCameraParams(LSL_List rules) { - m_host.AddScriptLPS(1); - // the object we are in UUID objectID = m_host.ParentUUID; if (objectID == UUID.Zero) @@ -13276,8 +12786,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llClearCameraParams() { - m_host.AddScriptLPS(1); - // the object we are in UUID objectID = m_host.ParentUUID; if (objectID == UUID.Zero) @@ -13303,7 +12811,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Float llListStatistics(int operation, LSL_List src) { - m_host.AddScriptLPS(1); switch (operation) { case ScriptBaseClass.LIST_STAT_RANGE: @@ -13335,19 +12842,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetUnixTime() { - m_host.AddScriptLPS(1); return Util.UnixTimeSinceEpoch(); } public LSL_Integer llGetParcelFlags(LSL_Vector pos) { - 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); IEstateModule estate = World.RequestModuleInterface(); if (estate == null) return 67108864; @@ -13356,8 +12860,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llXorBase64StringsCorrect(string str1, string str2) { - m_host.AddScriptLPS(1); - if (str1 == String.Empty) return String.Empty; if (str2 == String.Empty) @@ -13425,7 +12927,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // parameter flags support are implemented in ScriptsHttpRequests.cs // in StartHttpRequest - m_host.AddScriptLPS(1); IHttpRequestModule httpScriptMod = m_ScriptEngine.World.RequestModuleInterface(); List param = new List(); @@ -13616,15 +13117,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Partial implementation: support for parameter flags needed // see http://wiki.secondlife.com/wiki/llHTTPResponse - m_host.AddScriptLPS(1); - if (m_UrlModule != null) m_UrlModule.HttpResponse(new UUID(id), status,body); } public void llResetLandBanList() { - m_host.AddScriptLPS(1); LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; if (land.OwnerID == m_host.OwnerID) { @@ -13641,7 +13139,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llResetLandPassList() { - m_host.AddScriptLPS(1); LandData land = World.LandChannel.GetLandObject(m_host.AbsolutePosition).LandData; if (land.OwnerID == m_host.OwnerID) { @@ -13658,8 +13155,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) { - m_host.AddScriptLPS(1); - ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); if (lo == null) @@ -13700,7 +13195,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetParcelPrimOwners(LSL_Vector pos) { - 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) @@ -13717,7 +13211,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetObjectPrimCount(string object_id) { - m_host.AddScriptLPS(1); SceneObjectPart part = World.GetSceneObjectPart(new UUID(object_id)); if (part == null) { @@ -13731,8 +13224,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetParcelMaxPrims(LSL_Vector pos, int sim_wide) { - m_host.AddScriptLPS(1); - ILandObject lo = World.LandChannel.GetLandObject((float)pos.x, (float)pos.y); if (lo == null) @@ -13746,7 +13237,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetParcelDetails(LSL_Vector pos, LSL_List param) { - m_host.AddScriptLPS(1); LandData land = World.GetLandData(pos); if (land == null) { @@ -13785,7 +13275,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llStringTrim(string src, int type) { - m_host.AddScriptLPS(1); if (type == (int)ScriptBaseClass.STRING_TRIM_HEAD) { return src.TrimStart(); } if (type == (int)ScriptBaseClass.STRING_TRIM_TAIL) { return src.TrimEnd(); } if (type == (int)ScriptBaseClass.STRING_TRIM) { return src.Trim(); } @@ -13794,8 +13283,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetObjectDetails(string id, LSL_List args) { - m_host.AddScriptLPS(1); - LSL_List ret = new LSL_List(); UUID key = new UUID(); @@ -14276,8 +13763,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetNumberOfNotecardLines(string name) { - m_host.AddScriptLPS(1); - UUID assetID = UUID.Zero; if (!UUID.TryParse(name, out assetID)) @@ -14327,8 +13812,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_String llGetNotecardLine(string name, int line) { - m_host.AddScriptLPS(1); - UUID assetID = UUID.Zero; if (!UUID.TryParse(name, out assetID)) @@ -14801,8 +14284,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSL_List list = new LSL_List(); - m_host.AddScriptLPS(1); - Vector3 rayStart = start; Vector3 rayEnd = end; Vector3 dir = rayEnd - rayStart; @@ -15022,7 +14503,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api /// public LSL_List llCastRayV3(LSL_Vector start, LSL_Vector end, LSL_List options) { - m_host.AddScriptLPS(1); LSL_List result = new LSL_List(); // Prepare throttle data @@ -15874,7 +15354,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llManageEstateAccess(int action, string avatar) { - m_host.AddScriptLPS(1); EstateSettings estate = World.RegionInfo.EstateSettings; bool isAccount = false; bool isGroup = false; @@ -15943,35 +15422,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llGetMemoryLimit() { - 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); // Treat as an LSO script return ScriptBaseClass.FALSE; } public LSL_Integer llGetSPMaxMemory() { - m_host.AddScriptLPS(1); // The value returned for Mono scripts in SL return 65536; } public virtual LSL_Integer llGetUsedMemory() { - m_host.AddScriptLPS(1); // The value returned for Mono scripts in SL return 65536; } public void llScriptProfiler(LSL_Integer flags) { - m_host.AddScriptLPS(1); // This does nothing for LSO scripts in SL } @@ -15983,23 +15457,18 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetSoundQueueing(int queue) { - m_host.AddScriptLPS(1); - if (m_SoundModule != null) m_SoundModule.SetSoundQueueing(m_host.UUID, queue == ScriptBaseClass.TRUE.value); } public void llCollisionSprite(string impact_sprite) { - 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); - if (!World.Permissions.IsGod(m_host.OwnerID)) NotImplemented("llGodLikeRezObject"); @@ -16080,8 +15549,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } - m_host.AddScriptLPS(1); - if (item.PermsGranter == UUID.Zero) { replydata = "MISSING_PERMISSION_DEBIT"; diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index 238fefb..e50b7fd 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs @@ -120,7 +120,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api LSShoutError("LightShare functions are not enabled."); return new LSL_List(); } - m_host.AddScriptLPS(1); RegionLightShareData wl = m_host.ParentGroup.Scene.RegionInfo.WindlightSettings; LSL_List values = new LSL_List(); @@ -729,7 +728,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } int success = 0; - m_host.AddScriptLPS(1); if (LightShareModule.EnableWindlight) { @@ -807,7 +805,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } int success = 0; - 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 5c03191..2c025c1 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -264,7 +264,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // for safe funtions always active public void CheckThreatLevel() { - m_host.AddScriptLPS(1); if (!m_OSFunctionsEnabled) OSSLError(String.Format("{0} permission denied. All OS functions are disabled.")); // throws } @@ -272,7 +271,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // Returns if the function is allowed. Throws a script exception if not allowed. public void CheckThreatLevel(ThreatLevel level, string function) { - m_host.AddScriptLPS(1); if (!m_OSFunctionsEnabled) OSSLError(String.Format("{0} permission denied. All OS functions are disabled.", function)); // throws @@ -1811,7 +1809,6 @@ 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); string ret = String.Empty; // if (String.IsNullOrEmpty(CheckThreatLevelTest(ThreatLevel.High, "osGetPhysicsEngineType"))) { -- cgit v1.1