Add message 90008 to play poses as if they were selected by menu

This commit is contained in:
Sei Lisa 2020-07-19 17:50:03 +02:00 committed by Sei-Lisa
parent c57b64c812
commit edf88da354
2 changed files with 9 additions and 3 deletions

View file

@ -381,12 +381,15 @@ default
integer two = (integer)((string)id);
integer index;
list data;
if (num == 90000 || num == 90010 || num == 90003)
if (num == 90000 || num == 90010 || num == 90003 || num == 90008)
{
index = llListFindList(MENU_LIST, [msg]);
if (index == -1)
{
index = llListFindList(MENU_LIST, ["P:" + msg]);
// If it's a POSE entry, don't treat it specially
if (~index && num == 90008)
num = 90000;
}
if (id) // OSS::if (osIsUUID(id) && id != NULL_KEY)
{
@ -397,7 +400,7 @@ default
// assumed numeric - replace it with a "*" so we can test for it
id = "*";
}
if ((id == "" || id == MY_SITTER || (id == "*" && two == SCRIPT_CHANNEL)) && (index != -1 || msg == ""))
if ((id == "" || id == MY_SITTER || (id == "*" && two == SCRIPT_CHANNEL) || num == 90008) && (index != -1 || msg == ""))
{
ANIM_INDEX = index;
integer broadcast = TRUE;

View file

@ -32,7 +32,7 @@ Stop an additional animation ([AV]adjuster, [AV]faces).
Same as 90000 but ignored by [AV]sequence script to prevent from stopping sequences when [AV]sequence itself plays poses.
### 90004
Same as 90005 but returns to top level of the menu (used by [AV]root-RLV when press [MENU]).
Same as 90005 but returns to top level of the menu (used by [AV]root-RLV when pressing [MENU]).
### 90005
Give the menu. Optionally set controller avatar and/or submenu.
@ -57,6 +57,9 @@ Register touch or sit to [AV]root-security script from [AV]sitA after permission
llMessageLinked(LINK_SET,90007,"",<CONTROLLER_UUID>);
### 90008
Same as 90000 but if the pose is a SYNC pose, it's played by all sitters that have it, regardless of target (i.e. works pretty much like choosing the pose in the menu)
### 90009
Bring up [AV]select menu, sent by [AV]sitB.