v3.2.3: HUD Auto-Detach Diagnostic - Added cleanup logging and signal padding for simulator reliability
This commit is contained in:
parent
a8dcf17b27
commit
e7b77397c9
2 changed files with 11 additions and 4 deletions
|
|
@ -334,6 +334,7 @@ default {
|
|||
for (i = 0; i < MAX_PLAYERS; i++) {
|
||||
// Ensure we hit EVERY possible channel, even if they aren't in our current memory
|
||||
llRegionSay(FLOATER_BASE_CHANNEL + i, "CLEANUP");
|
||||
llSleep(0.05); // Tiny sleep to ensure Sim processes every pulse reliably
|
||||
}
|
||||
// Clear ALL registries to allow fresh re-registration via Rez Guard
|
||||
allPlayerNames = [];
|
||||
|
|
|
|||
|
|
@ -30,15 +30,20 @@ default {
|
|||
// HUD MODE: Stop following target in-world
|
||||
llSetTimerEvent(0.0);
|
||||
|
||||
// Re-initialize listener for HUD space robustness
|
||||
// This ensures the HUD remains responsive to CLEANUP signals after attachment
|
||||
string currentDesc = llGetObjectDesc();
|
||||
// The channel is stored in the script by on_rez, but we don't have start_param here.
|
||||
// If the listener is already active, we don't strictly need to redo it,
|
||||
// but we'll add a debug whisper to confirm it's alive.
|
||||
dbg("📊 [Status Float] HUD Attached to " + llKey2Name(id) + ". Listener active.");
|
||||
|
||||
// HUD Scaling & Rotation (Center 2 focus)
|
||||
// Smaller scale, reset rotation to face screen
|
||||
llSetLinkPrimitiveParamsFast(LINK_THIS, [
|
||||
PRIM_SIZE, <0.05, 0.05, 0.05>,
|
||||
PRIM_SIZE, <0.01, 0.01, 0.01>, // Super tiny to not block view
|
||||
PRIM_ROTATION, ZERO_ROTATION,
|
||||
PRIM_POSITION, <0.0, 0.0, 0.0>
|
||||
]);
|
||||
|
||||
dbg("📊 [Status Float] HUD Mode Activated for " + llKey2Name(id));
|
||||
} else {
|
||||
// BACK TO WORLD: Restore size and follow logic
|
||||
llSetLinkPrimitiveParamsFast(LINK_THIS, [PRIM_SIZE, <0.2, 0.2, 0.2>]);
|
||||
|
|
@ -89,6 +94,7 @@ default {
|
|||
}
|
||||
}
|
||||
else if (message == "CLEANUP") {
|
||||
dbg("🧹 [Status Float] CLEANUP signal received. Detaching and dying...");
|
||||
llDie();
|
||||
}
|
||||
else if (llSubStringIndex(message, "ATTACH_TO:") == 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue