Skip to content

Commit

Permalink
Patch Release: 8.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
zontreck committed Mar 2, 2021
1 parent 4aa1dcc commit bcb5385
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 50 deletions.
88 changes: 44 additions & 44 deletions src/collar/oc_anim.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Aria (Tashia Redrose)
* July 2020 - Rewrote oc_anim
* Dec 2020 - Fix bug where animations were not treated case insensitive, and where animations with a space in the name could not be played by chat command or menu button
* Feb 2021 - Fix Public Access
Felkami (Caraway Ohmai)
* Dec 2020 - Fixed #456, #462, #461, added LockMeister AO suppress
Expand Down Expand Up @@ -110,7 +110,7 @@ integer g_iPosture = FALSE;
Menu(key kID, integer iAuth) {
string sPrompt = "\n[Animations]\n\nCurrent Animation: "+setor((g_lCurrentAnimations==[]), "None", llList2String(g_lCurrentAnimations, 0)+"\nCurrent Pose: "+setor((g_sPose==""), "None", g_sPose));
list lButtons = [Checkbox(g_iAnimLock,"AnimLock"), "Pose"];

if(llGetInventoryType("~stiff")==INVENTORY_ANIMATION){
lButtons += [Checkbox(g_iPosture, "Posture")];
}else {
Expand Down Expand Up @@ -138,19 +138,19 @@ list GetPoseList(integer iType)
{
// -1 = as it exists in inventory
// 0 = lower case

list lTmp;
integer i=0;
integer end = llGetInventoryNumber(INVENTORY_ANIMATION);
for(i=0;i<end;i++){

string name = llGetInventoryName(INVENTORY_ANIMATION, i);
if(llGetSubString(name,0,0)!="~"){
if(iType == -1)lTmp += [name];
else lTmp += [llToLower(name)];
}
}

return lTmp;
}

Expand All @@ -164,19 +164,19 @@ UserCommand(integer iNum, string sStr, key kID) {
//else if (iNum!=CMD_OWNER && iNum!=CMD_TRUSTED && kID!=g_kWearer) RelayNotify(kID,"Access denied!",0);
else {
list lTmp = llParseString2List(sStr, [" "],[]);
//integer iWSuccess = 0;
//integer iWSuccess = 0;
string sChangetype = llList2String(lTmp,0);
string sChangevalue = llList2String(lTmp,1);
integer iPageNum = llList2Integer(lTmp,2);
integer iRespringPoses=FALSE;

if(llSubStringIndex(sStr,"remenu") != -1){
integer len = llGetListLength(lTmp);
len = len-3;
sChangetype = llDumpList2String(llList2List(lTmp, 0,len), " ");
sChangevalue = llList2String(lTmp, len+1);
iPageNum = llList2Integer(lTmp, len+2);

//llSay(0, "anim remenu: "+sStr+";;;; "+sChangetype+";"+sChangevalue+";"+(string)iPageNum);
}
//string sText;
Expand Down Expand Up @@ -227,37 +227,37 @@ UserCommand(integer iNum, string sStr, key kID) {
if(iPos==-1){
// llOwnerSay("up:"+(string)iUp+"; anim not found in adjustments");
// OK now we make a new entry

if(iUp)
g_lAdjustments+=[llList2String(g_lCurrentAnimations, 0), g_fAdjustment];
else
g_lAdjustments+=[llList2String(g_lCurrentAnimations, 0),-g_fAdjustment];


llMessageLinked(LINK_SET, NOTIFY, "0The hover height for '"+llList2String(g_lCurrentAnimations, 0)+"' is now "+(string)g_fAdjustment, g_kWearer);
} else {

//llOwnerSay("up:"+(string)iUp+"; anim update");
float fCurrent = (float)llList2String(g_lAdjustments, iPos+1);
if(iUp)
fCurrent+=g_fAdjustment;
else
fCurrent -= g_fAdjustment;


llMessageLinked(LINK_SET, NOTIFY, "0The hover height for '"+llList2String(g_lCurrentAnimations, 0)+"' is now "+(string)fCurrent, g_kWearer);
if(fCurrent!=0)
g_lAdjustments = llListReplaceList(g_lAdjustments, [fCurrent],iPos+1,iPos+1);
else
g_lAdjustments = llDeleteSubList(g_lAdjustments,iPos,iPos+1);
}
llMessageLinked(LINK_SET, LM_SETTING_SAVE, "offset_hovers="+llDumpList2String(g_lAdjustments,","),"");

//llOwnerSay("up:"+(string)iUp+"; saved hover list");
if(llGetListLength(g_lCurrentAnimations)!=0)
PlayAnimation();


}
}else llMessageLinked(LINK_SET, NOTIFY, "%NOACCESS% to changing height", kID);
} else if(sChangetype == "animlock"){
Expand All @@ -271,7 +271,7 @@ UserCommand(integer iNum, string sStr, key kID) {
llMessageLinked(LINK_SET, LM_SETTING_DELETE, "anim_animlock","");
text = "0Animation lock updated";
} else text = "0%NOACCESS% to change animation lock";

if(sChangevalue == "remenu") Menu(kID,iNum);
else llMessageLinked(LINK_SET, NOTIFY, text, kID);
} else if(llToLower(sChangetype) == "pose"){
Expand All @@ -287,9 +287,9 @@ UserCommand(integer iNum, string sStr, key kID) {
llMessageLinked(LINK_SET, LM_SETTING_SAVE, "anim_posture=1", "");
}
} else llMessageLinked(LINK_SET,NOTIFY,"0%NOACCESS% to toggling posture", kID);

}

@checkRemenu;
if(sChangevalue == "remenu" && iRespringPoses)PoseMenu(kID,iNum, iPageNum);
//else if(sChangevalue == "remenu" && !iRespringPoses)Menu(kID, iNum);
Expand Down Expand Up @@ -454,11 +454,11 @@ state active

llRequestPermissions(g_kWearer, PERMISSION_OVERRIDE_ANIMATIONS | PERMISSION_TRIGGER_ANIMATION | PERMISSION_TAKE_CONTROLS);
}

changed(integer t){
if(t&CHANGED_INVENTORY)llResetScript(); // maybe changed animations
}

run_time_permissions(integer iPerms){
// Check if both permissions granted
if(iPerms& PERMISSION_OVERRIDE_ANIMATIONS && iPerms&PERMISSION_TRIGGER_ANIMATION && iPerms&PERMISSION_TAKE_CONTROLS){
Expand All @@ -472,13 +472,13 @@ state active
CONTROL_ROT_RIGHT |
CONTROL_UP |
CONTROL_DOWN |
CONTROL_ML_LBUTTON |
CONTROL_ML_LBUTTON |
0x02 |
0x04,
TRUE,TRUE);
}
}

timer(){
if(g_iLeashMove)return;
string sAnim = llGetAnimation(g_kWearer);
Expand All @@ -487,37 +487,37 @@ state active
llSetTimerEvent(FALSE);
return;
}

if(sAnim == "Falling Down" || sAnim == "Jumping" || sAnim == "Landing" || sAnim == "Soft Landing"){
llResetTime();
}

if(llGetTime()>30.0)llSetTimerEvent(FALSE);

if(g_iTimerMode == TIMER_START_ANIMATION && llGetTime()>2.5){
if(g_lCurrentAnimations==[]){
if(g_fStandHover != 0) llMessageLinked(LINK_SET, RLV_CMD, "adjustheight:1;0;"+(string)g_fStandHover,g_kWearer);
}else PlayAnimation();
llSetTimerEvent(FALSE);
}
}

control(key kID, integer iLevel, integer iEdge){
if(iLevel == 0){
// all movement has ceased
MoveEnd();
} else {
MoveStart();
}

//integer iStart = iLevel & iEdge;
//integer iEnd = ~iLevel & iEdge;
//integer iHeld = iLevel & ~iEdge;
//integer iUntouched = ~(iLevel | iEdge);

//llWhisper(0, "controls: "+llDumpList2String([iLevel, iEdge, iStart, iEnd, iHeld, iUntouched], ", "));
}

link_message(integer iSender,integer iNum,string sStr,key kID){
if(iNum >= CMD_OWNER && iNum <= CMD_EVERYONE) UserCommand(iNum, sStr, kID);
else if(iNum == MENUNAME_REQUEST && sStr == g_sParentMenu){
Expand All @@ -536,7 +536,7 @@ state active
}
}
else if(iNum == DIALOG_RESPONSE){

//Test to see if this is a denied auth. If we're here and its denied, we respring. A CMD_* call is already sent out which will produce the NOTIFY
//We're hard coding page 0 because new menu calls should always be page 0
if(llSubStringIndex(sStr, g_sSubMenu + "|0|" + (string)CMD_EVERYONE) != -1) llMessageLinked(LINK_SET, CMD_ZERO, "menu "+g_sParentMenu, llGetSubString(sStr, 0, 35));
Expand All @@ -551,7 +551,7 @@ state active
integer iPage = llList2Integer(lMenuParams,2);
integer iAuth = llList2Integer(lMenuParams,3);
integer iRespring = TRUE;

if(sMenu == "Menu~Animations"){
if(sMsg == UPMENU) {
iRespring=FALSE;
Expand All @@ -575,7 +575,7 @@ state active
llMessageLinked(LINK_SET, 0, "posture on",kAv);
}
}

}else {
iRespring=FALSE;
llMessageLinked(LINK_SET, iAuth, "menu "+sMsg,kAv);
Expand All @@ -586,7 +586,7 @@ state active
if(sMsg == UPMENU){
iRespring=FALSE;
llMessageLinked(LINK_SET, iAuth, "menu "+g_sSubMenu, kAv);

} else {
// Set standing animation
llMessageLinked(LINK_SET, 0, sMsg + " remenu "+(string)iPage, kAv);
Expand All @@ -597,7 +597,7 @@ state active
if(iRespring)PoseMenu(kAv,iAuth, iPage);
}
}

} else if (iNum == DIALOG_TIMEOUT) {
integer iMenuIndex = llListFindList(g_lMenuIDs, [kID]);
g_lMenuIDs = llDeleteSubList(g_lMenuIDs, iMenuIndex - 1, iMenuIndex +3); //remove stride from g_lMenuIDs
Expand All @@ -607,10 +607,10 @@ state active
string sTok = llList2String(lSettings,0);
string sVar = llList2String(lSettings,1);
string sVal = llList2String(lSettings,2);

//integer ind = llListFindList(g_lSettingsReqs, [sTok + "_" + sVar]);
//if(ind!=-1)g_lSettingsReqs = llDeleteSubList(g_lSettingsReqs, ind,ind);

if(sTok=="global"){
if(sVar=="locked"){
g_iLocked=(integer)sVal;
Expand Down Expand Up @@ -642,11 +642,11 @@ state active
list lSettings = llParseString2List(sStr, ["_"],[]);
string sTok = llList2String(lSettings,0);
string sVar = llList2String(lSettings,1);

//integer ind = llListFindList(g_lSettingsReqs, [sStr]);
//if(ind!=-1)g_lSettingsReqs = llDeleteSubList(g_lSettingsReqs, ind,ind);


if(sTok=="global"){
if(sVar == "locked") g_iLocked=FALSE;
}else if(sTok == "anim"){
Expand Down Expand Up @@ -698,9 +698,9 @@ state inUpdate{
llResetScript();
}else if(iNum == 0){
if(sMsg == "do_move" && !g_iIsMoving){

if(llGetLinkNumber()==LINK_ROOT || llGetLinkNumber() == 0)return;

g_iIsMoving=TRUE;
llOwnerSay("Moving oc_anim!");
integer i=0;
Expand All @@ -720,7 +720,7 @@ state inUpdate{
}
}
}

llRemoveInventory(llGetScriptName());
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/collar/oc_auth.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ state update{
if(iNum == REBOOT)llResetScript();
else if(iNum == 0){
if(sMsg == "do_move" && !g_iIsMoving){

if(llGetLinkNumber()==LINK_ROOT || llGetLinkNumber() == 0)return;

g_iIsMoving=TRUE;
llOwnerSay("Moving oc_auth!");
integer i=0;
Expand All @@ -45,9 +45,9 @@ state update{
}
}
}

llRemoveInventory(llGetScriptName());
}
}
}
}
}
5 changes: 4 additions & 1 deletion src/collar/oc_rlvsuite.lsl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ list g_lRLVList = [ // ButtonText, CategoryIndex, RLVCMD
"Blur View" , 7 , "setdebug_renderresolutiondivisor" , // 56
"MaxDistance" , 7 , "setcam_avdistmax" , // 57
"MinDistance" , 7 , "setcam_avdistmin" , // 58
"Send Emote" , 0 , "rediremote:-99999"
"Send Emote" , 0 , "rediremote"
// "Idle" , 3 , "allowidle" , 268435456 , 0 , CMD_EVERYONE , // 59 // Everything down here was ignored. There seem to be a Limit how
// "Set Debug" , 3 , "setdebug" , 536870912 , 0 , CMD_OWNER , // 60 // big a lsl-list can go
// "Environment" , 3 , "setenv" , 1073741824, 0 , CMD_EVERYONE , // 61
Expand Down Expand Up @@ -277,6 +277,9 @@ string FormatCommand(string sCommand,integer bEnable)
} else if (sCommand == "camdistmax:0"){
if (bEnable) g_bForceMouselook = TRUE;
else g_bForceMouselook = FALSE;
} else if(sCommand == "rediremote")
{
sMod = ":38322"+sMod;
}

//llOwnerSay("Restriction '"+sCommand+"' has changed, sending message");
Expand Down
2 changes: 1 addition & 1 deletion web/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.0.3000
8.0.4000

0 comments on commit bcb5385

Please sign in to comment.