diff --git a/src/raw/scheduler.lsl b/src/raw/scheduler.lsl index 56126ce..784faa1 100644 --- a/src/raw/scheduler.lsl +++ b/src/raw/scheduler.lsl @@ -18,6 +18,12 @@ default llSetTimerEvent(0.5); } + changed(integer iChange) { + if(iChange & CHANGED_OWNER) { + llResetScript(); + } + } + timer () { integer i =0; integer end = llGetListLength(g_lCallbacks); @@ -27,6 +33,9 @@ default integer iExpires = llList2Integer(g_lCallbacks, i+1); if(llGetUnixTime() > iExpires) { // Send the callback signal + Callback(llList2String(g_lCallbacks, i+2), llList2String(g_lCallbacks, i)); + g_lCallbacks = llDeleteSubList(g_lCallbacks, i, i+g_iStride); + return; } } } @@ -67,6 +76,8 @@ default break; } } + } else if(iNum == LINK_SIGNAL_REBOOT) { + llResetScript(); } DEBUG_FUNC(false, "link_message", []);