fix: Critical timer bug preventing script installation continuation
PROBLEM: Timer was immediately turned off after each script installation - Line 328: llSetTimerEvent(0.0) killed timer after every installation - Only first script would install, then process would stop SOLUTION: - Only turn off timer when NOT updating - Let installNextScript() manage its own timing - Properly stop timer in completeUpdate() and handleUpdateError() - Now all 18 scripts should install sequentially This fixes the '1 script installs then stops' bug
This commit is contained in:
parent
eb9dc566e9
commit
abb4fe34c7
1 changed files with 8 additions and 3 deletions
|
|
@ -241,12 +241,13 @@ completeUpdate() {
|
||||||
llRegionSayTo(targetGameKey, UPDATER_CHANNEL, "UPDATE_COMPLETE|" + UPDATER_VERSION);
|
llRegionSayTo(targetGameKey, UPDATER_CHANNEL, "UPDATE_COMPLETE|" + UPDATER_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset state
|
// Reset state and stop timer
|
||||||
currentOperation = "";
|
currentOperation = "";
|
||||||
targetGameKey = NULL_KEY;
|
targetGameKey = NULL_KEY;
|
||||||
updatePin = 0;
|
updatePin = 0;
|
||||||
scriptList = [];
|
scriptList = [];
|
||||||
currentScriptIndex = 0;
|
currentScriptIndex = 0;
|
||||||
|
llSetTimerEvent(0.0); // Stop the timer
|
||||||
|
|
||||||
llOwnerSay("💡 Update complete! You can now delete this updater box.");
|
llOwnerSay("💡 Update complete! You can now delete this updater box.");
|
||||||
llSetText("🎉 Update Complete!\nYou can delete this updater box\nThank you for updating!",
|
llSetText("🎉 Update Complete!\nYou can delete this updater box\nThank you for updating!",
|
||||||
|
|
@ -262,12 +263,13 @@ handleUpdateError(string error) {
|
||||||
llRegionSayTo(targetGameKey, UPDATER_CHANNEL, "UPDATE_FAILED|" + error);
|
llRegionSayTo(targetGameKey, UPDATER_CHANNEL, "UPDATE_FAILED|" + error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset state
|
// Reset state and stop timer
|
||||||
currentOperation = "";
|
currentOperation = "";
|
||||||
targetGameKey = NULL_KEY;
|
targetGameKey = NULL_KEY;
|
||||||
updatePin = 0;
|
updatePin = 0;
|
||||||
scriptList = [];
|
scriptList = [];
|
||||||
currentScriptIndex = 0;
|
currentScriptIndex = 0;
|
||||||
|
llSetTimerEvent(0.0); // Stop the timer
|
||||||
}
|
}
|
||||||
|
|
||||||
default {
|
default {
|
||||||
|
|
@ -324,8 +326,11 @@ default {
|
||||||
// Continue with next script installation
|
// Continue with next script installation
|
||||||
if (currentOperation == "updating") {
|
if (currentOperation == "updating") {
|
||||||
installNextScript();
|
installNextScript();
|
||||||
|
// Don't turn off timer - installNextScript() will manage timing
|
||||||
|
} else {
|
||||||
|
// Only turn off timer if we're not updating
|
||||||
|
llSetTimerEvent(0.0);
|
||||||
}
|
}
|
||||||
llSetTimerEvent(0.0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
touch_start(integer total_number) {
|
touch_start(integer total_number) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue