From f8d1e78e8a644306294032fc0c3e9d4b56964f2c Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 2 Jun 2023 23:01:01 +0100 Subject: [PATCH] mantis 9080: make osDie only work on object rezzed by script linkset, as spec --- .../Shared/Api/Implementation/OSSL_Api.cs | 31 +++++-------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 0ab8d26353..3629e364f0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2150,10 +2150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api public void osDie(LSL_Key objectUUID) { -// CheckThreatLevel(ThreatLevel.VeryHigh, "osDie"); - // if this is restricted to objects rezzed by this host level can be reduced - - CheckThreatLevel(ThreatLevel.Low, "osDie"); + //CheckThreatLevel(ThreatLevel.Low, "osDie"); if (!UUID.TryParse(objectUUID, out UUID objUUID)) { @@ -2161,36 +2158,24 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return; } - InitLSL(); - // harakiri check if(objUUID.IsZero()) - { - if (!m_host.ParentGroup.IsAttachment) - m_LSL_Api.llDie(); return; - } SceneObjectGroup sceneOG = World.GetSceneObjectGroup(objUUID); - if (sceneOG == null || sceneOG.IsDeleted) + if (sceneOG is null || sceneOG.IsDeleted || sceneOG.IsAttachment) return; - if(sceneOG.IsAttachment) + if (sceneOG.OwnerID.NotEqual(m_host.OwnerID)) return; - if (sceneOG.OwnerID != m_host.OwnerID) - return; - - // harakiri check - if(sceneOG.UUID.Equals(m_host.ParentGroup.UUID)) - { - m_LSL_Api.llDie(); - return; - } - // restrict to objects rezzed by host if(sceneOG.RezzerID.Equals(m_host.ParentGroup.UUID)) - World.DeleteSceneObject(sceneOG, false); + { + // harakiri check should be true alwaya + if (sceneOG.UUID.NotEqual(m_host.ParentGroup.UUID)) + World.DeleteSceneObject(sceneOG, false); + } } ///