diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs index ced4e91e6d..fd54ed52bd 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModule.cs @@ -70,13 +70,13 @@ namespace OpenSim.Region.Framework.Interfaces /// Suspends a script. /// /// The item ID of the script. - void SuspendScript(UUID itemID); + bool SuspendScript(UUID itemID); /// /// Resumes a script. /// /// The item ID of the script. - void ResumeScript(UUID itemID); + bool ResumeScript(UUID itemID); ArrayList GetScriptErrors(UUID itemID); diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index b81fa39250..ed35ecb082 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs @@ -410,10 +410,6 @@ namespace OpenSim.Region.Framework.Scenes Rezzed = DateTime.UtcNow; Description = String.Empty; PseudoCRC = (int)DateTime.UtcNow.Ticks; // random could be as good; fallbak if not on region db - - // Prims currently only contain a single folder (Contents). From looking at the Second Life protocol, - // this appears to have the same UUID (!) as the prim. If this isn't the case, one can't drag items from - // the prim into an agent inventory (Linden client reports that the "Object not found for drop" in its log m_inventory = new SceneObjectPartInventory(this); LastColSoundSentTime = Util.EnvironmentTickCount(); } @@ -449,7 +445,6 @@ namespace OpenSim.Region.Framework.Scenes APIDActive = false; Flags = 0; CreateSelected = true; - PseudoCRC = (int)DateTime.UtcNow.Ticks; // random could be as good TrimPermissions(); AggregateInnerPerms(); } diff --git a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs index 5e0ea6558c..a0a3cfc76e 100644 --- a/OpenSim/Region/Framework/Scenes/UuidGatherer.cs +++ b/OpenSim/Region/Framework/Scenes/UuidGatherer.cs @@ -388,10 +388,13 @@ namespace OpenSim.Region.Framework.Scenes if (textureEntry.FaceTextures != null) { // Loop through the rest of the texture faces (a non-null face means the face is different from DefaultTexture) + int nsides = part.GetNumberOfSides(); foreach (Primitive.TextureEntryFace texture in textureEntry.FaceTextures) { if (texture != null) RecordTextureEntryAssetUuids(texture); + if(--nsides <= 0) + break; } } } @@ -646,7 +649,8 @@ namespace OpenSim.Region.Framework.Scenes /// private void RecordTextureEntryAssetUuids(Primitive.TextureEntryFace texture) { - GatheredUuids[texture.TextureID] = (sbyte)AssetType.Texture; + if (texture.TextureID != UUID.Zero) + GatheredUuids[texture.TextureID] = (sbyte)AssetType.Texture; if (texture.MaterialID != UUID.Zero) AddForInspection(texture.MaterialID); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 4bae45e392..399f5315c9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs @@ -1466,6 +1466,5 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase { return m_OSSL_Functions.osClearObjectAnimations(); } - } } diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 9e47530304..eb392a9bf9 100755 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -2460,38 +2460,31 @@ namespace OpenSim.Region.ScriptEngine.XEngine return (float)si.ExecutionTime.GetSumTime().TotalMilliseconds; } - public void SuspendScript(UUID itemID) + public bool SuspendScript(UUID itemID) { -// m_log.DebugFormat("[XEngine]: Received request to suspend script with ID {0}", itemID); - - IScriptInstance instance = GetInstance(itemID); - if (instance != null) - instance.Suspend(); -// else -// m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID); - - // Send the new number of threads that are in use by the thread - // pool, I believe that by adding them to the locations where the - // script is changing states that I will catch all changes to the - // thread pool + // m_log.DebugFormat("[XEngine]: Received request to suspend script with ID {0}", itemID); m_Scene.setThreadCount(m_ThreadPool.InUseThreads); + IScriptInstance instance = GetInstance(itemID); + if (instance == null) + return false; + + instance.Suspend(); + return true; } - public void ResumeScript(UUID itemID) + public bool ResumeScript(UUID itemID) { -// m_log.DebugFormat("[XEngine]: Received request to resume script with ID {0}", itemID); + // m_log.DebugFormat("[XEngine]: Received request to resume script with ID {0}", itemID); + + m_Scene.setThreadCount(m_ThreadPool.InUseThreads); IScriptInstance instance = GetInstance(itemID); if (instance != null) + { instance.Resume(); -// else -// m_log.DebugFormat("[XEngine]: Could not find script with ID {0} to resume", itemID); - - // Send the new number of threads that are in use by the thread - // pool, I believe that by adding them to the locations where the - // script is changing states that I will catch all changes to the - // thread pool - m_Scene.setThreadCount(m_ThreadPool.InUseThreads); + return true; + } + return false; } public bool HasScript(UUID itemID, out bool running)