From 56c16cf6bf577ae581b49c33a4853e0c3ea4638e Mon Sep 17 00:00:00 2001 From: Oddunity Date: Mon, 14 Aug 2017 16:32:23 -0500 Subject: [PATCH] Minor bug fix and optimizations - Fixed timer bug - Changed llGetBoundngBox to llGetObjectMass - Restrict prop cleanup to only include children of non-attached parent objects --- AVsitter2/Plugins/AVprop/[AV]object.lsl | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/AVsitter2/Plugins/AVprop/[AV]object.lsl b/AVsitter2/Plugins/AVprop/[AV]object.lsl index 0d61301..683308d 100644 --- a/AVsitter2/Plugins/AVprop/[AV]object.lsl +++ b/AVsitter2/Plugins/AVprop/[AV]object.lsl @@ -90,11 +90,16 @@ state prop { llSetClickAction(CLICK_ACTION_TOUCH); } - if(llGetStartParameter()) + + parentkey = llList2String(llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]), 0); + if(llGetStartParameter() && !llList2Integer(llGetObjectDetails(parentkey, [OBJECT_ATTACHED_POINT]), 0)) { - parentkey = llList2String(llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]), 0); llSetTimerEvent(10); } + else + { + llSetTimerEvent(0); + } } attach(key id) @@ -244,8 +249,7 @@ state prop timer() { - //the parent key should be stored global? - if(llGetBoundingBox(parentkey) == []) + if(llGetObjectMass(parentkey) == 0) { if(!llGetAttached()) {