Some micro-optimizations.
- [AV]sitA: Compute loading progress percentage without converting to float. Remove some 'else' clauses, adding 'return' where appropriate. That required moving the retrieval of the next notecard line near the top. A block has been left indented for clarity, and will be unindented in the next commit. - [AV]prop: Remove some 'else' clauses, adding 'return' where appropriate. A block has been left indented for clarity, and will be unindented in the next commit. - [AV]Xcite!: Change (string)llList2Integer to llList2String, after verifying that the elements in the list are always integers, and therefore this can't cause problems. - [AV]root-RLV-extra: Remove unused event. - [AV]faces: Change llListReplaceList with a replacement of [] to llDeleteSubList, to save one argument. Remove unnecessary 'else'. - [AV]sequence: Comment out unused condition. It would be removed by the optimizer anyway, but this will hopefully help with clarity. - AVpos-shifter: Change var++ to ++var (the optimizer would also do this anyway).
This commit is contained in:
parent
65c067cc30
commit
7482550bef
8 changed files with 106 additions and 68 deletions
|
@ -112,9 +112,9 @@ start_sequence(integer sequence_index, key av)
|
|||
{
|
||||
if (llList2Key(running_uuid, wasRunning) == av)
|
||||
{
|
||||
running_uuid = llListReplaceList(running_uuid, [], wasRunning, wasRunning);
|
||||
running_sequence_indexes = llListReplaceList(running_sequence_indexes, [], wasRunning, wasRunning);
|
||||
running_pointers = llListReplaceList(running_pointers, [], wasRunning, wasRunning);
|
||||
running_uuid = llDeleteSubList(running_uuid, wasRunning, wasRunning);
|
||||
running_sequence_indexes = llDeleteSubList(running_sequence_indexes, wasRunning, wasRunning);
|
||||
running_pointers = llDeleteSubList(running_pointers, wasRunning, wasRunning);
|
||||
}
|
||||
}
|
||||
running_uuid += av;
|
||||
|
@ -365,9 +365,9 @@ default
|
|||
{
|
||||
if (llGetInventoryKey(notecard_name) != notecard_key)
|
||||
{
|
||||
llResetScript();
|
||||
llResetScript(); // llResetScript() never returns
|
||||
}
|
||||
else if (get_number_of_scripts() != llGetListLength(SITTERS))
|
||||
if (get_number_of_scripts() != llGetListLength(SITTERS))
|
||||
{
|
||||
init_sitters();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue