Skip to content

Commit

Permalink
Merge pull request #82 from nPoseTeam/Server-Side-AO-where-"Sit"-can-…
Browse files Browse the repository at this point in the history
…change

Server side ao where "sit" can change
  • Loading branch information
HowardBaxton authored Jun 13, 2016
2 parents a14c4f9 + f78b86f commit 5c6939f
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions nPose Scripts/nPose Slave.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -365,21 +365,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);
Expand Down

0 comments on commit 5c6939f

Please sign in to comment.