Allow passing single IDs when calling external scripts
BUTTON is documented to pass the UUIDs of the controller *and* the sitter when they are different, separated by a "|". ADJUST is not documented to do that (yet), but it behaves that way. Both behaviours are undesirable for generic scripts that respond to a link message without being specifically designed for AVsitter, because they don't expect the extra UUID. This can be seen as an AVsitter shortcoming, therefore we implement backwards-compatible workarounds. For ADJUST, the AMENU argument's range has been extended: 0, 1 and 2 behave the same as before. 4, 5 and 6 behave as 0, 1 and 2 respectively, but also inhibit sending the second UUID. For BUTTON, two special values have been added for the ID field: <C> and <S>, which will be replaced with CONTROLLER and SITTER respectively. For example: BUTTON text|num|str behaves the same as before, sending both CONTROLLER and SITTER in the UUID field when they differ; however: BUTTON text|num|str|<C> always passes only the UUID of the person who controls the menu. Similarly for <S>.
This commit is contained in:
parent
799a557091
commit
9936f50cc5
2 changed files with 6 additions and 2 deletions
|
@ -278,6 +278,10 @@ default
|
|||
if (llGetListLength(button_data) > 2)
|
||||
{
|
||||
id = llList2String(button_data, 2);
|
||||
if (id == "<C>")
|
||||
id = CONTROLLER;
|
||||
if (id == "<S>")
|
||||
id = MY_SITTER;
|
||||
}
|
||||
else if (CONTROLLER != MY_SITTER)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue