From c568d4c16b75615dd10b253cad5cd2fd710e2fb9 Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 19 May 2019 22:54:18 +1000 Subject: One last big source of script slowness removed. No need to artificially slow stuff down. lol --- .../Shared/Api/Implementation/LSL_Api.cs | 158 +-------------------- .../Shared/Api/Implementation/OSSL_Api.cs | 37 +---- 2 files changed, 14 insertions(+), 181 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 3a3703c..ecaa672 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -109,7 +109,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; @@ -126,64 +125,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 = 5000; - 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; @@ -321,10 +262,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 = @@ -409,7 +346,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() @@ -438,14 +375,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return p; } - protected virtual void ScriptSleep(int delay) - { - delay = (int)((float)delay * m_ScriptDelayFactor); - if (delay == 0) - return; - - Sleep(delay); - } protected virtual void Sleep(int delay) { if (m_item == null) // Some unit tests don't set this @@ -1183,8 +1112,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // m_SayShoutCount++; CheckSayShoutTime(); - if (m_SayShoutCount >= 11) - ScriptSleep(2000); +//// if (m_SayShoutCount >= 11) +//// ScriptSleep(2000); if (m_scriptConsoleChannelEnabled && (channelID == m_scriptConsoleChannel)) { @@ -1210,8 +1139,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // m_SayShoutCount++; CheckSayShoutTime(); - if (m_SayShoutCount >= 11) - ScriptSleep(2000); +//// if (m_SayShoutCount >= 11) +//// ScriptSleep(2000); if (text.Length > 1023) text = text.Substring(0, 1023); @@ -2334,7 +2263,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetTexture(string texture, int face) { SetTexture(m_host, texture, face); - ScriptSleep(m_sleepMsOnSetTexture); } public void llSetLinkTexture(int linknumber, string texture, int face) @@ -2349,7 +2277,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } finally { } } - ScriptSleep(m_sleepMsOnSetLinkTexture); } protected void SetTexture(SceneObjectPart part, string texture, int face) @@ -2396,7 +2323,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llScaleTexture(double u, double v, int face) { ScaleTexture(m_host, u, v, face); - ScriptSleep(m_sleepMsOnScaleTexture); } protected void ScaleTexture(SceneObjectPart part, double u, double v, int face) @@ -2436,7 +2362,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llOffsetTexture(double u, double v, int face) { OffsetTexture(m_host, u, v, face); - ScriptSleep(m_sleepMsOnOffsetTexture); } protected void OffsetTexture(SceneObjectPart part, double u, double v, int face) @@ -2476,7 +2401,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRotateTexture(double rotation, int face) { RotateTexture(m_host, rotation, face); - ScriptSleep(m_sleepMsOnRotateTexture); } protected void RotateTexture(SceneObjectPart part, double rotation, int face) @@ -2554,8 +2478,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPos(LSL_Vector pos) { SetPos(m_host, pos, true); - - ScriptSleep(m_sleepMsOnSetPos); } /// @@ -2727,14 +2649,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api SetRot(m_host, rootPart.RotationOffset * (Quaternion)rot); } } - - ScriptSleep(m_sleepMsOnSetRot); } public void llSetLocalRot(LSL_Rotation rot) { SetRot(m_host, rot); - ScriptSleep(m_sleepMsOnSetLocalRot); } protected void SetRot(SceneObjectPart part, Quaternion rot) @@ -3097,7 +3016,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { if (m_SoundModule != null) m_SoundModule.PreloadSound(m_host.UUID, ScriptUtils.GetAssetIdFromKeyOrItemName(m_host, sound), 0); - ScriptSleep(m_sleepMsOnPreloadSound); } /// @@ -3363,25 +3281,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llMakeExplosion(int particles, double scale, double vel, double lifetime, double arc, string texture, LSL_Vector offset) { 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) { 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) { 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) { Deprecated("llMakeFire", "Use llParticleSystem instead"); - ScriptSleep(m_sleepMsOnMakeFire); } public void llRezAtRoot(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) @@ -3458,8 +3372,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } }, null, "LSL_Api.doObjectRez"); - //ScriptSleep((int)((groupmass * velmag) / 10)); - ScriptSleep(m_sleepMsOnRezAtRoot); } public void llRezObject(string inventory, LSL_Vector pos, LSL_Vector vel, LSL_Rotation rot, int param) @@ -3704,7 +3616,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (!UUID.TryParse(user, out result) || result == UUID.Zero) { Error("llInstantMessage","An invalid key was passed to llInstantMessage"); - ScriptSleep(2000); +//// ScriptSleep(2000); return; } @@ -3752,8 +3664,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); } - - ScriptSleep(m_sleepMsOnInstantMessage); } public void llEmail(string address, string subject, string message) @@ -3790,7 +3700,7 @@ 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) @@ -4568,9 +4478,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (m_TransferModule != null) m_TransferModule.SendInstantMessage(msg, delegate(bool success) {}); } - - //This delay should only occur when giving inventory to avatars. - ScriptSleep(m_sleepMsOnGiveInventory); } } @@ -4752,12 +4659,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api reply); }); - ScriptSleep(m_sleepMsOnRequestInventoryData); return tid.ToString(); } } - ScriptSleep(m_sleepMsOnRequestInventoryData); return String.Empty; } @@ -4794,8 +4699,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - - ScriptSleep(m_sleepMsOnSetDamage); } public void llTeleportAgent(string agent, string destination, LSL_Vector targetPos, LSL_Vector targetLookAt) @@ -4924,7 +4827,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api else { dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); - ScriptSleep(m_sleepMsOnTextBox); } } @@ -6417,7 +6319,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llAdjustSoundVolume(double volume) { m_host.AdjustSoundGain(volume); - ScriptSleep(m_sleepMsOnAdjustSoundVolume); } public void llSetSoundRadius(double radius) @@ -6523,7 +6424,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnEjectFromLand); } public LSL_List llParseString2List(string str, LSL_List separators, LSL_List in_spacers) @@ -7669,8 +7569,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api dm.SendDialogToUser( av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); - - ScriptSleep(m_sleepMsOnDialog); } public void llVolumeDetect(int detect) @@ -7682,7 +7580,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llRemoteLoadScript(string target, string name, int running, int start_param) { Deprecated("llRemoteLoadScript", "Use llRemoteLoadScriptPin instead"); - ScriptSleep(m_sleepMsOnRemoteLoadScript); } public void llSetRemoteScriptAccessPin(int pin) @@ -7728,8 +7625,6 @@ 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); } public void llOpenRemoteDataChannel() @@ -7759,13 +7654,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api m_ScriptEngine.PostScriptEvent(m_item.ItemID, new EventParams("remote_data", resobj, new DetectParams[0])); } - ScriptSleep(m_sleepMsOnOpenRemoteDataChannel); } public LSL_String llSendRemoteData(string channel, string dest, int idata, string sdata) { IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); - ScriptSleep(m_sleepMsOnSendRemoteData); if (xmlrpcMod == null) return ""; return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); @@ -7776,7 +7669,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); if (xmlrpcMod != null) xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); - ScriptSleep(m_sleepMsOnRemoteDataReply); } public void llCloseRemoteDataChannel(string channel) @@ -7790,7 +7682,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface(); if (xmlrpcMod != null) xmlrpcMod.CloseXMLRPCChannel((UUID)channel); - ScriptSleep(m_sleepMsOnCloseRemoteDataChannel); } public LSL_String llMD5String(string src, int nonce) @@ -8192,15 +8083,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPrimitiveParams(LSL_List rules) { SetLinkPrimParams(ScriptBaseClass.LINK_THIS, rules, "llSetPrimitiveParams"); - - ScriptSleep(m_sleepMsOnSetPrimitiveParams); } public void llSetLinkPrimitiveParams(int linknumber, LSL_List rules) { SetLinkPrimParams(linknumber, rules, "llSetLinkPrimitiveParams"); - - ScriptSleep(m_sleepMsOnSetLinkPrimitiveParams); } public void llSetLinkPrimitiveParamsFast(int linknumber, LSL_List rules) @@ -9990,7 +9877,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api string b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; - ScriptSleep(300); if (str1 == String.Empty) return String.Empty; if (str2 == String.Empty) @@ -10120,8 +10006,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; land.SetMusicUrl(url); - - ScriptSleep(m_sleepMsOnSetParcelMusicURL); } public LSL_String llGetParcelMusicURL() @@ -11039,13 +10923,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_List llGetPrimMediaParams(int face, LSL_List rules) { - ScriptSleep(m_sleepMsOnGetPrimMediaParams); return GetPrimMediaParams(m_host, face, rules); } public LSL_List llGetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) { - ScriptSleep(m_sleepMsOnGetLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return GetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); else if (link == ScriptBaseClass.LINK_THIS) @@ -11164,13 +11046,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llSetPrimMediaParams(LSL_Integer face, LSL_List rules) { - ScriptSleep(m_sleepMsOnSetPrimMediaParams); return SetPrimMediaParams(m_host, face, rules); } public LSL_Integer llSetLinkMedia(LSL_Integer link, LSL_Integer face, LSL_List rules) { - ScriptSleep(m_sleepMsOnSetLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return SetPrimMediaParams(m_host.ParentGroup.RootPart, face, rules); else if (link == ScriptBaseClass.LINK_THIS) @@ -11288,13 +11168,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public LSL_Integer llClearPrimMedia(LSL_Integer face) { - ScriptSleep(m_sleepMsOnClearPrimMedia); return ClearPrimMedia(m_host, face); } public LSL_Integer llClearLinkMedia(LSL_Integer link, LSL_Integer face) { - ScriptSleep(m_sleepMsOnClearLinkMedia); if (link == ScriptBaseClass.LINK_ROOT) return ClearPrimMedia(m_host.ParentGroup.RootPart, face); else if (link == ScriptBaseClass.LINK_THIS) @@ -11925,7 +11803,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case ScriptBaseClass.DATA_SIM_POS: if (info == null) { - ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); } @@ -11972,7 +11849,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api case ScriptBaseClass.DATA_SIM_RATING: if (info == null) { - ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); } int access = info.Maturity; @@ -11991,7 +11867,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api reply = "OpenSim"; break; default: - ScriptSleep(m_sleepMsOnRequestSimulatorData); return UUID.Zero.ToString(); // Raise no event } UUID rq = UUID.Random(); @@ -12002,7 +11877,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands. DataserverPlugin.DataserverReply(rq.ToString(), reply); - ScriptSleep(m_sleepMsOnRequestSimulatorData); return tid.ToString(); } catch(Exception) @@ -12142,8 +12016,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (null != dm) dm.SendUrlToUser( new UUID(avatar_id), m_host.Name, m_host.UUID, m_host.OwnerID, false, message, url); - - ScriptSleep(m_sleepMsOnLoadURL); } public void llParcelMediaCommandList(LSL_List commandList) @@ -12382,7 +12254,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api (ParcelMediaCommandEnum)commandToSend, time); } } - ScriptSleep(m_sleepMsOnParcelMediaCommandList); } public LSL_List llParcelMediaQuery(LSL_List aList) @@ -12421,7 +12292,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - ScriptSleep(m_sleepMsOnParcelMediaQuery); return list; } @@ -12429,7 +12299,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { Int64 tmp = 0; Math.DivRem(Convert.ToInt64(Math.Pow(a, b)), c, out tmp); - ScriptSleep(m_sleepMsOnModPow); return Convert.ToInt32(tmp); } @@ -12509,13 +12378,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void llSetPrimURL(string url) { Deprecated("llSetPrimURL", "Use llSetPrimMediaParams instead"); - ScriptSleep(m_sleepMsOnSetPrimURL); } public void llRefreshPrimURL() { Deprecated("llRefreshPrimURL"); - ScriptSleep(m_sleepMsOnRefreshPrimURL); } public LSL_String llEscapeURL(string url) @@ -12564,7 +12431,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api avatar.ControllingClient.SendScriptTeleportRequest(m_host.Name, simname, pos, lookAt); } - ScriptSleep(m_sleepMsOnMapDestination); } public void llAddToLandBanList(string avatar, double hours) @@ -12604,7 +12470,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api World.EventManager.TriggerLandObjectUpdated((uint)land.LandData.LocalID, land); } } - ScriptSleep(m_sleepMsOnAddToLandBanList); } public void llRemoveFromLandPassList(string avatar) @@ -12630,7 +12495,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnRemoveFromLandPassList); } public void llRemoveFromLandBanList(string avatar) @@ -12656,7 +12520,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnRemoveFromLandBanList); } public void llSetCameraParams(LSL_List rules) @@ -13134,7 +12997,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnResetLandBanList); } public void llResetLandPassList() @@ -13150,7 +13012,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } } - ScriptSleep(m_sleepMsOnResetLandPassList); } public LSL_Integer llGetParcelPrimCount(LSL_Vector pos, int category, int sim_wide) @@ -13205,7 +13066,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api ret.Add(new LSL_Integer(detectedParams.Value)); } } - ScriptSleep(m_sleepMsOnGetParcelPrimOwners); return ret; } @@ -13790,7 +13650,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(assetID).ToString()); - ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); return tid.ToString(); } @@ -13806,7 +13665,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands.DataserverPlugin.DataserverReply(reqIdentifier, NotecardCache.GetLines(id).ToString()); }); - ScriptSleep(m_sleepMsOnGetNumberOfNotecardLines); return tid.ToString(); } @@ -13840,7 +13698,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api AsyncCommands.DataserverPlugin.DataserverReply( reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); - ScriptSleep(m_sleepMsOnGetNotecardLine); return tid.ToString(); } @@ -13859,7 +13716,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api reqIdentifier, NotecardCache.GetLine(assetID, line, m_notecardLineReadCharsMax)); }); - ScriptSleep(m_sleepMsOnGetNotecardLine); return tid.ToString(); } diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 2c025c1..d897098 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -139,8 +139,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api internal TaskInventoryItem m_item; internal bool m_OSFunctionsEnabled = false; internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; - internal float m_ScriptDelayFactor = 1.0f; - internal float m_ScriptDistanceFactor = 1.0f; internal bool m_debuggerSafe = false; internal Dictionary m_FunctionPerms = new Dictionary(); protected IUrlModule m_UrlModule = null; @@ -161,11 +159,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // m_log.Warn("[OSSL] OSSL FUNCTIONS ENABLED"); } - m_ScriptDelayFactor = - m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); - m_ScriptDistanceFactor = - m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); - string risk = m_ScriptEngine.Config.GetString("OSFunctionThreatLevel", "VeryLow"); switch (risk) { @@ -473,13 +466,13 @@ 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)((float)delay * m_ScriptDelayFactor); - if (delay == 0) - return; - System.Threading.Thread.Sleep(delay); - } +//// protected void ScriptSleep(int delay) +//// { +//// delay = (int)((float)delay * m_ScriptDelayFactor); +//// if (delay == 0) +//// return; +//// System.Threading.Thread.Sleep(delay); +//// } public LSL_Integer osSetTerrainHeight(int x, int y, double val) { @@ -881,17 +874,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Vector3 pos = presence.AbsolutePosition; if(!checkAllowAgentTPbyLandOwner(agentId, pos)) - { - ScriptSleep(500); return; - } if(regionName == World.RegionInfo.RegionName) { // should be faster than going to threadpool World.RequestTeleportLocation(presence.ControllingClient, regionName, position, lookat, (uint)TPFlags.ViaLocation); - ScriptSleep(500); } else { @@ -902,7 +891,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api presence.ControllingClient, regionName, position, lookat, (uint)TPFlags.ViaLocation), null, "OSSL_Api.TeleportAgentByRegionCoords"); - ScriptSleep(5000); } } } @@ -930,18 +918,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Vector3 pos = presence.AbsolutePosition; if(!checkAllowAgentTPbyLandOwner(agentId, pos)) - { - ScriptSleep(500); return; - } Util.FireAndForget( o => World.RequestTeleportLocation( presence.ControllingClient, regionHandle, position, lookat, (uint)TPFlags.ViaLocation), null, "OSSL_Api.TeleportAgentByRegionName"); - - ScriptSleep(5000); } } @@ -956,14 +939,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api Vector3 pos = presence.AbsolutePosition; if(!checkAllowAgentTPbyLandOwner(agentId, pos)) - { - ScriptSleep(500); return; - } World.RequestTeleportLocation(presence.ControllingClient, World.RegionInfo.RegionName, position, lookat, (uint)TPFlags.ViaLocation); - ScriptSleep(500); } } @@ -3389,8 +3368,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api if (region != null) key = region.TerrainImage; - ScriptSleep(1000); - return key.ToString(); } -- cgit v1.1