It seems to reliably reproduce the particle shutdown bug that was, previously, only affecting child prims.
If the bug is displayed, you will see a continuous stream (no gaps) of particles that shifts color every 2 seconds.
You SHOULD see a broken streams of particles with 1 second gap between each color shift... or the behavior demonstrated when the work-around is toggled on by clicking the prim.
CODE
integer on_off = 0;
integer mode = 0;
set_display() {
string text = "Work around mode: ";
if ( mode == 0 ) text += "off"; else text += "* ON *";
text += "\n(click to toggle)\n";
if ( llGetLinkNumber() > 1 ) text += "This is a CHILD prim.";
else if ( llGetLinkNumber() == 1 ) text += "This is the PARENT prim.";
else text += "This prim is not linked.";
llSetText(text,<1,1,1>, 1.0);
}
default {
state_entry() {
set_display();
llSetTimerEvent(1);
}
touch_start(integer n) {
mode = ~mode;
set_display();
}
changed(integer n) {
if ( n & CHANGED_LINK ) set_display();
}
timer() {
on_off = ~on_off;
if ( on_off == 0 ) {
// Particles "OFF" cycle.
if ( mode != 0 ) {
// Use Work-Around method to FORCE particles off.
llParticleSystem( [ PSYS_SRC_MAX_AGE, 0.2 ] );
llSleep(0.4);
llParticleSystem([]);
} else {
// attempt to turn off particles normally.
llParticleSystem([]);
}
} else {
// Particles "ON" cycle.
llParticleSystem( [
PSYS_PART_START_COLOR, <llFrand(1),llFrand(1),llFrand(1)>,
PSYS_SRC_BURST_RATE, 0.1,
PSYS_SRC_MAX_AGE, 0.0,
PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE,
PSYS_SRC_ANGLE_BEGIN, 0.0, PSYS_SRC_ANGLE_END, 0.0 ]) ;
}
}
}