From 8af1e3d7d7554abc08dfbc18c2a5540ba3859128 Mon Sep 17 00:00:00 2001 From: HowardBaxton Date: Sun, 5 Jun 2016 20:55:36 -0700 Subject: [PATCH 1/2] Update nPose Slave.lsl Change how the Slave determines a new sitter from existing sitter. --- nPose Scripts/nPose Slave.lsl | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/nPose Scripts/nPose Slave.lsl b/nPose Scripts/nPose Slave.lsl index 67dff92..0000a94 100644 --- a/nPose Scripts/nPose Slave.lsl +++ b/nPose Scripts/nPose Slave.lsl @@ -368,21 +368,22 @@ default { //get the current requested animation from list slots. integer avIndex = llListFindList(slots, [thisAV]); currentanim = llList2String(slots, avIndex - 4); - //look for the default LL 'Sit' animation. We must stop this animation if it is running. New Sitter! - list animsRunning = llGetAnimationList(thisAV); - integer indexx = llListFindList(animsRunning, [(key)"1a5fe8ac-a804-8a5d-7cbd-56bd83184568"]); - //we also need to know the last animation running. Not New Sitter! + //we also need to know the last animation running. //lastanim is a 2 stride list [thisAV, last active animation name] //index thisAV as a string in the list and then we can find the last animation. integer thisAvIndex = llListFindList(lastanim, [(string)thisAV]); if(doSync !=1) { - if(indexx != -1) { - lastAnimRunning = "Sit"; - lastanim += [(string)thisAV, "Sit"]; - } if(thisAvIndex != -1) { + //Not New Sitter! lastAnimRunning = llList2String(lastanim, thisAvIndex+1); } + else { + //New Sitter! + //New Sitter isn't in our list yet so give the list some beef + llStartAnimation("Sit"); + lastAnimRunning = "Sit"; + lastanim += [(string)thisAV, "Sit"]; + } //now we know which animation to stop so go ahead and stop it. if(lastAnimRunning != "") { llStopAnimation(lastAnimRunning); From f78b86fbab84f2c4e4c8a0f97857320c950862b7 Mon Sep 17 00:00:00 2001 From: HowardBaxton Date: Sun, 12 Jun 2016 16:06:47 -0700 Subject: [PATCH 2/2] Update nPose Slave.lsl Remove the start animation "Sit" for a new sitter. --- nPose Scripts/nPose Slave.lsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nPose Scripts/nPose Slave.lsl b/nPose Scripts/nPose Slave.lsl index 987c3fd..0c3e624 100644 --- a/nPose Scripts/nPose Slave.lsl +++ b/nPose Scripts/nPose Slave.lsl @@ -377,7 +377,7 @@ default { else { //New Sitter! //New Sitter isn't in our list yet so give the list some beef - llStartAnimation("Sit"); +// llStartAnimation("Sit"); lastAnimRunning = "Sit"; lastanim += [(string)thisAV, "Sit"]; }