diff options
author | David Walter Seikel | 2016-11-05 07:57:33 +1000 |
---|---|---|
committer | David Walter Seikel | 2016-11-05 07:57:33 +1000 |
commit | db85e8ce5bd76eda0fa8235f51599075a496f10f (patch) | |
tree | 05f225e63d379056d7e68f36841b6340a39d9172 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |
parent | Links to addin-db-*, coz that's a Mono thing we can't control. (diff) | |
download | opensim-SC-db85e8ce5bd76eda0fa8235f51599075a496f10f.zip opensim-SC-db85e8ce5bd76eda0fa8235f51599075a496f10f.tar.gz opensim-SC-db85e8ce5bd76eda0fa8235f51599075a496f10f.tar.bz2 opensim-SC-db85e8ce5bd76eda0fa8235f51599075a496f10f.tar.xz |
Sleep is for the weak. No wonder the standard script engines are so slow.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index e799714..2588d51 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -138,7 +138,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
138 | internal TaskInventoryItem m_item; | 138 | internal TaskInventoryItem m_item; |
139 | internal bool m_OSFunctionsEnabled = false; | 139 | internal bool m_OSFunctionsEnabled = false; |
140 | internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; | 140 | internal ThreatLevel m_MaxThreatLevel = ThreatLevel.VeryLow; |
141 | internal float m_ScriptDelayFactor = 1.0f; | ||
142 | internal float m_ScriptDistanceFactor = 1.0f; | 141 | internal float m_ScriptDistanceFactor = 1.0f; |
143 | internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); | 142 | internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >(); |
144 | 143 | ||
@@ -159,8 +158,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
159 | // m_log.Warn("[OSSL] OSSL FUNCTIONS ENABLED"); | 158 | // m_log.Warn("[OSSL] OSSL FUNCTIONS ENABLED"); |
160 | } | 159 | } |
161 | 160 | ||
162 | m_ScriptDelayFactor = | ||
163 | m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f); | ||
164 | m_ScriptDistanceFactor = | 161 | m_ScriptDistanceFactor = |
165 | m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); | 162 | m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f); |
166 | 163 | ||
@@ -427,14 +424,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
427 | OSSLShoutError(string.Format("Use of function {0} is deprecated. Use {1} instead.", function, replacement)); | 424 | OSSLShoutError(string.Format("Use of function {0} is deprecated. Use {1} instead.", function, replacement)); |
428 | } | 425 | } |
429 | 426 | ||
430 | protected void ScriptSleep(int delay) | ||
431 | { | ||
432 | delay = (int)((float)delay * m_ScriptDelayFactor); | ||
433 | if (delay == 0) | ||
434 | return; | ||
435 | System.Threading.Thread.Sleep(delay); | ||
436 | } | ||
437 | |||
438 | public LSL_Integer osSetTerrainHeight(int x, int y, double val) | 427 | public LSL_Integer osSetTerrainHeight(int x, int y, double val) |
439 | { | 428 | { |
440 | CheckThreatLevel(ThreatLevel.High, "osSetTerrainHeight"); | 429 | CheckThreatLevel(ThreatLevel.High, "osSetTerrainHeight"); |
@@ -799,9 +788,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
799 | presence.ControllingClient, regionName, position, | 788 | presence.ControllingClient, regionName, position, |
800 | lookat, (uint)TPFlags.ViaLocation), | 789 | lookat, (uint)TPFlags.ViaLocation), |
801 | null, "OSSL_Api.TeleportAgentByRegionCoords"); | 790 | null, "OSSL_Api.TeleportAgentByRegionCoords"); |
802 | |||
803 | ScriptSleep(5000); | ||
804 | |||
805 | // } | 791 | // } |
806 | 792 | ||
807 | } | 793 | } |
@@ -847,9 +833,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
847 | presence.ControllingClient, regionHandle, | 833 | presence.ControllingClient, regionHandle, |
848 | position, lookat, (uint)TPFlags.ViaLocation), | 834 | position, lookat, (uint)TPFlags.ViaLocation), |
849 | null, "OSSL_Api.TeleportAgentByRegionName"); | 835 | null, "OSSL_Api.TeleportAgentByRegionName"); |
850 | |||
851 | ScriptSleep(5000); | ||
852 | |||
853 | // } | 836 | // } |
854 | 837 | ||
855 | } | 838 | } |
@@ -3138,8 +3121,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3138 | if (region != null) | 3121 | if (region != null) |
3139 | key = region.TerrainImage; | 3122 | key = region.TerrainImage; |
3140 | 3123 | ||
3141 | ScriptSleep(1000); | ||
3142 | |||
3143 | return key.ToString(); | 3124 | return key.ToString(); |
3144 | } | 3125 | } |
3145 | 3126 | ||