Minor bug fix and optimizations

- Fixed timer bug
- Changed llGetBoundngBox to llGetObjectMass
- Restrict prop cleanup to only include children of non-attached parent objects
This commit is contained in:
Oddunity 2017-08-14 16:32:23 -05:00 committed by Sei-Lisa
parent 4ff281d1f2
commit 56c16cf6bf

View file

@ -90,11 +90,16 @@ state prop
{ {
llSetClickAction(CLICK_ACTION_TOUCH); llSetClickAction(CLICK_ACTION_TOUCH);
} }
if(llGetStartParameter())
{
parentkey = llList2String(llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]), 0); parentkey = llList2String(llGetObjectDetails(llGetKey(), [OBJECT_REZZER_KEY]), 0);
if(llGetStartParameter() && !llList2Integer(llGetObjectDetails(parentkey, [OBJECT_ATTACHED_POINT]), 0))
{
llSetTimerEvent(10); llSetTimerEvent(10);
} }
else
{
llSetTimerEvent(0);
}
} }
attach(key id) attach(key id)
@ -244,8 +249,7 @@ state prop
timer() timer()
{ {
//the parent key should be stored global? if(llGetObjectMass(parentkey) == 0)
if(llGetBoundingBox(parentkey) == [])
{ {
if(!llGetAttached()) if(!llGetAttached())
{ {